SuggestedQuantity field added to pm and wo item parts
This commit is contained in:
@@ -22,6 +22,19 @@
|
|||||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
v-if="hasData && canAdd"
|
||||||
|
@click="realizeSuggestedParts"
|
||||||
|
data-cy="woItemRealizeSuggestedParts"
|
||||||
|
>
|
||||||
|
<!-- <v-list-item-icon>
|
||||||
|
<v-icon>$ayiPlus</v-icon>
|
||||||
|
</v-list-item-icon> -->
|
||||||
|
<v-list-item-title>{{
|
||||||
|
$ay.t("WorkOrderItemPartRealizeSuggested")
|
||||||
|
}}</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-if="hasData && hasSelection && canAdd"
|
v-if="hasData && hasSelection && canAdd"
|
||||||
@click="copyItemDialog = true"
|
@click="copyItemDialog = true"
|
||||||
@@ -1058,6 +1071,17 @@ export default {
|
|||||||
this.setDefaultView();
|
this.setDefaultView();
|
||||||
this.$emit("change");
|
this.$emit("change");
|
||||||
},
|
},
|
||||||
|
realizeSuggestedParts() {
|
||||||
|
this.value.items.forEach(z => {
|
||||||
|
z.parts.forEach(part => {
|
||||||
|
if (part.quantity == 0 && part.suggestedQuantity > 0) {
|
||||||
|
part.quantity = part.suggestedQuantity;
|
||||||
|
part.isDirty = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$emit("change");
|
||||||
|
},
|
||||||
setDefaultView: function() {
|
setDefaultView: function() {
|
||||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||||
if (this.value && this.value.items && this.value.items.length == 1) {
|
if (this.value && this.value.items && this.value.items.length == 1) {
|
||||||
|
|||||||
@@ -2300,6 +2300,7 @@ async function fetchTranslatedText(vm) {
|
|||||||
"WorkOrderItemPartPartWarehouseID",
|
"WorkOrderItemPartPartWarehouseID",
|
||||||
"WorkOrderItemPartQuantity",
|
"WorkOrderItemPartQuantity",
|
||||||
"WorkOrderItemPartSuggestedQuantity",
|
"WorkOrderItemPartSuggestedQuantity",
|
||||||
|
"WorkOrderItemPartRealizeSuggested",
|
||||||
"WorkOrderItemPartTaxPartSaleID",
|
"WorkOrderItemPartTaxPartSaleID",
|
||||||
"WorkOrderItemPartPartID",
|
"WorkOrderItemPartPartID",
|
||||||
"WorkOrderItemPartRequestList",
|
"WorkOrderItemPartRequestList",
|
||||||
|
|||||||
Reference in New Issue
Block a user