mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: payment receive subtotal shouldn't be rounded
This commit is contained in:
@@ -10,6 +10,7 @@ export class PaymentReceiveTransfromer extends Transformer {
|
||||
*/
|
||||
public includeAttributes = (): string[] => {
|
||||
return [
|
||||
'subtotalFormatted',
|
||||
'formattedPaymentDate',
|
||||
'formattedAmount',
|
||||
'formattedExchangeRate',
|
||||
@@ -26,6 +27,18 @@ export class PaymentReceiveTransfromer extends Transformer {
|
||||
return this.formatDate(payment.paymentDate);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve the formatted payment subtotal.
|
||||
* @param {IPaymentReceive} payment
|
||||
* @returns {string}
|
||||
*/
|
||||
protected subtotalFormatted = (payment: IPaymentReceive): string => {
|
||||
return formatNumber(payment.amount, {
|
||||
currencyCode: payment.currencyCode,
|
||||
money: false,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve formatted payment amount.
|
||||
* @param {ISaleInvoice} invoice
|
||||
|
||||
Reference in New Issue
Block a user