This commit is contained in:
@@ -3401,13 +3401,13 @@ namespace AyaNova.PlugIn.V8
|
||||
d.customerReferenceNumber = c.CustomerReferenceNumber;
|
||||
d.customerContactName = c.CustomerContactName;
|
||||
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.requested=util.DateToV8(c.WorkorderQuote.QuoteRequestDate);
|
||||
d.validUntil=util.DateToV8(c.WorkorderQuote.ValidUntilDate);
|
||||
d.submitted=util.DateToV8(c.WorkorderQuote.DateSubmitted);
|
||||
d.approved=util.DateToV8(c.WorkorderQuote.DateApproved);
|
||||
|
||||
d.requested = util.DateToV8(c.WorkorderQuote.QuoteRequestDate);
|
||||
d.validUntil = util.DateToV8(c.WorkorderQuote.ValidUntilDate);
|
||||
d.submitted = util.DateToV8(c.WorkorderQuote.DateSubmitted);
|
||||
d.approved = util.DateToV8(c.WorkorderQuote.DateApproved);
|
||||
|
||||
d.contractId = Getv7v8IdMapNullOk(c.ContractIDResolved());
|
||||
d.lastStatusId = (int)c.WorkorderQuote.QuoteStatus;
|
||||
|
||||
@@ -3426,7 +3426,7 @@ namespace AyaNova.PlugIn.V8
|
||||
d.longitude = client.GoToAddress.Longitude;
|
||||
}
|
||||
|
||||
|
||||
|
||||
TagFromv7Guid(c.RegionID, tags);
|
||||
TagFromv7Guid(c.WorkorderCategoryID, tags);
|
||||
|
||||
@@ -3444,13 +3444,13 @@ namespace AyaNova.PlugIn.V8
|
||||
//-----
|
||||
|
||||
// wiki
|
||||
if (WikiPage.HasWiki(c.ID))
|
||||
d.wiki = GetWikiContent(ObjectTID);
|
||||
if (WikiPage.HasWiki(c.ID))
|
||||
d.wiki = GetWikiContent(ObjectTID);
|
||||
|
||||
//docs
|
||||
string NonFileUrls = await ExportDocs(ObjectTID, c.Docs, progress, util.AyaType.WorkOrder);
|
||||
if (!string.IsNullOrEmpty(NonFileUrls))
|
||||
d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
|
||||
if (!string.IsNullOrEmpty(NonFileUrls))
|
||||
d.notes = NonFileUrls + "\n-----------------\n" + d.notes;
|
||||
|
||||
//put the header object
|
||||
await util.PutAsync("quote", d.ToString());
|
||||
@@ -3472,8 +3472,8 @@ namespace AyaNova.PlugIn.V8
|
||||
state.userId = Getv7v8IdMap(c.Creator, "Quote creator for status");
|
||||
await util.PostAsync("quote/states", state.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3576,8 +3576,8 @@ namespace AyaNova.PlugIn.V8
|
||||
dwip.serials = PartSerial.GetSerialNumberFromPartSerialID(wip.PartSerialID);
|
||||
await util.PostAsync("quote/items/parts", dwip.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//##### WORKORDER ITEM LABOR
|
||||
foreach (WorkorderItemLabor wl in wi.Labors)
|
||||
@@ -3639,7 +3639,7 @@ namespace AyaNova.PlugIn.V8
|
||||
await util.PostAsync("quote/items/tasks", dwt.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}//items loop
|
||||
}//wo loop
|
||||
|
||||
@@ -3660,14 +3660,14 @@ namespace AyaNova.PlugIn.V8
|
||||
╚═╝ ╚═╝ ╚═╝
|
||||
*/
|
||||
#region PM Workorders
|
||||
|
||||
|
||||
int _highestPMNumberExported = 0;
|
||||
private async System.Threading.Tasks.Task ExportPMs(ProgressForm progress)
|
||||
{
|
||||
if (!progress.KeepGoing) return;
|
||||
progress.Op("Start Preventive Maintenance export");
|
||||
progress.SubOp("");
|
||||
|
||||
|
||||
var ObjectTypeName = "PM";
|
||||
progress.SubOp("");
|
||||
//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;
|
||||
break;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
d.active = c.WorkorderPreventiveMaintenance.Active;
|
||||
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;
|
||||
if (client != null)
|
||||
{
|
||||
@@ -3795,7 +3799,7 @@ namespace AyaNova.PlugIn.V8
|
||||
//Event log fixup
|
||||
await util.EventLog(util.AyaType.WorkOrder, RavenId, SafeGetUserMap(c.Creator), SafeGetUserMap(c.Modifier), c.Created, c.Modified);
|
||||
|
||||
|
||||
|
||||
//##### ITEMS
|
||||
int nSequence = 0;
|
||||
foreach (WorkorderItem wi in c.WorkorderItems)
|
||||
|
||||
Reference in New Issue
Block a user