mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: add discount and adjustment fields to email templates.
This commit is contained in:
@@ -20,6 +20,12 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
|
||||
'total',
|
||||
'totalLabel',
|
||||
|
||||
'discount',
|
||||
'discountLabel',
|
||||
|
||||
'adjustment',
|
||||
'adjustmentLabel',
|
||||
|
||||
'subtotal',
|
||||
'subtotalLabel',
|
||||
|
||||
@@ -98,7 +104,7 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
|
||||
* Receipt total.
|
||||
*/
|
||||
public total(): string {
|
||||
return this.options.receipt.formattedAmount;
|
||||
return this.options.receipt.totalFormatted;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,12 +115,44 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
|
||||
return 'Total';
|
||||
}
|
||||
|
||||
/**
|
||||
* Receipt discount.
|
||||
* @returns {string}
|
||||
*/
|
||||
public discount(): string {
|
||||
return this.options.receipt?.discountAmountFormatted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Receipt discount label.
|
||||
* @returns {string}
|
||||
*/
|
||||
public discountLabel(): string {
|
||||
return 'Discount';
|
||||
}
|
||||
|
||||
/**
|
||||
* Receipt adjustment.
|
||||
* @returns {string}
|
||||
*/
|
||||
public adjustment(): string {
|
||||
return this.options.receipt?.adjustmentFormatted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Receipt adjustment label.
|
||||
* @returns {string}
|
||||
*/
|
||||
public adjustmentLabel(): string {
|
||||
return 'Adjustment';
|
||||
}
|
||||
|
||||
/**
|
||||
* Receipt subtotal.
|
||||
* @returns {string}
|
||||
*/
|
||||
public subtotal(): string {
|
||||
return this.options.receipt.formattedSubtotal;
|
||||
return this.options.receipt.subtotalFormatted;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user