mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: Decimal amounts are rounded when create a new transaction on some transactions types
This commit is contained in:
@@ -12,6 +12,7 @@ export class SaleReceiptTransformer extends Transformer {
|
||||
*/
|
||||
public includeAttributes = (): string[] => {
|
||||
return [
|
||||
'formattedSubtotal',
|
||||
'formattedAmount',
|
||||
'formattedReceiptDate',
|
||||
'formattedClosedAtDate',
|
||||
@@ -37,6 +38,15 @@ export class SaleReceiptTransformer extends Transformer {
|
||||
return this.formatDate(receipt.closedAt);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the estimate formatted subtotal.
|
||||
* @param {ISaleReceipt} receipt
|
||||
* @returns {string}
|
||||
*/
|
||||
protected formattedSubtotal = (receipt: ISaleReceipt): string => {
|
||||
return formatNumber(receipt.amount, { money: false });
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve formatted invoice amount.
|
||||
* @param {ISaleReceipt} estimate
|
||||
|
||||
Reference in New Issue
Block a user