mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Update outstanding of Invoice after payment submit
This commit is contained in:
parent
cc28e0ee45
commit
edd9f35756
@ -17,6 +17,11 @@ module.exports = class PaymentServer extends BaseDocument {
|
||||
|
||||
async afterSubmit() {
|
||||
await this.getPosting().post();
|
||||
for (let row of this.for) {
|
||||
if (row.referenceType === 'Invoice') {
|
||||
await frappe.db.setValue('Invoice', row.referenceName, 'outstandingAmount', 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async afterRevert() {
|
||||
|
Loading…
Reference in New Issue
Block a user