From d747918365a40192915f0e3054157ecf1c7de65a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 21 May 2021 17:44:36 +0000 Subject: [PATCH] --- ayanova/src/components/currency-control.vue | 4 ++- .../src/components/work-order-item-labors.vue | 27 +++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ayanova/src/components/currency-control.vue b/ayanova/src/components/currency-control.vue index cd79d23a..7ed5aa1a 100644 --- a/ayanova/src/components/currency-control.vue +++ b/ayanova/src/components/currency-control.vue @@ -10,6 +10,7 @@ }" :readonly="readonly" :disabled="disabled" + :clearable="!readonly && canClear" :label="label" :rules="rules" :error-messages="errorMessages" @@ -40,7 +41,8 @@ export default { readonly: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, errorMessages: { type: Array, default: null }, - appendOuterIcon: { type: String, default: null } + appendOuterIcon: { type: String, default: null }, + canClear: { type: Boolean, default: true } }, computed: { currencyValue() { diff --git a/ayanova/src/components/work-order-item-labors.vue b/ayanova/src/components/work-order-item-labors.vue index c0c1eebc..8486bab7 100644 --- a/ayanova/src/components/work-order-item-labors.vue +++ b/ayanova/src/components/work-order-item-labors.vue @@ -392,6 +392,7 @@ value.items[activeWoItemIndex].labors[activeItemIndex] .priceOverride " + can-clear :readonly="formState.readOnly || isDeleted" :disabled="isDeleted" :label="$ay.t('PriceOverride')" @@ -409,10 +410,6 @@ form().decimalValid( this, `Items[${activeWoItemIndex}].labors[${activeItemIndex}].priceOverride` - ), - form().required( - this, - `Items[${activeWoItemIndex}].labors[${activeItemIndex}].priceOverride` ) ]" @input=" @@ -718,6 +715,14 @@ export default { }); } + if (this.form().showMe(this, "LaborUnitOfMeasureViz")) { + headers.push({ + text: this.$ay.t("UnitOfMeasure"), + align: "left", + value: "unitOfMeasureViz" + }); + } + if (this.form().showMe(this, "LaborCost")) { headers.push({ text: this.$ay.t("Cost"), @@ -736,17 +741,17 @@ export default { if (this.form().showMe(this, "LaborPrice")) { headers.push({ - text: this.$ay.t("Price"), + text: this.$ay.t("PriceOverride"), align: "right", - value: "priceViz" + value: "priceOverride" }); } if (this.form().showMe(this, "LaborPrice")) { headers.push({ - text: this.$ay.t("PriceOverride"), + text: this.$ay.t("Price"), align: "right", - value: "priceOverride" + value: "priceViz" }); } @@ -843,6 +848,7 @@ export default { x.noChargeQuantity, this.pvm.languageName ), + unitOfMeasureViz: x.unitOfMeasureViz, costViz: window.$gz.locale.currencyLocalized( x.costViz, this.pvm.languageName, @@ -875,6 +881,11 @@ export default { this.pvm.languageName, this.pvm.currencyName ), + netViz: window.$gz.locale.currencyLocalized( + x.netViz, + this.pvm.languageName, + this.pvm.currencyName + ), taxAViz: window.$gz.locale.currencyLocalized( x.taxAViz, this.pvm.languageName,