mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 23:30:32 +00:00
feat: Link transations with payment methods
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { SaleInvoiceTransformer } from './SaleInvoiceTransformer';
|
||||
|
||||
export class GetInvoicePaymentLinkMetaTransformer extends SaleInvoiceTransformer {
|
||||
/**
|
||||
* Exclude these attributes from payment link object.
|
||||
* @returns {Array}
|
||||
*/
|
||||
public excludeAttributes = (): string[] => {
|
||||
return ['*'];
|
||||
};
|
||||
|
||||
/**
|
||||
* Included attributes.
|
||||
* @returns {string[]}
|
||||
*/
|
||||
public includeAttributes = (): string[] => {
|
||||
return [
|
||||
'companyName',
|
||||
'customerName',
|
||||
'dueAmount',
|
||||
'dueDateFormatted',
|
||||
'invoiceDateFormatted',
|
||||
'total',
|
||||
'totalFormatted',
|
||||
'totalLocalFormatted',
|
||||
'subtotal',
|
||||
'subtotalFormatted',
|
||||
'subtotalLocalFormatted',
|
||||
'dueAmount',
|
||||
'dueAmountFormatted',
|
||||
'paymentAmount',
|
||||
'paymentAmountFormatted',
|
||||
'dueDate',
|
||||
'dueDateFormatted',
|
||||
'invoiceNo',
|
||||
];
|
||||
};
|
||||
|
||||
public customerName(invoice) {
|
||||
return invoice.customer.displayName;
|
||||
}
|
||||
|
||||
public companyName() {
|
||||
return 'Bigcapital Technology, Inc.';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user