feat: add VAT display to all DiscountStore pages — Products (note), ProductDetail (breakdown), Cart (summary line), Checkout (refactor to VATService), OrderDetail (financial summary)
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -12,12 +12,28 @@ public partial class OrderDetail
|
||||
public string? PaymentResult { get; set; }
|
||||
|
||||
[Inject] private DiscountOrderService DiscountOrderService { get; set; } = default!;
|
||||
[Inject] private VATService VAT { get; set; } = default!;
|
||||
|
||||
private DiscountOrderDetail? _order;
|
||||
private bool _loading = true;
|
||||
private string? _paymentMessage;
|
||||
private MudBlazor.Severity _paymentSeverity;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
await VAT.LoadAsync();
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>مبلغ قبل از مالیات (جمع کل - اعتبار)</summary>
|
||||
private long PreVatGateway => _order is null ? 0 : (_order.TotalPrice - _order.DiscountBalanceUsed);
|
||||
|
||||
/// <summary>مالیات بر ارزش افزوده</summary>
|
||||
private long OrderVatAmount => VAT.CalculateVAT(PreVatGateway);
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// نمایش پیام نتیجه پرداخت (بعد از بازگشت از درگاه)
|
||||
|
||||
Reference in New Issue
Block a user