feat: change default mail template messages

This commit is contained in:
Ahmed Bouhuolia
2024-11-26 13:15:15 +02:00
parent 7b5f0d3930
commit 4f57782be4
8 changed files with 81 additions and 61 deletions

View File

@@ -20,6 +20,9 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
'total',
'totalLabel',
'subtotal',
'subtotalLabel',
'paidAmount',
'paidAmountLabel',
@@ -64,7 +67,7 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
* @returns {string}
*/
public receiptNumber(): string {
return this.options.receipt.number;
return this.options.receipt.receiptNumber;
}
/**
@@ -72,7 +75,7 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
* @returns {string}
*/
public receiptNumberLabel(): string {
return 'Receipt Number';
return 'Receipt # {receiptNumber}';
}
/**
@@ -95,7 +98,7 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
* Receipt total.
*/
public total(): string {
return this.options.receipt.totalFormatted;
return this.options.receipt.formattedAmount;
}
/**
@@ -106,6 +109,22 @@ export class GetSaleReceiptMailTemplateAttributesTransformer extends Transformer
return 'Total';
}
/**
* Receipt subtotal.
* @returns {string}
*/
public subtotal(): string {
return this.options.receipt.formattedSubtotal;
}
/**
* Receipt subtotal label.
* @returns {string}
*/
public subtotalLabel(): string {
return 'Subtotal';
}
/**
* Receipt mail items attributes.
*/