feat: enhance discount and adjustment formatting

This commit is contained in:
Ahmed Bouhuolia
2024-12-04 12:00:22 +02:00
parent fabc88c81a
commit 6ab461a212
10 changed files with 24 additions and 12 deletions

View File

@@ -113,6 +113,7 @@ export class SaleReceiptTransformer extends Transformer {
protected discountAmountFormatted = (receipt: ISaleReceipt): string => {
return formatNumber(receipt.discountAmount, {
currencyCode: receipt.currencyCode,
excerptZero: true,
});
};
@@ -135,6 +136,7 @@ export class SaleReceiptTransformer extends Transformer {
protected adjustmentFormatted = (receipt: ISaleReceipt): string => {
return this.formatMoney(receipt.adjustment, {
currencyCode: receipt.currencyCode,
excerptZero: true,
});
};