This commit is contained in:
@@ -304,6 +304,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//BIZ objects
|
//BIZ objects
|
||||||
await ExportLocales(progress);
|
await ExportLocales(progress);
|
||||||
await ExportStaffUsers(progress);
|
await ExportStaffUsers(progress);
|
||||||
|
await ExportRates(progress);
|
||||||
await ExportContracts(progress);
|
await ExportContracts(progress);
|
||||||
await ExportHeadOffices(progress);
|
await ExportHeadOffices(progress);
|
||||||
await ExportClients(progress);
|
await ExportClients(progress);
|
||||||
@@ -328,7 +329,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//Must be after all root objects due to followups
|
//Must be after all root objects due to followups
|
||||||
await ExportScheduleMarkers(progress);
|
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
|
//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.Op("Start Rates export");
|
||||||
progress.SubOp("");
|
progress.SubOp("");
|
||||||
var ObjectTypeName = "Rate";
|
var ObjectTypeName = "Rate";
|
||||||
|
|
||||||
|
|
||||||
//Step 2: export the objects
|
//Step 2: export the objects
|
||||||
Rates pl = Rates.GetItems(false);
|
Rates pl = Rates.GetItems(false);
|
||||||
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
|
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)
|
foreach (Rate i in pl)
|
||||||
{
|
{
|
||||||
if (!progress.KeepGoing) return;
|
if (!progress.KeepGoing) return;
|
||||||
List<string> tags = new List<string>();
|
List<string> tags = new List<string>();
|
||||||
tags.Add(ImportTag);
|
tags.Add(ImportTag);
|
||||||
|
|
||||||
dynamic d = new JObject();
|
dynamic d = new JObject();
|
||||||
d.name = GetUniqueName(i.Name);
|
d.name = GetUniqueName(i.Name);
|
||||||
if (IsDuplicateMapItem(i.ID, i.Name, progress)) continue;
|
if (IsDuplicateMapItem(i.ID, i.Name, progress)) continue;
|
||||||
@@ -1852,6 +1856,12 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.active = i.Active;
|
d.active = i.Active;
|
||||||
d.notes = i.Description;
|
d.notes = i.Description;
|
||||||
d.accountNumber = i.AccountNumber;
|
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.RegionID, tags);
|
||||||
Tagit(i.ClientGroupID, tags);
|
Tagit(i.ClientGroupID, tags);
|
||||||
SetTags(d, tags);
|
SetTags(d, tags);
|
||||||
@@ -1869,7 +1879,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
long RavenId = util.IdFromResponse(rMainObject);
|
long RavenId = util.IdFromResponse(rMainObject);
|
||||||
AddMap(i.ID, RavenId);
|
AddMap(i.ID, RavenId);
|
||||||
|
|
||||||
|
|
||||||
//-----
|
//-----
|
||||||
|
|
||||||
//Event log fixup
|
//Event log fixup
|
||||||
@@ -2681,7 +2691,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
|
|
||||||
//RateRate*
|
//RateRate*
|
||||||
s = s.Replace("RateRate", "Rate");
|
s = s.Replace("RateRate", "Rate");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//FUTURE
|
//FUTURE
|
||||||
|
|||||||
Reference in New Issue
Block a user