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

Merge pull request #12 from piyushsinghania/fix/partial-payment-ledger-entry-issue

Fixed the general ledger entry issue while doing partial payments
This commit is contained in:
Ankit Singhaniya 2021-10-21 23:22:09 +05:30 committed by GitHub
commit 17bf07a3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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