From 4aa966f7add5b68458f203eff588f80342c36d88 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 10 Jul 2013 10:30:33 +0200 Subject: [PATCH 1/4] remove pgsql warning on date insert --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index edfbb35f5cd..499a332e792 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -636,7 +636,7 @@ class Commande extends CommonOrder $sql.= ", remise_absolue, remise_percent"; $sql.= ", entity"; $sql.= ")"; - $sql.= " VALUES ('(PROV)',".$this->socid.", ".$this->db->idate($now).", ".$user->id; + $sql.= " VALUES ('(PROV)',".$this->socid.", '".$this->db->idate($now)."', ".$user->id; $sql.= ", ".($this->fk_project?$this->fk_project:"null"); $sql.= ", ".$this->db->idate($date); $sql.= ", ".($this->source>=0 && $this->source != '' ?$this->source:'null'); From b9bfccd0e2c420279d8eb6dca0c160853d024d5e Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 10 Jul 2013 10:35:10 +0200 Subject: [PATCH 2/4] fix pgsql warning date --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 499a332e792..d57699b998e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -638,7 +638,7 @@ class Commande extends CommonOrder $sql.= ")"; $sql.= " VALUES ('(PROV)',".$this->socid.", '".$this->db->idate($now)."', ".$user->id; $sql.= ", ".($this->fk_project?$this->fk_project:"null"); - $sql.= ", ".$this->db->idate($date); + $sql.= ", '".$this->db->idate($date)."'"; $sql.= ", ".($this->source>=0 && $this->source != '' ?$this->source:'null'); $sql.= ", '".$this->db->escape($this->note_private)."'"; $sql.= ", '".$this->db->escape($this->note_public)."'"; From 44cd024f8950aaf75c509e8f9aab66ab35f14f57 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 10 Jul 2013 13:10:32 +0200 Subject: [PATCH 3/4] Fix bug on from_confrim using ajax and radio button question type --- htdocs/core/class/html.form.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ca5b2c833d0..267815f8ddf 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2517,6 +2517,7 @@ class Form $.each(inputok, function(i, inputname) { var more = ""; if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; } + if ($("#" + inputname).attr("type") == "radio") { more = ":checked"; } var inputvalue = $("#" + inputname + more).val(); if (typeof inputvalue == "undefined") { inputvalue=""; } options += "&" + inputname + "=" + inputvalue; From 729cef3eb4ae6914b2213bedaabfeb55aa0b2b38 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 10 Jul 2013 13:32:42 +0200 Subject: [PATCH 4/4] Qual: Return id of order creates instead of 1 with method createFromProposal --- htdocs/commande/class/commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index d57699b998e..21b55a39413 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -989,7 +989,7 @@ class Commande extends CommonOrder $this->fetch($ret); $this->valid($user); } - return 1; + return $ret; } else return -1; }