Hello,
In the ecommerce application I see there is one path of user actions
that leads to the display of the total product price in the cart where
the sales tax is included twice (also in the trunk).
This happens when:
- navigating away from the chechoutreview screen (not finalizing order)
- the productStore setting "Show prices with VAT tax included = J".
Technically speaking I think the following is happening:
- When going from the checkoutoptions to the checkoutreview screen the
tax is calculated for the cart, by calling the function
cart.getTotalSalesTax(); in checkoutreview.groovy.
- The debugger mentions this: TaxAuthorityServices.java:118:INFO ] For
productId [zszSanRemo1] added [38.000] of tax to price for geoId
[NLD], new price is [238.000]
- In shoppingcart.java, in the getDisplayGrandTotal function, which
output is used to show the cart prices, the tax is added. (to the
price that is already including the sales tax)
When in ShoppingCart.java in the function getDisplayGrandTotal,
replacing
return
this
.getDisplaySubTotal
().add
(this
.getTotalShipping
()).add
(this.getTotalSalesTax()).add(this.getOrderOtherAdjustmentTotal());
with
return
this
.getDisplaySubTotal
().add
(this.getTotalShipping()).add(this.getOrderOtherAdjustmentTotal());
the prices are shown as I would expect them to show:
"Show prices with VAT tax included = J" you always want to display
prices including sales tax and, with value N never, also not after you
abort the checkout proces.
I've been working with OFBiz a bit longer now and usually there are
some good reasons to do things, as I expect there are for the above
mentioned example. However this leads to undesired results when
showing prices including sales tax?
Like to read your thoughts on this.
Met vriendelijke groet,
Willem Janssen
T: 073 532 74 11
F: 073 532 74 12
M: 06 27 888 464
E: i...@zchok.nl
W: www.zchok.nl