mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +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() {
|
async afterSubmit() {
|
||||||
await this.getPosting().post();
|
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() {
|
async afterRevert() {
|
||||||
|
Loading…
Reference in New Issue
Block a user