FIX get_product_vat_for_country functions.lib.php
This commit is contained in:
parent
ca2e9f20f6
commit
66d64359cf
@ -5001,7 +5001,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
|
||||
if (empty($conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS))
|
||||
{
|
||||
// If vat of product for the country not found or not defined, we return the first higher vat of country.
|
||||
$sql = "SELECT c.taux as vat_rate, c.code as default_vat_code";
|
||||
$sql = "SELECT t.taux as vat_rate, t.code as default_vat_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql.= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$thirdparty_seller->country_code."'";
|
||||
$sql.= " ORDER BY t.taux DESC, t.code ASC, t.recuperableonly ASC";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user