Code error in TaxService.cs

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
There seems to be a coding error in the if statement at Line 426 of TaxService.cs


            else
            {
                //"price" doesn't include tax
                if (includingTax)
                {
                    //we should calculate price WITH tax
                    //do it only when price is taxable
                    if (isTaxable)


I think it should be:


                 //"price" doesn't include tax
                 if (!includingTax)


the method is

public virtual decimal GetProductPrice(Product product, int taxCategoryId,
            decimal price, bool includingTax, Customer customer,
            bool priceIncludesTax, out decimal taxRate)

-  perhaps this overloaded method is not actually used? I've built a tax plugin and didn't encounter any problems with the functionality.

Anyway, thought you'd want to be notified.

Cheers!
Simon
7 years ago
Hi Simon,

No, everything is correct. This comment is related to the outer "else" statement. Not to the following "if (includingTax)"
7 years ago
My mistake! Thanks for checking it out.

Simon
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.