This commit is contained in:
2022-07-11 21:32:12 +00:00
parent b65a47886b
commit 74e4c2cc36
2 changed files with 6 additions and 3 deletions

View File

@@ -19,8 +19,7 @@ namespace AyaNovaQBI
public string UnitModelVendorViz { get; set; } public string UnitModelVendorViz { get; set; }
public string UnitDescriptionViz { get; set; } public string UnitDescriptionViz { get; set; }
public bool UnitMeteredViz { get; set; } public bool UnitMeteredViz { get; set; }
public string UnitLastMeterViz { get; set; }//for qbi
//PHYSICAL ADDRESS //PHYSICAL ADDRESS
public string AddressViz { get; set; } public string AddressViz { get; set; }
public string CityViz { get; set; } public string CityViz { get; set; }

View File

@@ -6362,10 +6362,14 @@ namespace AyaNovaQBI
if (s.IndexOf("~UNIT_METER~") != -1) if (s.IndexOf("~UNIT_METER~") != -1)
{ {
if (!up[0].Metered) if (!u.UnitMeteredViz)
s = s.Replace("~UNIT_METER~", ""); s = s.Replace("~UNIT_METER~", "");
else else
{
//todo: fetch full unit record here to get lastmeter from it
// [HttpGet("unit/meter-reading/{id}")]
s = s.Replace("~UNIT_METER~", u.UnitLastMeterViz); s = s.Replace("~UNIT_METER~", u.UnitLastMeterViz);
}
} }
if (s.IndexOf("~UNIT_MAKE~") != -1) if (s.IndexOf("~UNIT_MAKE~") != -1)