We have a client with a UK site were users expect to see prices inc. taxes at all points. The VAT module does this brilliantly, however when viewing order totals, the total is always the last item e.g. :

Order total 
------------
Subtotal :  £16.16
UK shipping : £2.00
Subtotal excluding taxes : £18.16
VAT (tax) : £3.18
Order total : £21.34

However, the client (and their customers) expects :

Order total 
------------
Subtotal : £17.00
UK shipping : £2.35
Total : £21.34
Of which is VAT (tax) : £3.18 

To achieve this, the total line item needs to be subject to the same weight based ordering that the other line items use.

It turns out the invoicing system already supports this correctly, but the default customer.itpl.php bypasses the hard work already done and hard codes total and subtotal into the document.

The other place where total is hard coded is in the Payment preview pane on the checkout.

The two attached patches solve the above two problems. The patch for payment isn't perfect and could do with a little refinement as the weights for each line item do not match those set in the invoicing section, but its a start.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Active » Needs review

Sounds like a good idea. Looking for someone to apply the patch and evaluate whether it works and make sure it doesn't break things ...

longwave’s picture

TR’s picture

Version: 6.x-2.4 » 6.x-2.x-dev
Status: Needs review » Needs work

Let's see what the testbot has to say...

TR’s picture

Status: Needs work » Needs review
TR’s picture

SilviuChingaru’s picture

TR’s picture

Version: 6.x-2.x-dev » 8.x-4.x-dev
Status: Needs review » Active

I think we can do this in D8 now without too much trouble.

longwave’s picture