From 81b9ceee1570aa4fc67d596072460850cd8645e2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 25 Jan 2022 19:25:10 +0000 Subject: [PATCH] --- .../components/work-order-item-travels.vue | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/ayanova/src/components/work-order-item-travels.vue b/ayanova/src/components/work-order-item-travels.vue index e2d09d08..eb97a3a4 100644 --- a/ayanova/src/components/work-order-item-travels.vue +++ b/ayanova/src/components/work-order-item-travels.vue @@ -930,19 +930,18 @@ export default { if (isNew) { if (globalMinutes != 0) { - //set stop date based on start date and global minutes - this.value.items[this.activeWoItemIndex].travels[ - this.activeItemIndex - ].travelStopDate = window.$gz.locale.addMinutesToUTC8601String( + dStop = window.$gz.locale.addMinutesToUTC8601String( dStart, globalMinutes ); + //set stop date based on start date and global minutes this.value.items[this.activeWoItemIndex].travels[ this.activeItemIndex - ].travelRateQuantity = globalMinutes; + ].travelStopDate = dStop; } - } else { + } + { //Existing record or both dates filled, just update quantity if (dStop != null) { this.value.items[this.activeWoItemIndex].travels[ @@ -960,19 +959,18 @@ export default { if (isNew && dStart == null) { if (globalMinutes != 0) { - //set start date based on stop date and global minutes - this.value.items[this.activeWoItemIndex].travels[ - this.activeItemIndex - ].travelStartDate = window.$gz.locale.addMinutesToUTC8601String( + dStart = window.$gz.locale.addMinutesToUTC8601String( dStop, 0 - globalMinutes ); + //set start date based on stop date and global minutes this.value.items[this.activeWoItemIndex].travels[ this.activeItemIndex - ].travelRateQuantity = globalMinutes; + ].travelStartDate = dStart; } - } else { + } + { //Existing record or both dates filled, just update quantity if (dStart != null) { this.value.items[this.activeWoItemIndex].travels[