Thanks a lot for this simple, but powerful module.

I've got the task to output the following things in a view for the order sum:
- end price including vat (works!)
- end price excl. vat (works!)
- vat amount (bug!)

The module would work perfectly for this, but there seems to be a bug in line 165:

$amount -= $component['price']['data']['tax_rate']['rate'] * $difference;

This line leads to the result, that the VAT value is always "0", if it's the only field being output.
If I comment out that line, everything works fine. I think you have not yet had that case and did not think about that option though.

I'm not sure what this line does, so I didn't create a patch yet. Do you have a clue how to fix it?

Thanks a lot again for this great module!

Comments

anybody’s picture

Temporary solution: Use https://drupal.org/project/commerce_price_components that works for this case.

xlyz’s picture

Issue summary: View changes

that line was not a bug. it was meant to allow displaying the price tax included withouth discounts. but of course did not cover other use case like yours.

with latest commit is currently possible to configure how tax price shall be calculated, either keeping the actual ones, or on a different base, for max flexibility.

xlyz’s picture

Status: Active » Fixed
anybody’s picture

Cool, thanks a lot!! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.