Let item-level receiving default option reflect "what's left"

This commit is contained in:
Lance Edgar 2022-09-07 20:48:09 -05:00
parent c4ea9758d3
commit ad9024a4a2

View file

@ -284,7 +284,13 @@ export default {
fetch(uuid) { fetch(uuid) {
this.$http.get(`/api/receiving-batch-row/${uuid}`).then(response => { this.$http.get(`/api/receiving-batch-row/${uuid}`).then(response => {
this.row = response.data.data this.row = response.data.data
this.inputUOM = this.row.unit_uom if (this.allowCases && this.row.cases_unconfirmed) {
this.inputQuantity = this.row.cases_unconfirmed
this.inputUOM = 'CS'
} else {
this.inputQuantity = this.row.units_unconfirmed || 1
this.inputUOM = this.row.unit_uom
}
}, response => { }, response => {
if (response.status == 403) { // forbidden; redirect to model index if (response.status == 403) { // forbidden; redirect to model index
this.$buefy.toast.open({ this.$buefy.toast.open({