This commit is contained in:
2021-02-25 19:49:00 +00:00
parent 8a7184a8ae
commit 03b7226ae5
4 changed files with 30 additions and 15 deletions

View File

@@ -502,6 +502,12 @@
v-model="obj.items[editPoItemIndex].receivedCost"
:readonly="formState.readOnly"
:label="$ay.t('PurchaseOrderReceiptItemReceiptCost')"
:append-outer-icon="
updatePartCostIcon(obj.items[editPoItemIndex])
"
@gz-append-outer="
updatePartCost(obj.items[editPoItemIndex])
"
ref="Items.ReceivedCost"
data-cy="Items.ReceivedCost"
:rules="[
@@ -581,7 +587,7 @@
v-model="obj.items[editPoItemIndex].serials"
:readonly="formState.readOnly"
:label="$ay.t('PurchaseOrderItemSerialNumbers')"
:rows="$vuetify.breakpoint.xs ? 3 : 10"
:rows="$vuetify.breakpoint.xs ? 3 : 5"
ref="Items.Serials"
data-cy="Items.Serials"
:error-messages="
@@ -1082,6 +1088,15 @@ export default {
this.editPoItemIndex = 0;
this.formState.dirty = true;
},
updatePartCostIcon(item) {
if (item.receivedCost && item.purchaseOrderCost != item.receivedCost) {
return "$ayiMagic";
}
return null;
},
updatePartCost(item) {
console.log("STUB: UPDATE PART COST", item);
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
},