Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
This commit is contained in:
commit
80f1cd8857
@ -1098,7 +1098,7 @@ class Setup extends DolibarrApi
|
|||||||
* @param int $page Page number (starting from zero)
|
* @param int $page Page number (starting from zero)
|
||||||
* @param string $zipcode To filter on zipcode
|
* @param string $zipcode To filter on zipcode
|
||||||
* @param string $town To filter on city name
|
* @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)"
|
* @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
|
* @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 = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t";
|
||||||
$sql .= " AND t.active = ".$active;
|
$sql .= " WHERE t.active = ".$active;
|
||||||
if ($zipcode) {
|
if ($zipcode) {
|
||||||
$sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'";
|
$sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user