Fix regression

This commit is contained in:
Laurent Destailleur 2018-09-01 13:12:09 +02:00
parent 79ee31df5c
commit dee9442720

View File

@ -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";