fix: Decimal amounts are rounded when create a new transaction on some transactions types

This commit is contained in:
Ahmed Bouhuolia
2024-02-06 20:31:48 +02:00
parent 374f1acf8a
commit 0f678e61c5
12 changed files with 62 additions and 19 deletions

View File

@@ -8,7 +8,16 @@ export class ItemEntryTransformer extends Transformer {
* @returns {Array}
*/
public includeAttributes = (): string[] => {
return ['rateFormatted', 'totalFormatted'];
return ['quantityFormatted', 'rateFormatted', 'totalFormatted'];
};
/**
* Retrieves the formatted quantitty of item entry.
* @param {IItemEntry} entry
* @returns {string}
*/
protected quantityFormatted = (entry: IItemEntry): string => {
return formatNumber(entry.quantity, { money: false });
};
/**