Forgot withregion condition if we want no state code

This commit is contained in:
Rui Strecht 2018-02-07 16:06:58 +00:00
parent 8c732a1443
commit 3a7cb43ad5

View File

@ -517,10 +517,15 @@ function getState($id,$withcode='',$dbtouse=0,$withregion='',$outputlangs='',$en
return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label); return array('id'=>$obj->id,'code'=>$obj->code,'label'=>$label);
} }
} }
else {
if ($withregion == 1) {
return $label = $obj->region_name . ' - ' . $label;
}
else { else {
return $label; return $label;
} }
} }
}
else else
{ {
return $langs->transnoentitiesnoconv("NotDefined"); return $langs->transnoentitiesnoconv("NotDefined");