Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to calculate TAX/VAT on SHIPPING ADDRESS not BILLING ADDRESS


Guest

Recommended Posts

An issue has arisen when a customer has their home address (BILLING ADDRESS) registered outside of the UK (EU) but their DELIVERY ADDRESS is inside the UK.

 

Because their billing address is outside the UK/EU they don't get charged TAX/VAT.

 

:huh: How do i change the calculation of TAX/VAT so it is based on the SHIPPING ADDRESS?

 

many thanks

:thumbsup:

Link to comment
Share on other sites

Think i might have found my own answer:

 

in the file /includes/classes/order.php online 147 (ish) you will find:

 

	$tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'");

 

The trick is the order of the following:

 

$billto : $sendto

 

Which ever goes last seems to be where the TAX/VAT is calculated. I've done some quick tests and it seems to check out 100%.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...