[ https://issues.apache.org/jira/browse/OFBIZ-5163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13962932#comment-13962932 ] Paul Foxworthy commented on OFBIZ-5163: --------------------------------------- Hi Jacques, The thread on the mailing list preceding this Jira ticket is at http://ofbiz.135035.n4.nabble.com/More-detail-on-r1449615-please-td4639907.html#a4640061 . Saroj's change only worked for order items with quantity one. Any other quantity would not work correctly. That's the reason the change was reverted. My proposal for a more general fix in the comment above dated 13 April 2013 is still just a proposal. There is a real issue here that should be addressed, but it still needs some work. We can reopen the issue when there is a patch. > Tax calculated on unit price before adjustments > ----------------------------------------------- > > Key: OFBIZ-5163 > URL: https://issues.apache.org/jira/browse/OFBIZ-5163 > Project: OFBiz > Issue Type: Bug > Components: accounting > Affects Versions: SVN trunk > Reporter: Paul Foxworthy > Assignee: Paul Foxworthy > Attachments: OFBIZ-5163.patch, OFBIZ-5163_Edit.patch > > > Some taxes cut in at a minimum item price. A promotional adjustment can lower the price the customer is paying, so they should not have to pay any tax. However, the tax is being calculated on the base item price, before any promotional adjustment. > r1449615 was a partial fix, but only when the order quantity is one. In the more complex situation where the quantity is greater than one, at present the tax calculation does not have the information it needs. All it has is the base unit price for the item ("itemPrice"), and the total amount for the item ("itemAmount", which is itemPrice * quantity - adjustments). > Here's what I think needs to happen. > 1. We need to define two categories of item adjustments: > - those which modify the price, including promotional pricing and discounts > - adjustments for additional services such as shipping, an extended warranty and so on. > The first category should be combined with the product price before tax calculations are done. The second category may need to be taxed separately. > So a new attribute should be added to the OrderAdjustment entity to say which it is. > 2. An additional list of data needs to be supplied to the tax calculation, a list of adjusted unit prices with promotional discounts and any other adjustments in the first category above. The tax calculation would, of course, use the adjusted unit price, so the change at https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?hb=true#to215 > won't be needed any more. > If we do these, there would be no need for the calcTaxAfterPromotion attribute. In effect, it would always apply, for adjustments in category 1. If anyone didn't want that behaviour, all they would need to do is define an adjustment in category 2, not 1. > This issue was found and worked on by Tom at ANTWebsystems, thanks for your help. -- This message was sent by Atlassian JIRA (v6.2#6252) |
Free forum by Nabble | Edit this page |