mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
fix: numeric values formating.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Service } from 'typedi';;
|
||||
import { Service } from 'typedi';
|
||||
import { Transformer } from 'lib/Transformer/Transformer';
|
||||
import { formatNumber } from 'utils';
|
||||
|
||||
@@ -13,6 +13,7 @@ export default class SaleInvoiceTransformer extends Transformer {
|
||||
'formattedDueDate',
|
||||
'formattedAmount',
|
||||
'formattedDueAmount',
|
||||
'formattedPaymentAmount',
|
||||
];
|
||||
};
|
||||
|
||||
@@ -50,9 +51,20 @@ export default class SaleInvoiceTransformer extends Transformer {
|
||||
* @param {ISaleInvoice} invoice
|
||||
* @returns {string}
|
||||
*/
|
||||
protected formattedDueAmount(invoice) {
|
||||
protected formattedDueAmount = (invoice): string => {
|
||||
return formatNumber(invoice.dueAmount, {
|
||||
currencyCode: invoice.currencyCode,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve formatted payment amount.
|
||||
* @param {ISaleInvoice} invoice
|
||||
* @returns {string}
|
||||
*/
|
||||
protected formattedPaymentAmount = (invoice): string => {
|
||||
return formatNumber(invoice.paymentAmount, {
|
||||
currencyCode: invoice.currencyCode,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user