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

@@ -170,6 +170,7 @@ export class SaleInvoiceTransformer extends Transformer {
protected discountAmountFormatted = (invoice): string => {
return formatNumber(invoice.discountAmount, {
currencyCode: invoice.currencyCode,
excerptZero: true,
});
};
@@ -192,8 +193,9 @@ export class SaleInvoiceTransformer extends Transformer {
protected adjustmentFormatted = (invoice): string => {
return this.formatMoney(invoice.adjustment, {
currencyCode: invoice.currencyCode,
})
}
excerptZero: true,
});
};
/**
* Retrieves formatted total in foreign currency.