This commit is contained in:
2021-02-25 22:55:53 +00:00
parent 0fe7c6c327
commit de6e2b417c

View File

@@ -1095,13 +1095,24 @@ export default {
return null;
},
async updatePartCost(item) {
let vm = this;
let dialogResult = await window.$gz.dialog.confirmGeneric(
"Update part cost from received cost?"
);
if (dialogResult == false) {
return;
}
console.log("STUB: UPDATE PART COST", item);
//send request
let res = await window.$gz.api.put(
`part/part-cost/${item.partId}`,
item.receivedCost
);
if (res.error) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
} else {
window.$gz.eventBus.$emit("notify-success", vm.$ay.t("JobCompleted"));
}
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
@@ -1525,6 +1536,7 @@ async function fetchTranslatedText(vm) {
"PurchaseOrderItemSerialNumbers",
"ReceiveAll",
"Receive",
"JobCompleted",
"PurchaseOrderCustom1",
"PurchaseOrderCustom2",
"PurchaseOrderCustom3",