Merge pull request #20051 from ptibogxiv/patch-3
FIX API REST for setup values
This commit is contained in:
commit
64ddead1b5
@ -1098,7 +1098,7 @@ class Setup extends DolibarrApi
|
||||
* @param int $page Page number (starting from zero)
|
||||
* @param string $zipcode To filter on zipcode
|
||||
* @param string $town To filter on city name
|
||||
* @param int $active Payment term is active or not {@min 0} {@max 1}
|
||||
* @param int $active Town is active or not {@min 0} {@max 1}
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
|
||||
* @return array List of towns
|
||||
*
|
||||
@ -1112,7 +1112,7 @@ class Setup extends DolibarrApi
|
||||
|
||||
$sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t";
|
||||
$sql .= " AND t.active = ".$active;
|
||||
$sql .= " WHERE t.active = ".$active;
|
||||
if ($zipcode) {
|
||||
$sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user