mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: link discount to mail receipts
This commit is contained in:
@@ -20,6 +20,16 @@ export class GetSaleEstimateMailStateTransformer extends SaleEstimateTransfromer
|
||||
'subtotal',
|
||||
'subtotalFormatted',
|
||||
|
||||
'discountAmount',
|
||||
'discountAmountFormatted',
|
||||
'discountPercentage',
|
||||
'discountPercentageFormatted',
|
||||
'discountLabel',
|
||||
|
||||
'adjustment',
|
||||
'adjustmentFormatted',
|
||||
'adjustmentLabel',
|
||||
|
||||
'estimateNumber',
|
||||
'entries',
|
||||
|
||||
@@ -97,6 +107,17 @@ export class GetSaleEstimateMailStateTransformer extends SaleEstimateTransfromer
|
||||
return estimate.amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the discount label of the estimate.
|
||||
* @param estimate
|
||||
* @returns {string}
|
||||
*/
|
||||
protected discountLabel(estimate) {
|
||||
return estimate.discountType === 'percentage'
|
||||
? `Discount [${estimate.discountPercentageFormatted}]`
|
||||
: 'Discount';
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the formatted total of the estimate.
|
||||
* @param estimate
|
||||
|
||||
Reference in New Issue
Block a user