This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ If an date is left empty it will not be affected by this process so for example
|
|||||||
|
|
||||||
When a PM is first created it will use the exact service date chosen the **first** time it generates the first workorder regardless of which day it falls on as it's assumed the user specifically wants that particular day for the first Work order generated from that PM. Subsequent generate events will take into account the chosen excluded days.
|
When a PM is first created it will use the exact service date chosen the **first** time it generates the first workorder regardless of which day it falls on as it's assumed the user specifically wants that particular day for the first Work order generated from that PM. Subsequent generate events will take into account the chosen excluded days.
|
||||||
|
|
||||||
|
### Schedule conflicts handling
|
||||||
|
|
||||||
|
Normally if the Global setting "Allow schedule conflicts" is set to False then a work order item scheduled user record can not be saved if there is a schedule conflict. In the case of a PM automatically generating a work order however, this could prevent the entire Work order from being generated. For this reason the normal rules are suspended when generating a work order and it will save the scheduled user record even if it conflicts.
|
||||||
|
|
||||||
### Inventory handling
|
### Inventory handling
|
||||||
|
|
||||||
AyaNova removes inventory from stock immediately upon a Work order item Part record being saved and the same is true if the Work order is generated by a PM at the server automatically.
|
AyaNova removes inventory from stock immediately upon a Work order item Part record being saved and the same is true if the Work order is generated by a PM at the server automatically.
|
||||||
|
|||||||
@@ -4790,11 +4790,8 @@ namespace AyaNova.Biz
|
|||||||
//process those pms
|
//process those pms
|
||||||
foreach (long pmid in l)
|
foreach (long pmid in l)
|
||||||
{
|
{
|
||||||
|
|
||||||
log.LogDebug($"processing pm id {pmid}");
|
log.LogDebug($"processing pm id {pmid}");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//look for same delivery already made and skip if already notified (sb one time only but will repeat for > 90 days as delivery log gets pruned)
|
//look for same delivery already made and skip if already notified (sb one time only but will repeat for > 90 days as delivery log gets pruned)
|
||||||
if (await ct.NotifyDeliveryLog.AnyAsync(z => z.NotifySubscriptionId == sub.Id && z.ObjectId == pmid))
|
if (await ct.NotifyDeliveryLog.AnyAsync(z => z.NotifySubscriptionId == sub.Id && z.ObjectId == pmid))
|
||||||
{
|
{
|
||||||
@@ -5125,6 +5122,7 @@ namespace AyaNova.Biz
|
|||||||
wois.StopDate = pmsu.StopDate;//DATE ADJUST
|
wois.StopDate = pmsu.StopDate;//DATE ADJUST
|
||||||
wois.Tags = pmsu.Tags;
|
wois.Tags = pmsu.Tags;
|
||||||
wois.UserId = pmsu.UserId;
|
wois.UserId = pmsu.UserId;
|
||||||
|
wois.IsPMGenerated = true;//signifies to ignore schedule conflicts
|
||||||
|
|
||||||
woi.ScheduledUsers.Add(wois);
|
woi.ScheduledUsers.Add(wois);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5076,6 +5076,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Scheduling conflict?
|
//Scheduling conflict?
|
||||||
if (!AyaNova.Util.ServerGlobalBizSettings.Cache.AllowScheduleConflicts
|
if (!AyaNova.Util.ServerGlobalBizSettings.Cache.AllowScheduleConflicts
|
||||||
|
&& proposedObj.IsPMGenerated == false
|
||||||
&& proposedObj.UserId != null
|
&& proposedObj.UserId != null
|
||||||
&& proposedObj.StartDate != null
|
&& proposedObj.StartDate != null
|
||||||
&& proposedObj.StopDate != null
|
&& proposedObj.StopDate != null
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ namespace AyaNova.Models
|
|||||||
[NotMapped, JsonIgnore]
|
[NotMapped, JsonIgnore]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[NotMapped, JsonIgnore]
|
||||||
|
public bool IsPMGenerated { get; set; } = false;//INTERNAL, USED BY PM GENERATOR TO SIGNIFY IGNORE SCHEDULE CONFLICTS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public long WorkOrderItemId { get; set; }
|
public long WorkOrderItemId { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|||||||
Reference in New Issue
Block a user