Validate amount when adding receiving quantity
This commit is contained in:
parent
99fbe0e5ec
commit
6fd233da87
|
@ -314,6 +314,16 @@ export default {
|
|||
},
|
||||
|
||||
addAmount() {
|
||||
|
||||
let amount = parseInt(this.inputQuantity)
|
||||
if (!amount) {
|
||||
this.$buefy.toast.open({
|
||||
message: "Please specify an amount",
|
||||
type: 'is-info',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
let url = `/api/receiving-batch-row/${this.row.uuid}/receive`
|
||||
let params = {
|
||||
row: this.row.uuid,
|
||||
|
@ -325,9 +335,9 @@ export default {
|
|||
}
|
||||
|
||||
if (this.inputUOM == 'CS') {
|
||||
params.cases = this.inputQuantity
|
||||
params.cases = amount
|
||||
} else {
|
||||
params.units = this.inputQuantity
|
||||
params.units = amount
|
||||
}
|
||||
|
||||
this.$http.post(url, params).then(response => {
|
||||
|
|
Loading…
Reference in a new issue