Hello All,
I think It is a bug of Sugar 5.1,
For address street fields Sugar can have more 3 fields <type>_address_street_2/3/4, so, Sugar call the function "add_address_streets" in SugarBean.php, and if your module have these fields Sugar add a new line and put each address.
But if not exists these fields Sugar put the blank line.
For solution that you can fix it directly in /data/SugarBean.php "funtion add_address_streets()"
for each extra fields (address street 2, 3 and 4) you verify if the field is not empty
PHP Code:
if ( isset($this->$street_field_2) && !empty($this->$street_field_2)) {
$this->$street_field .= "\n". $this->$street_field_2;
}
if ( isset($this->$street_field_3) && !empty($this->$street_field_3)) {
$this->$street_field .= "\n". $this->$street_field_3;
}
if ( isset($this->$street_field_4) && !empty($this->$street_field_4)) {
$this->$street_field .= "\n". $this->$street_field_4;
}
I already posted this bug in Sugar Bug.
I hope this helps.
Bookmarks