This commit is contained in:
2020-12-29 00:13:36 +00:00
parent 0eb6c4206d
commit 4d5cb534aa

View File

@@ -304,6 +304,7 @@ namespace AyaNova.PlugIn.V8
//BIZ objects
await ExportLocales(progress);
await ExportStaffUsers(progress);
await ExportRates(progress);
await ExportContracts(progress);
await ExportHeadOffices(progress);
await ExportClients(progress);
@@ -328,7 +329,7 @@ namespace AyaNova.PlugIn.V8
//Must be after all root objects due to followups
await ExportScheduleMarkers(progress);
await ExportRates(progress);
//NOTE: when get to PRIORITY, or WORKORDER STATUS be sure to add color code as per already done in USER export
@@ -1833,18 +1834,21 @@ namespace AyaNova.PlugIn.V8
progress.Op("Start Rates export");
progress.SubOp("");
var ObjectTypeName = "Rate";
//Step 2: export the objects
Rates pl = Rates.GetItems(false);
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
//get the rate unit charge descriptions for export
RateUnitChargeDescriptions rud = RateUnitChargeDescriptions.GetItems();
foreach (Rate i in pl)
{
if (!progress.KeepGoing) return;
List<string> tags = new List<string>();
tags.Add(ImportTag);
dynamic d = new JObject();
d.name = GetUniqueName(i.Name);
if (IsDuplicateMapItem(i.ID, i.Name, progress)) continue;
@@ -1852,6 +1856,12 @@ namespace AyaNova.PlugIn.V8
d.active = i.Active;
d.notes = i.Description;
d.accountNumber = i.AccountNumber;
RateUnitChargeDescription rd = rud[i.RateUnitChargeDescriptionID];
if (rd != null)
d.unit = rd.Name;
d.cost = i.Cost;
d.charge = i.Charge;
Tagit(i.RegionID, tags);
Tagit(i.ClientGroupID, tags);
SetTags(d, tags);
@@ -1869,7 +1879,7 @@ namespace AyaNova.PlugIn.V8
long RavenId = util.IdFromResponse(rMainObject);
AddMap(i.ID, RavenId);
//-----
//Event log fixup
@@ -2681,7 +2691,7 @@ namespace AyaNova.PlugIn.V8
//RateRate*
s = s.Replace("RateRate", "Rate");
//FUTURE