This commit is contained in:
@@ -305,6 +305,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await ExportLocales(progress);
|
await ExportLocales(progress);
|
||||||
await ExportStaffUsers(progress);
|
await ExportStaffUsers(progress);
|
||||||
await ExportRates(progress);
|
await ExportRates(progress);
|
||||||
|
await ExportTaxCodes(progress);
|
||||||
await ExportContracts(progress);
|
await ExportContracts(progress);
|
||||||
await ExportHeadOffices(progress);
|
await ExportHeadOffices(progress);
|
||||||
await ExportClients(progress);
|
await ExportClients(progress);
|
||||||
@@ -1892,6 +1893,55 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
#endregion Rates
|
#endregion Rates
|
||||||
|
|
||||||
|
#region TaxCodes
|
||||||
|
private async System.Threading.Tasks.Task ExportTaxCodes(ProgressForm progress)
|
||||||
|
{
|
||||||
|
ResetUniqueNames();
|
||||||
|
if (!progress.KeepGoing) return;
|
||||||
|
progress.Op("Start Tax codes export");
|
||||||
|
progress.SubOp("");
|
||||||
|
var ObjectTypeName = "TaxCode";
|
||||||
|
|
||||||
|
|
||||||
|
//Step 2: export the objects
|
||||||
|
TaxCodes pl = TaxCodes.GetItems();
|
||||||
|
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach (TaxCode 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;
|
||||||
|
progress.Op(ObjectTypeName + " " + d.name);
|
||||||
|
d.active = i.Active;
|
||||||
|
|
||||||
|
d.taxA = i.TaxA;
|
||||||
|
d.taxB = i.TaxB;
|
||||||
|
d.taxOnTax = i.TaxOnTax;
|
||||||
|
|
||||||
|
SetTags(d, tags);
|
||||||
|
|
||||||
|
|
||||||
|
var rMainObject = await util.PostAsync("tax-code", d.ToString());
|
||||||
|
long RavenId = util.IdFromResponse(rMainObject);
|
||||||
|
AddMap(i.ID, RavenId);
|
||||||
|
|
||||||
|
|
||||||
|
//-----
|
||||||
|
|
||||||
|
//Event log fixup
|
||||||
|
await util.EventLog(util.AyaType.TaxCode, RavenId, SafeGetUserMap(i.Creator), SafeGetUserMap(i.Modifier), i.Created, i.Modified);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion Tax codes
|
||||||
|
|
||||||
|
|
||||||
#region Memos
|
#region Memos
|
||||||
private async System.Threading.Tasks.Task ExportMemos(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportMemos(ProgressForm progress)
|
||||||
|
|||||||
@@ -575,7 +575,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//corebizobject
|
//corebizobject
|
||||||
Review = 61,
|
Review = 61,
|
||||||
ServiceRate = 62,
|
ServiceRate = 62,
|
||||||
TravelRate = 63
|
TravelRate = 63,
|
||||||
|
TaxCode=64
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user