This commit is contained in:
@@ -3401,13 +3401,13 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.customerReferenceNumber = c.CustomerReferenceNumber;
|
d.customerReferenceNumber = c.CustomerReferenceNumber;
|
||||||
d.customerContactName = c.CustomerContactName;
|
d.customerContactName = c.CustomerContactName;
|
||||||
d.createdDate = util.DateToV8(c.Created, true);
|
d.createdDate = util.DateToV8(c.Created, true);
|
||||||
d.preparedById= Getv7v8IdMap(c.WorkorderQuote.PreparedByID,"quote prepared by id");
|
d.preparedById = Getv7v8IdMap(c.WorkorderQuote.PreparedByID, "quote prepared by id");
|
||||||
d.introduction = c.WorkorderQuote.Introduction;
|
d.introduction = c.WorkorderQuote.Introduction;
|
||||||
d.requested=util.DateToV8(c.WorkorderQuote.QuoteRequestDate);
|
d.requested = util.DateToV8(c.WorkorderQuote.QuoteRequestDate);
|
||||||
d.validUntil=util.DateToV8(c.WorkorderQuote.ValidUntilDate);
|
d.validUntil = util.DateToV8(c.WorkorderQuote.ValidUntilDate);
|
||||||
d.submitted=util.DateToV8(c.WorkorderQuote.DateSubmitted);
|
d.submitted = util.DateToV8(c.WorkorderQuote.DateSubmitted);
|
||||||
d.approved=util.DateToV8(c.WorkorderQuote.DateApproved);
|
d.approved = util.DateToV8(c.WorkorderQuote.DateApproved);
|
||||||
|
|
||||||
d.contractId = Getv7v8IdMapNullOk(c.ContractIDResolved());
|
d.contractId = Getv7v8IdMapNullOk(c.ContractIDResolved());
|
||||||
d.lastStatusId = (int)c.WorkorderQuote.QuoteStatus;
|
d.lastStatusId = (int)c.WorkorderQuote.QuoteStatus;
|
||||||
|
|
||||||
@@ -3426,7 +3426,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.longitude = client.GoToAddress.Longitude;
|
d.longitude = client.GoToAddress.Longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TagFromv7Guid(c.RegionID, tags);
|
TagFromv7Guid(c.RegionID, tags);
|
||||||
TagFromv7Guid(c.WorkorderCategoryID, tags);
|
TagFromv7Guid(c.WorkorderCategoryID, tags);
|
||||||
|
|
||||||
@@ -3444,13 +3444,13 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//-----
|
//-----
|
||||||
|
|
||||||
// wiki
|
// wiki
|
||||||
if (WikiPage.HasWiki(c.ID))
|
if (WikiPage.HasWiki(c.ID))
|
||||||
d.wiki = GetWikiContent(ObjectTID);
|
d.wiki = GetWikiContent(ObjectTID);
|
||||||
|
|
||||||
//docs
|
//docs
|
||||||
string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress, util.AyaType.WorkOrder);
|
string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress, util.AyaType.WorkOrder);
|
||||||
if (!string.IsNullOrEmpty(NonFileUrls))
|
if (!string.IsNullOrEmpty(NonFileUrls))
|
||||||
d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
|
d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
|
||||||
|
|
||||||
//put the header object
|
//put the header object
|
||||||
await util.PutAsync("quote", d.ToString());
|
await util.PutAsync("quote", d.ToString());
|
||||||
@@ -3472,8 +3472,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
state.userId = Getv7v8IdMap(c.Creator, "Quote creator for status");
|
state.userId = Getv7v8IdMap(c.Creator, "Quote creator for status");
|
||||||
await util.PostAsync("quote/states", state.ToString());
|
await util.PostAsync("quote/states", state.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3576,8 +3576,8 @@ namespace AyaNova.PlugIn.V8
|
|||||||
dwip.serials = PartSerial.GetSerialNumberFromPartSerialID(wip.PartSerialID);
|
dwip.serials = PartSerial.GetSerialNumberFromPartSerialID(wip.PartSerialID);
|
||||||
await util.PostAsync("quote/items/parts", dwip.ToString());
|
await util.PostAsync("quote/items/parts", dwip.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//##### WORKORDER ITEM LABOR
|
//##### WORKORDER ITEM LABOR
|
||||||
foreach (WorkorderItemLabor wl in wi.Labors)
|
foreach (WorkorderItemLabor wl in wi.Labors)
|
||||||
@@ -3639,7 +3639,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await util.PostAsync("quote/items/tasks", dwt.ToString());
|
await util.PostAsync("quote/items/tasks", dwt.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}//items loop
|
}//items loop
|
||||||
}//wo loop
|
}//wo loop
|
||||||
|
|
||||||
@@ -3660,14 +3660,14 @@ namespace AyaNova.PlugIn.V8
|
|||||||
╚═╝ ╚═╝ ╚═╝
|
╚═╝ ╚═╝ ╚═╝
|
||||||
*/
|
*/
|
||||||
#region PM Workorders
|
#region PM Workorders
|
||||||
|
|
||||||
int _highestPMNumberExported = 0;
|
int _highestPMNumberExported = 0;
|
||||||
private async System.Threading.Tasks.Task ExportPMs(ProgressForm progress)
|
private async System.Threading.Tasks.Task ExportPMs(ProgressForm progress)
|
||||||
{
|
{
|
||||||
if (!progress.KeepGoing) return;
|
if (!progress.KeepGoing) return;
|
||||||
progress.Op("Start Preventive Maintenance export");
|
progress.Op("Start Preventive Maintenance export");
|
||||||
progress.SubOp("");
|
progress.SubOp("");
|
||||||
|
|
||||||
var ObjectTypeName = "PM";
|
var ObjectTypeName = "PM";
|
||||||
progress.SubOp("");
|
progress.SubOp("");
|
||||||
//Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too
|
//Step 1: export the CustomFields to FormCustom if applicable so that when doing individual items we can export their custom data too
|
||||||
@@ -3730,23 +3730,27 @@ namespace AyaNova.PlugIn.V8
|
|||||||
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
||||||
break;
|
break;
|
||||||
case AyaDayOfWeek.Thursday:
|
case AyaDayOfWeek.Thursday:
|
||||||
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
||||||
break;
|
break;
|
||||||
case AyaDayOfWeek.Friday:
|
case AyaDayOfWeek.Friday:
|
||||||
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Saturday | util.AyaDaysOfWeek.Sunday;
|
||||||
break;
|
break;
|
||||||
case AyaDayOfWeek.Saturday:
|
case AyaDayOfWeek.Saturday:
|
||||||
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Sunday;
|
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Sunday;
|
||||||
break;
|
break;
|
||||||
case AyaDayOfWeek.Sunday:
|
case AyaDayOfWeek.Sunday:
|
||||||
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday ;
|
d.excludeDaysOfWeek = util.AyaDaysOfWeek.Monday | util.AyaDaysOfWeek.Tuesday | util.AyaDaysOfWeek.Wednesday | util.AyaDaysOfWeek.Thursday | util.AyaDaysOfWeek.Friday | util.AyaDaysOfWeek.Saturday;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
d.active = c.WorkorderPreventiveMaintenance.Active;
|
d.active = c.WorkorderPreventiveMaintenance.Active;
|
||||||
d.nextServiceDate = util.DateToV8(c.WorkorderPreventiveMaintenance.NextServiceDate, true);
|
d.nextServiceDate = util.DateToV8(c.WorkorderPreventiveMaintenance.NextServiceDate, true);
|
||||||
|
d.repeatUnit = (int)c.WorkorderPreventiveMaintenance.GenerateSpanUnit;
|
||||||
|
d.generateBeforeUnit = (int)c.WorkorderPreventiveMaintenance.ThresholdSpanUnit;
|
||||||
|
d.repeatInterval = c.WorkorderPreventiveMaintenance.GenerateSpan;
|
||||||
|
d.generateBeforeInterval = c.WorkorderPreventiveMaintenance.ThresholdSpan;
|
||||||
|
d.stopGeneratingDate = util.DateToV8(c.WorkorderPreventiveMaintenance.StopGeneratingDate);
|
||||||
|
|
||||||
|
|
||||||
var client = c.uiClient;
|
var client = c.uiClient;
|
||||||
if (client != null)
|
if (client != null)
|
||||||
{
|
{
|
||||||
@@ -3795,7 +3799,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
//Event log fixup
|
//Event log fixup
|
||||||
await util.EventLog(util.AyaType.WorkOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified);
|
await util.EventLog(util.AyaType.WorkOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified);
|
||||||
|
|
||||||
|
|
||||||
//##### ITEMS
|
//##### ITEMS
|
||||||
int nSequence = 0;
|
int nSequence = 0;
|
||||||
foreach (WorkorderItem wi in c.WorkorderItems)
|
foreach (WorkorderItem wi in c.WorkorderItems)
|
||||||
|
|||||||
Reference in New Issue
Block a user