diff --git a/ChangeLog b/ChangeLog index ddafb08d110..5ef0217d077 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.3.3 compared to 3.3.2 ***** - Fix: [ bug #903 ] Fatal error: Call to undefined function dol_get_first_day() in htdocs/commande/liste.php +- Fix: [ bug #934 ] Error on proformat invoice creation (pgsql) ***** ChangeLog for 3.3.2 compared to 3.3.1 ***** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index b41fa735e7c..105885bfe1f 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -122,8 +122,8 @@ class FactureRec extends Facture $sql.= ", '".$facsrc->socid."'"; $sql.= ", ".$conf->entity; $sql.= ", ".$this->db->idate($now); - $sql.= ", '".$facsrc->amount."'"; - $sql.= ", '".$facsrc->remise."'"; + $sql.= ", ".(!empty($facsrc->amount)?$facsrc->amount:'0'); + $sql.= ", ".(!empty($facsrc->remise)?$this->remise:'0'); $sql.= ", '".$this->db->escape($this->note)."'"; $sql.= ", '".$user->id."'"; $sql.= ", ".(! empty($facsrc->fk_project)?"'".$facsrc->fk_project."'":"null");