mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: format created at date
This commit is contained in:
@@ -13,6 +13,7 @@ export class SaleInvoiceTransformer extends Transformer {
|
||||
return [
|
||||
'invoiceDateFormatted',
|
||||
'dueDateFormatted',
|
||||
'createdAtFormatted',
|
||||
'dueAmountFormatted',
|
||||
'paymentAmountFormatted',
|
||||
'balanceAmountFormatted',
|
||||
@@ -48,6 +49,15 @@ export class SaleInvoiceTransformer extends Transformer {
|
||||
return this.formatDate(invoice.dueDate);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve the formatted created at date.
|
||||
* @param invoice
|
||||
* @returns {string}
|
||||
*/
|
||||
protected createdAtFormatted = (invoice): string => {
|
||||
return this.formatDate(invoice.createdAt);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve formatted invoice due amount.
|
||||
* @param {ISaleInvoice} invoice
|
||||
|
||||
Reference in New Issue
Block a user