Merge pull request #1726 from SevanNerse/master

entries of items will be reflected automatically to the entries of fo…
This commit is contained in:
Cüneyt Şentürk 2021-01-04 14:47:47 +03:00 committed by GitHub
commit 0a20a106d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {