Update functions.lib.php
This commit is contained in:
parent
927d0a2fa1
commit
91cf865583
@ -5689,13 +5689,13 @@ function get_localtax_by_third($local)
|
||||
{
|
||||
global $db, $mysoc;
|
||||
|
||||
$sql = " SELECT t.localtax$local as localtax";
|
||||
$sql = " SELECT t.localtax".$local." as localtax";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t inner join ".MAIN_DB_PREFIX."c_country as c ON c.rowid=t.fk_pays";
|
||||
$sql .= " WHERE c.code = '".$db->escape($mysoc->country_code)."' AND t.active = 1 AND t.taux=(";
|
||||
$sql .= " SELECT max(tt.taux) FROM ".MAIN_DB_PREFIX."c_tva as tt inner join ".MAIN_DB_PREFIX."c_country as c ON c.rowid=tt.fk_pays";
|
||||
$sql .= " WHERE c.code = '".$db->escape($mysoc->country_code)."' AND tt.active = 1";
|
||||
$sql .= " ) ";
|
||||
$sql .= " AND t.localtax${local}_type > 0";
|
||||
$sql .= " AND t.localtax".$local."_type > 0";
|
||||
$sql .= " ORDER BY rowid DESC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user