mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix: Decimal amounts are rounded when create a new transaction on some transactions types
This commit is contained in:
@@ -11,6 +11,7 @@ export class VendorCreditTransformer extends Transformer {
|
||||
public includeAttributes = (): string[] => {
|
||||
return [
|
||||
'formattedAmount',
|
||||
'formattedSubtotal',
|
||||
'formattedVendorCreditDate',
|
||||
'formattedCreditsRemaining',
|
||||
'entries',
|
||||
@@ -37,6 +38,15 @@ export class VendorCreditTransformer extends Transformer {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the vendor credit formatted subtotal.
|
||||
* @param {IVendorCredit} vendorCredit
|
||||
* @returns {string}
|
||||
*/
|
||||
protected formattedSubtotal = (vendorCredit): string => {
|
||||
return formatNumber(vendorCredit.amount, { money: false });
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve formatted credits remaining.
|
||||
* @param {IVendorCredit} credit
|
||||
|
||||
Reference in New Issue
Block a user