From 0df5d6a595f62e0eb3191ebe5ea6b731e91d7785 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Mon, 16 Feb 2026 22:22:07 +0330 Subject: [PATCH] =?UTF-8?q?feat:=20show=20VAT=20breakdown=20on=20discount?= =?UTF-8?q?=20checkout=20=E2=80=94=20discount,=20net,=209%=20VAT,=20final?= =?UTF-8?q?=20amount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/DiscountStore/Checkout.razor | 32 +++++++++++++++---- .../Pages/DiscountStore/Checkout.razor.cs | 11 +++++++ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor b/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor index 57ce153..7de3d94 100644 --- a/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor +++ b/src/FrontOffice.Main/Pages/DiscountStore/Checkout.razor @@ -103,15 +103,33 @@ - جمع کل: - - @FormatPrice(DiscountCart.TotalPrice) تومان - + جمع کل: + @FormatPrice(DiscountCart.TotalPrice) تومان - - تخفیف هر محصول به‌صورت کامل از کیف تخفیفی اعمال می‌شود. - + + تخفیف از کیف تخفیفی: + @FormatPrice(DiscountCart.TotalDiscount)- تومان + + + + مبلغ پس از تخفیف: + @FormatPrice(NetGatewayAmount) تومان + + + + مالیات بر ارزش افزوده (۹٪): + @FormatPrice(VatAmount)+ تومان + + + + + + مبلغ قابل پرداخت: + + @FormatPrice(FinalGatewayAmount) تومان + + مبلغ درگاه قبل از مالیات (جمع کل - تخفیف) + private long NetGatewayAmount => DiscountCart.TotalPrice - DiscountCart.TotalDiscount; + + /// مالیات بر ارزش افزوده ۹٪ + private long VatAmount => (long)(NetGatewayAmount * VAT_RATE); + + /// مبلغ نهایی قابل پرداخت (شامل VAT) + private long FinalGatewayAmount => NetGatewayAmount + VatAmount; + private bool CanPlaceOrder => DiscountCart.Items.Count > 0 && _selectedAddress is not null; protected override async Task OnInitializedAsync()