fix: display adjustment in minues

This commit is contained in:
Ahmed Bouhuolia
2024-12-08 14:47:03 +02:00
parent 46719ef361
commit 11d7a40326
9 changed files with 29 additions and 8 deletions

View File

@@ -20,6 +20,7 @@ export class VendorCreditTransformer extends Transformer {
'discountAmountFormatted',
'discountPercentageFormatted',
'adjustmentFormatted',
'totalFormatted',
'entries',
'attachments',
];
@@ -118,6 +119,15 @@ export class VendorCreditTransformer extends Transformer {
});
};
/**
* Retrieves the formatted total.
* @param {IVendorCredit} credit
* @returns {string}
*/
protected totalFormatted = (credit) => {
return formatNumber(credit.total, { currencyCode: credit.currencyCode });
};
/**
* Retrieves the entries of the bill.
* @param {IVendorCredit} vendorCredit