feat: add totalExcludingTax property and update GL entry calculations

This commit is contained in:
Ahmed Bouhuolia
2024-12-12 12:49:52 +02:00
parent 8cd1b36a02
commit d640dc1f40
8 changed files with 24 additions and 14 deletions

View File

@@ -210,11 +210,11 @@ export default class CreditNoteGLEntries {
index: number
): ILedgerEntry => {
const commonEntry = this.getCreditNoteCommonEntry(creditNote);
const localAmount = entry.amount * creditNote.exchangeRate;
const totalLocal = entry.totalExcludingTax * creditNote.exchangeRate;
return {
...commonEntry,
debit: localAmount,
debit: totalLocal,
accountId: entry.sellAccountId || entry.item.sellAccountId,
note: entry.description,
index: index + 2,