1 reply [Last post]
nickwilson's picture
Offline
Joined: 05/06/2011
Juice: 8
Was this information Helpful?

There is a rule 'Show prices excluding VAT to the superuser' that can be enabled under...

Administer/Store administration/Configuration/Tax rates and settings/VAT settings

This rules means the primary drupal admin user sees the price excluding VAT. This works fine and non-admin users still see the full price inclusive of VAT.
However, all other users with full admin rights only ever see the price exclusive of VAT whether the rule is enabled or not.

I changed the code in the uc_vat.module in function uc_vat_exclude_vat()

from...

return $user->uid == 1 ? variable_get('uc_vat_exclude_superuser', FALSE) : user_access('show prices excluding VAT');

to...

return (($user->uid == 1) || (user_access('show prices excluding VAT'))) ? variable_get('uc_vat_exclude_superuser', FALSE) : FALSE;

This means all admin users are now affected by the rule and so can now see the prices inclusive of VAT if the rule is disabled.

I think this change is appropriate and in the spirit of the module but let me know if anyone thinks otherwise Smiling

cheers

consola's picture
Offline
Joined: 03/13/2011
Juice: 7
Re: uc_vat - Show prices excluding VAT to the superuser - tweak

Thanks mate! , your solution works well.