diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index edfbb35f5cd..21b55a39413 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -636,9 +636,9 @@ 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->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)."'"; @@ -989,7 +989,7 @@ class Commande extends CommonOrder $this->fetch($ret); $this->valid($user); } - return 1; + return $ret; } else return -1; } 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;