This commit is contained in:
2021-08-17 18:53:45 +00:00
parent 6555234522
commit 5b46970edc

View File

@@ -3293,25 +3293,72 @@ namespace AyaNova.PlugIn.V8
//################## v8 quote status to mirror v7 quote status ########################## //################## v8 quote status to mirror v7 quote status ##########################
{ {
/*
Submitted
*/
if (!progress.KeepGoing) return; if (!progress.KeepGoing) return;
dynamic d = new JObject();
d.name = ; //InProgress 1:
progress.Op("Replicating Quote status " + d.name); await util.PostAsync("work-order-status", @"{""name"": ""In progress"",
d.active = s.Active; ""active"": true,
d.locked = false; ""notes"": ""In process of completing this quote"",
d.completed = false; ""color"": ""#00ff00"",
d.selectRoles = 1290;//biz-admin, service full, service tech, subcontractor ""selectRoles"": 32834,
d.removeRoles = 1290; ""removeRoles"": 32834,
d.color = System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(s.ARGB)); ""completed"": false,
SetTags(d, tags); ""locked"": false}");
var rMainObject = await util.PostAsync("work-order-status", d.ToString());
long RavenId = util.IdFromResponse(rMainObject);
Addv7v8IdMap(s.ID, RavenId);
//Event log fixup //Submitted 2:
await util.EventLog(util.AyaType.WorkOrderStatus, RavenId, SafeGetUserMap(s.Creator), SafeGetUserMap(s.Modifier), s.Created, s.Modified); await util.PostAsync("work-order-status", @"{""name"": ""Submitted"",
""active"": true,
""notes"": ""Use to lock quote after given to customer and wait for approval"",
""color"": ""#c00000"",
""selectRoles"": 32834,
""removeRoles"": 32834,
""completed"": true,
""locked"": true}");
//Awarded 3:
await util.PostAsync("work-order-status", @"{""name"": ""Awarded"",
""active"": true,
""notes"": ""Waiting for work order to be generated"",
""color"": ""#80ffff"",
""selectRoles"": 32834,
""removeRoles"": 32842,
""completed"": true,
""locked"": true}");
//NotAwarded 4:
await util.PostAsync("work-order-status", @"{""name"": ""Not awarded"",
""active"": true,
""notes"": ""Not successful"",
""color"": ""#f2f2f2"",
""selectRoles"": 32834,
""removeRoles"": 32834,
""completed"": true,
""locked"": true}");
//New 5:
await util.PostAsync("work-order-status", @"{""name"": ""New"",
""active"": true,
""notes"": ""New quote required; Sales to complete this Quote for submission"",
""color"": ""#8080ff"",
""selectRoles"": 32834,
""removeRoles"": 32834,
""completed"": false,
""locked"": false}");
//NotAwarded2 6:
await util.PostAsync("work-order-status", @"{""name"": ""Beyond economical repair"",
""active"": true,
""notes"": ""Not worth repairing"",
""color"": ""#ff0000"",
""selectRoles"": 32834,
""removeRoles"": 32834,
""completed"": true,
""locked"": true}");
} }