feat: show VAT breakdown on discount checkout — discount, net, 9% VAT, final amount
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 5m56s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 5m56s
This commit is contained in:
@@ -18,6 +18,17 @@ public partial class Checkout
|
||||
private string? _notes;
|
||||
private bool _placing;
|
||||
|
||||
private const decimal VAT_RATE = 0.09m;
|
||||
|
||||
/// <summary>مبلغ درگاه قبل از مالیات (جمع کل - تخفیف)</summary>
|
||||
private long NetGatewayAmount => DiscountCart.TotalPrice - DiscountCart.TotalDiscount;
|
||||
|
||||
/// <summary>مالیات بر ارزش افزوده ۹٪</summary>
|
||||
private long VatAmount => (long)(NetGatewayAmount * VAT_RATE);
|
||||
|
||||
/// <summary>مبلغ نهایی قابل پرداخت (شامل VAT)</summary>
|
||||
private long FinalGatewayAmount => NetGatewayAmount + VatAmount;
|
||||
|
||||
private bool CanPlaceOrder => DiscountCart.Items.Count > 0 && _selectedAddress is not null;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
||||
Reference in New Issue
Block a user