My debugging shows that in uc_vat_apply_tax, line 881, $taxable_amount already incudes VAT if user has no show prices excluding Var permission. If the user has it, $taxable_amount does not include tax, due to line 458 in uc_vat_price_handler_alter().

Can anyone comment on this?

Comments

vitalie’s picture

Further to this, I've added the following lines in uc_vat.module, uc_vat_price_handler_alter function starting with line 461:

  foreach (debug_backtrace(0) as $trace) {
    if ($trace['function'] == 'uc_taxes_apply_item_tax') {
      return;
    } 
  }

It looks like it solves the problem, because if we have uc_taxes_apply_item_tax among the caller functions it means we want to calculate VAT amount and thus do not need to alter the price. However, to display an altered price, we do need it.

alexanderpas’s picture

Status: Active » Closed (duplicate)

I think this is a duplicate of #1170992: double VAT