PDA

View Full Version : Shipping costs with/without tax in admin/orders/edit



markamccullough
01-14-2014, 08:00 AM
Hi

I have a shop, with customer groups 0,1,2,3 and 4. Customer group 0 is for private customers and displays prices including tax. All other groups are for business customers and display prices excluding tax.

If I edit an order in admin > order > edit, on the "Shipping Quotes:" form the costs are always displayed/calculated including tax, irrespective of the customer's group. Is this a known bug?

Thanks i advance
Mark

markamccullough
01-17-2014, 08:14 AM
Actually, I've investigated further and it's more complicated than I described. Here's what's happening.

- In the "Shipping Quotes", the prices are always displayed including tax.
- But when I select one of the shipping quotes, it gets added to the order totals and displayed NOT including tax.
- The order totals are recalculated and displayed in a confusing mixture of with tax / without tax

For example:
Subtotal: 393.75 (incl. tax)
Delivery: 115.00 (excl. tax)
Tax(25%): 107.50
Total: 537.50 (incl. tax)

In the shipping quotes, the delivery cost is quotes as 143.75 in this example (i.e. incl. tax).
393.75 + 143.75 = 537.50 -- Which is correct,
Tax (@25%) = 537.50 x (0.25 / 1 + 0.25) = 107.50 - also correct

This should really be displayed like this instead for customers who have prices excl. tax:
Subtotal: 315.00 (excl. tax)
Delivery: 115.00 (excl. tax)
Tax(25%): 107.50
Total: 537.50 (incl. tax)

..or like this for customers who have prices incl. tax:
Subtotal: 393.75 (incl. tax)
Delivery: 143.75 (incl. tax)
Tax(25%), included: 107.50
Total: 537.50 (incl. tax)

pgmarshall
01-17-2014, 12:20 PM
I do not think the edit orders page is fully compliant with the customers group code ... although I could be wrong.

markamccullough
01-20-2014, 12:12 AM
Looks like that is the case. Are there any plans to make it compliant?

Otherwise - I've looked at the code of edit_orders.php and edit_orders_ajax.php a bit, but am struggling to get my head around where I would need to change it to calculate the totals differently for different customer groups. Any tips?