This commit is contained in:
@@ -174,10 +174,7 @@ CURRENTLY DOING: PurchaseOrder
|
||||
|
||||
|
||||
PO todo
|
||||
todo: area to enter received serials and have them inserted into serials table
|
||||
when serials are added needs to save them at server adn also needs to be able to reverse them at server
|
||||
maybe a db field needs to be added for this to po item? Otherwise how to reverse? Just a long text field maybe?
|
||||
todo: receive all / receive item not setting received date?
|
||||
|
||||
todo: button to set part price from received cost
|
||||
todo: restock required feature
|
||||
dialog? See notes case 3849
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
:label="label"
|
||||
:rules="rules"
|
||||
:error-messages="errorMessages"
|
||||
:append-outer-icon="appendOuterIcon"
|
||||
@click:append-outer="$emit('gz-append-outer')"
|
||||
></v-text-field>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
/* Xeslint-disable //@click:append-outer="appendOuter"*/
|
||||
//https://dm4t2.github.io/vue-currency-input/guide/#introduction :value="formattedValue"
|
||||
//https://codesandbox.io/s/vue-template-kd7d1?fontsize=14&module=%2Fsrc%2FApp.vue
|
||||
//https://github.com/dm4t2/vue-currency-input
|
||||
@@ -36,7 +38,8 @@ export default {
|
||||
value: { type: Number, default: null },
|
||||
readonly: { type: Boolean, default: false },
|
||||
disabled: { type: Boolean, default: false },
|
||||
errorMessages: { type: Array, default: null }
|
||||
errorMessages: { type: Array, default: null },
|
||||
appendOuterIcon: { type: String, default: null }
|
||||
},
|
||||
computed: {
|
||||
currencyValue() {
|
||||
|
||||
@@ -114,7 +114,7 @@ import {
|
||||
faLink,
|
||||
faListOl,
|
||||
faListUl,
|
||||
//faMagic,
|
||||
faMagic,
|
||||
faMapMarkerAlt,
|
||||
faMapMarkedAlt,
|
||||
faMinus,
|
||||
@@ -287,7 +287,7 @@ library.add(
|
||||
faLink,
|
||||
faListOl,
|
||||
faListUl,
|
||||
//faMagic,
|
||||
faMagic,
|
||||
faMapMarkerAlt,
|
||||
faMapMarkedAlt,
|
||||
faMinus,
|
||||
@@ -892,12 +892,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "list-ul"]
|
||||
}
|
||||
},
|
||||
// ayiMagic: {
|
||||
// component: FontAwesomeIcon,
|
||||
// props: {
|
||||
// icon: ["fas", "magic"]
|
||||
// }
|
||||
// },
|
||||
ayiMagic: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "magic"]
|
||||
}
|
||||
},
|
||||
ayiMapMarker: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user