mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
fix: Decimal amounts are rounded when create a new transaction on some transactions types
This commit is contained in:
@@ -14,6 +14,7 @@ export class CreditNoteTransformer extends Transformer {
|
||||
'formattedCreditNoteDate',
|
||||
'formattedAmount',
|
||||
'formattedCreditsUsed',
|
||||
'formattedSubtotal',
|
||||
'entries',
|
||||
];
|
||||
};
|
||||
@@ -60,6 +61,15 @@ export class CreditNoteTransformer extends Transformer {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the formatted subtotal.
|
||||
* @param {ICreditNote} credit
|
||||
* @returns {string}
|
||||
*/
|
||||
protected formattedSubtotal = (credit): string => {
|
||||
return formatNumber(credit.amount, { money: false });
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the entries of the credit note.
|
||||
* @param {ICreditNote} credit
|
||||
|
||||
Reference in New Issue
Block a user