mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +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:
commit
17bf07a3ae
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user