- feat: Sales estimates APIs.

- feat: Sales invoices APIs.
- feat: Sales receipts APIs.
- WIP: Sales payment receipts.
- WIP: Purchases bills.
- WIP: Purchases payments made.
This commit is contained in:
Ahmed Bouhuolia
2020-07-22 02:03:12 +02:00
parent 9d9c7c1568
commit 56278a25f0
83 changed files with 5330 additions and 76 deletions

View File

@@ -63,6 +63,10 @@ export default class JournalPoster {
accountId: entry.account,
});
if (entry.contactType && entry.contactId) {
}
// Effect parent accounts of the given account id.
depAccountsIds.forEach((accountId) => {
this._setAccountBalanceChange({
@@ -96,6 +100,22 @@ export default class JournalPoster {
this.balancesChange[accountId] += change;
}
/**
* Set contact balance change.
* @param {Object} param -
*/
_setContactBalanceChange({
contactType,
contactId,
accountNormal,
debit,
credit,
entryType,
}) {
}
/**
* Mapping the balance change to list.
*/
@@ -455,6 +475,9 @@ export default class JournalPoster {
});
}
/**
* Calculates the entries balance change.
*/
calculateEntriesBalanceChange() {
this.entries.forEach((entry) => {
if (entry.credit) {