entries of items will be reflected automatically to the entries of form items
This commit is contained in:
parent
4a3ac3ac4e
commit
57a664be98
14
resources/assets/js/views/common/documents.js
vendored
14
resources/assets/js/views/common/documents.js
vendored
@ -219,6 +219,20 @@ const app = new Vue({
|
|||||||
this.totals.sub = sub_total;
|
this.totals.sub = sub_total;
|
||||||
this.totals.taxes = totals_taxes;
|
this.totals.taxes = totals_taxes;
|
||||||
this.totals.total = grand_total;
|
this.totals.total = grand_total;
|
||||||
|
|
||||||
|
this.form.items.forEach(function(form_item, form_index) {
|
||||||
|
let item = this.items[form_index];
|
||||||
|
|
||||||
|
for (const [key, value] of Object.entries(item)) {
|
||||||
|
if (key == 'add_tax' || key == 'tax_ids' || key == 'add_discount') {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if (form_item[key] === undefined) {
|
||||||
|
form_item[key] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
calculateTotalsTax(totals_taxes, id, name, price) {
|
calculateTotalsTax(totals_taxes, id, name, price) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user