Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order invoice price incl tax check #293

Merged

Conversation

jithendraprasad9999
Copy link
Contributor

@jithendraprasad9999 jithendraprasad9999 commented Jul 30, 2022

Resolves #294 #295
Type: bugfix

Issue

1.In order invoice PDF unit price, item price , subtotal amount and discount price is configured with including tax property's, This leads confusion to customer.
2. Header text and footer are coming with some junk characters in PDF.

Solution

1.For all the above prices added check to include or exclude tax based on CustomerTaxDisplayTypeId from order details .
2.Decoded header text and footer text with Html.Raw attribute to avoid junk characters.

Breaking changes

None

Testing

  1. Place an order , in order history page select respective order and tap on details button . And then click on "Print invoice button"
  2. Based on TaxDisplayType setting, prices will get populate either with including tax or excluding tax

Balachandra and others added 30 commits December 10, 2021 09:07
check if the blob exists before returning the URL
@{
var logoPicture = await _pictureService.GetPictureById(_pdfSettings.LogoPictureId);
var logoExists = logoPicture != null;
var limitbyVendor = !string.IsNullOrEmpty(Model.Item2);
var limitbyVendor = !string.IsNullOrEmpty(Model.Item2);
var priceIncludesTax = workContext.TaxDisplayType == TaxDisplayType.IncludingTax;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TaxDisplayType should get from the Order

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KrzysztofPajak updated code as per feedback

@@ -87,6 +88,7 @@
string paymentMethodStr = paymentMethod != null ? paymentMethod.FriendlyName : order.PaymentMethodSystemName;
}
<li>@(string.Format(_translationService.GetResource("PDFInvoice.PaymentMethod", order.CustomerLanguageId), paymentMethodStr))</li>
@await Component.InvokeAsync("Widget", new { widgetZone = "payment_method_below", additionalData = @order.Id })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the name for the widget zone, better name will be i.e: pdf_payment_method_below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KrzysztofPajak updated the zone name

@KrzysztofPajak
Copy link
Member

Thanks for contributing!

@KrzysztofPajak KrzysztofPajak merged commit 5c293ae into grandnode:master Aug 2, 2022
@Nikhil13x Nikhil13x deleted the order-invoice-price-incl-tax-check branch April 18, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants