feat: item-level discount

This commit is contained in:
Ahmed Bouhuolia
2024-12-11 15:05:50 +02:00
parent 5a8d9cc7e8
commit 8cd1b36a02
23 changed files with 176 additions and 7 deletions

View File

@@ -43,13 +43,14 @@ export const transformInvoiceToPdfTemplate = (
description: entry.description,
rate: entry.rateFormatted,
quantity: entry.quantityFormatted,
discount: entry.discountFormatted,
total: entry.totalFormatted,
})),
taxes: invoice.taxes.map((tax) => ({
label: tax.name,
amount: tax.taxRateAmountFormatted,
})),
showLineDiscount: invoice.entries.some((entry) => entry.discountFormatted),
customerAddress: contactAddressTextFormat(invoice.customer),
};
};