The VAT tax seems to be added to the price because of following code in
TaxAuthorityServices.java:
TaxAuthorityServices.java
// add up amounts from adjustments (amount OR exemptAmount, sourcePercentage)
for (GenericValue taxAdjustment : taxAdustmentList) {
if
("SALES_TAX".equals(taxAdjustment.getString("orderAdjustmentTypeId"))) {
taxPercentage =
taxPercentage.add(taxAdjustment.getBigDecimal("sourcePercentage"));
BigDecimal adjAmount =
taxAdjustment.getBigDecimal("amount");
taxTotal = taxTotal.add(adjAmount);
priceWithTax =
priceWithTax.add(adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding));
Debug.logInfo("For productId [" + productId + "] added
[" + adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding) + "] of
tax to price for geoId [" + taxAdjustment.getString("taxAuthGeoId") + "], new
price is [" + priceWithTax + "]", module);
Somehow, somewhere "orderAdjustmentTypeId" is set to "SALES_TAX" eventhough I
am not aware where this might be done as I have created the tax as a VAT-Tax.
Since above code detects: if
("SALES_TAX".equals(taxAdjustment.getString("orderAdjustmentTypeId))) as true,
subsequently the line
priceWithTax =
priceWithTax.add(adjAmount.divide(quantity,salestaxCalcDecimals,salestaxRounding));
is executed which is responsible for adding the VAT tax.
I have tracked this by using "verbose" - logging.
By comenting out above code the prices are correctly indicated when the product
is displayed in the ecommerce shop.
Nevertheless when performing Quick Check-Out and shipping the order to a
Chilean address once again a Sales Tax of 19% is added.
So far I have not found out which part of the code is responsible for adding
the Sales Tax.
Help on this subject is much appreciated.
Regards,
Peter
---
El software de antivirus Avast ha analizado este correo electrónico en busca de
virus.
http://www.avast.com