diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index b242305170..0ba3c37515 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -578,6 +578,11 @@ class infolog_so $to_write[$key] = $this->data[$key] = $val; // update internal data } } + // If no price list use NULL not 0 + if($to_write['pl_id'] == '') + { + $to_write['pl_id'] = NULL; + } // writing no price as SQL NULL (required by postgres) if ($to_write['info_price'] === '') $to_write['info_price'] = NULL; diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index a8cc627a9b..0f0c9e1380 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -2222,6 +2222,11 @@ class infolog_ui { unset($content['info_cat']); } + // Don't send '0' if there is no price list + if($content['pl_id'] == '0') + { + unset($content['pl_id']); + } $content['duration_format'] = $this->duration_format; $content['hours_per_workday'] = $this->hours_per_workday; if ($this->prefs['show_id']) $content['info_number'] = $info_id;