2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00

Merge pull request #2 from piyushsinghania/fix/automatic-updation-of-tax-rate-on-changing-item

Applying change to child first and then to parent in a child document
This commit is contained in:
Ankit Singhaniya 2021-10-16 01:57:35 +05:30 committed by GitHub
commit be52dc5104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ module.exports = class BaseDocument extends Observable {
// always run applyChange from the parentdoc // always run applyChange from the parentdoc
if (this.meta.isChild && this.parentdoc) { if (this.meta.isChild && this.parentdoc) {
await this.applyChange(fieldname);
await this.parentdoc.applyChange(this.parentfield); await this.parentdoc.applyChange(this.parentfield);
} else { } else {
await this.applyChange(fieldname); await this.applyChange(fieldname);