Add line on change item
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
b9a482fc37
commit
d51356f11b
|
@ -118,7 +118,7 @@
|
|||
show-field="name"
|
||||
value-field="id"
|
||||
search-function="$ctrl.itemSearchFunc($search)"
|
||||
on-change="sale.quantity && $ctrl.onChangeQuantity(sale)"
|
||||
on-change="$ctrl.onChangeQuantity(sale)"
|
||||
order="id DESC"
|
||||
tabindex="1">
|
||||
<tpl-item>
|
||||
|
|
|
@ -464,10 +464,12 @@ class Controller {
|
|||
* Updates the sale quantity for existing instance
|
||||
*/
|
||||
onChangeQuantity(sale) {
|
||||
if (!sale.quantity) return;
|
||||
|
||||
if (!sale.id)
|
||||
this.addSale(sale);
|
||||
else
|
||||
this.updateQuantity(sale);
|
||||
return this.addSale(sale);
|
||||
|
||||
this.updateQuantity(sale);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue