fix: add user id to sale invoice non-inventory journal entries.

This commit is contained in:
a.bouhuolia
2021-01-02 16:10:11 +02:00
parent edb439b29e
commit d3cbb3074b
5 changed files with 60 additions and 25 deletions

View File

@@ -538,16 +538,24 @@ export default class JournalCommands {
);
}
/**
*
* @param {ISaleInvoice} saleInvoice
* @param {number} receivableAccountsId
* @param {number} authorizedUserId
*/
saleInvoiceNonInventory(
saleInvoice: ISaleInvoice & {
entries: IItemEntry & { item: IItem };
},
receivableAccountsId: number
receivableAccountsId: number,
authorizedUserId: number,
) {
const commonEntry = {
referenceType: 'SaleInvoice',
referenceId: saleInvoice.id,
date: saleInvoice.invoiceDate,
userId: authorizedUserId,
};
// XXX Debit - Receivable account.