Taxes, tips and bugfixes #10

Merged
pitmutt merged 24 commits from dev into master 2023-10-28 12:07:37 +00:00
2 changed files with 10 additions and 4 deletions
Showing only changes of commit 0d5fa1a666 - Show all commits

View file

@ -52,19 +52,19 @@
</td> </td>
</tr> </tr>
<tr *ngIf="order.taxAmount > 0"> <tr *ngIf="order.taxAmount > 0">
<td class="newOrdertbdetail" style="text-align: right;">Sales Tax</td> <td class="newOrdertbdetail" style="text-align: right;">{{ vE.receiptTax }}</td>
<td class="newOrdertbdetail" style="text-align: right;"></td> <td class="newOrdertbdetail" style="text-align: right;"></td>
<td class="newOrdertbdetail" style="text-align: right;">{{ order.taxAmount | currency: order.currency.toUpperCase() }}</td> <td class="newOrdertbdetail" style="text-align: right;">{{ order.taxAmount | currency: order.currency.toUpperCase() }}</td>
<td></td> <td></td>
</tr> </tr>
<tr *ngIf="order.vatAmount > 0"> <tr *ngIf="order.vatAmount > 0">
<td class="newOrdertbdetail" style="text-align: right;">Value-Added Tax</td> <td class="newOrdertbdetail" style="text-align: right;">{{ vE.receiptVAT }}</td>
<td class="newOrdertbdetail" style="text-align: right;"></td> <td class="newOrdertbdetail" style="text-align: right;"></td>
<td class="newOrdertbdetail" style="text-align: right;">{{ order.vatAmount | currency: order.currency.toUpperCase() }}</td> <td class="newOrdertbdetail" style="text-align: right;">{{ order.vatAmount | currency: order.currency.toUpperCase() }}</td>
<td></td> <td></td>
</tr> </tr>
<tr *ngIf="order.tipAmount > 0"> <tr *ngIf="order.tipAmount > 0">
<td class="newOrdertbdetail" style="text-align: right;">Tip</td> <td class="newOrdertbdetail" style="text-align: right;">{{ vE.receiptTip }}</td>
<td class="newOrdertbdetail" style="text-align: right;"></td> <td class="newOrdertbdetail" style="text-align: right;"></td>
<td class="newOrdertbdetail" style="text-align: right;">{{ order.tipAmount | currency: order.currency.toUpperCase() }}</td> <td class="newOrdertbdetail" style="text-align: right;">{{ order.tipAmount | currency: order.currency.toUpperCase() }}</td>
<td></td> <td></td>

View file

@ -56,7 +56,10 @@ export class ReceiptComponent implements OnInit {
receiptQtyLbl : '', receiptQtyLbl : '',
receiptOrderPrice : '', receiptOrderPrice : '',
receiptInvalidId : '', receiptInvalidId : '',
receiptInfoNotavail : '' receiptInfoNotavail : '',
receiptTax : '',
receiptVAT : '',
receiptTip : ''
} }
constructor( constructor(
@ -102,6 +105,9 @@ export class ReceiptComponent implements OnInit {
this.vE.receiptOrderPrice = response.data.receipt_order_price; this.vE.receiptOrderPrice = response.data.receipt_order_price;
this.vE.receiptInvalidId = response.data.receipt_invalid_id; this.vE.receiptInvalidId = response.data.receipt_invalid_id;
this.vE.receiptInfoNotavail = response.data.receipt_info_notavail; this.vE.receiptInfoNotavail = response.data.receipt_info_notavail;
this.vE.receiptTax = response.data.receipt_tax;
this.vE.receiptVAT = response.data.receipt_vat;
this.vE.receiptTip = response.data.receipt_tip;
}, },
error => { console.log('Error >> ',error); } error => { console.log('Error >> ',error); }
); );