feat: implement discount display in various detail drawers

- Added discount amount and percentage display in Bill, Credit Note, Estimate, Invoice, Receipt, and Vendor Credit detail tables.
- Updated models to include discount-related attributes for better data handling.
- Enhanced user interface to show discount information when applicable, improving clarity in financial documents.
This commit is contained in:
Ahmed Bouhuolia
2024-11-30 16:01:29 +02:00
parent dd1392cdc8
commit 73ab92e693
8 changed files with 91 additions and 13 deletions

View File

@@ -31,6 +31,17 @@ export function BillDetailTableFooter() {
textStyle={TotalLineTextStyle.Regular}
/>
))}
{bill.discount_amount > 0 && (
<TotalLine
title={
bill.discount_percentage_formatted
? `Discount [${bill.discount_percentage_formatted}]`
: 'Discount'
}
value={bill.discount_amount_formatted}
textStyle={TotalLineTextStyle.Regular}
/>
)}
<TotalLine
title={<T id={'bill.details.total'} />}
value={bill.total_formatted}