mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
21 lines
539 B
TypeScript
21 lines
539 B
TypeScript
import { Transformer } from '@/lib/Transformer/Transformer';
|
|
import { formatNumber } from '@/utils';
|
|
|
|
export class BillPaymentEntryTransformer extends Transformer {
|
|
/**
|
|
* Include these attributes to bill payment object.
|
|
* @returns {Array}
|
|
*/
|
|
public includeAttributes = (): string[] => {
|
|
return ['paymentAmountFormatted'];
|
|
};
|
|
|
|
/**
|
|
* Retreives the payment amount formatted.
|
|
* @returns {string}
|
|
*/
|
|
protected paymentAmountFormatted(entry) {
|
|
return formatNumber(entry.paymentAmount, { money: false });
|
|
}
|
|
}
|