fix(server): tax tracking on sale invoices

This commit is contained in:
Ahmed Bouhuolia
2023-09-23 14:19:42 +02:00
parent 92ac0dbd25
commit 1148fef9ad
6 changed files with 48 additions and 4 deletions

View File

@@ -71,6 +71,8 @@ export class CommandSaleInvoiceDTOTransformer {
...entry,
}));
const asyncEntries = await composeAsync(
// Associate tax rate from tax id to entries.
this.taxDTOTransformer.assocTaxRateFromTaxIdToEntries(tenantId),
// Associate tax rate id from tax code to entries.
this.taxDTOTransformer.assocTaxRateIdFromCodeToEntries(tenantId),
// Sets default cost and sell account to invoice items entries.

View File

@@ -181,7 +181,7 @@ export class SaleInvoiceGLEntries {
index: number
): ILedgerEntry => {
const commonEntry = this.getInvoiceGLCommonEntry(saleInvoice);
const localAmount = entry.amount * saleInvoice.exchangeRate;
const localAmount = entry.amountExludingTax * saleInvoice.exchangeRate;
return {
...commonEntry,