2
0
mirror of https://github.com/frappe/books.git synced 2025-01-22 22:58:28 +00:00

Fixed the general ledger entry issue while doing partial payments

This commit is contained in:
Piyush Singhania 2021-10-21 23:19:32 +05:30
parent a242979108
commit 4996aed1de

View File

@ -15,9 +15,7 @@ module.exports = class PaymentServer extends BaseDocument {
async getPosting() {
let entries = new LedgerPosting({ reference: this, party: this.party });
await entries.debit(this.paymentAccount, this.amount);
for (let row of this.for) {
await entries.credit(this.account, row.amount);
}
await entries.credit(this.account, this.amount);
return entries;
}