diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index ab33848eaf1..3fdc965575f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -387,7 +387,7 @@ if ($_POST['action'] == 'set_contact') if ($_POST["action"] == 'setconditions') { $propal = new Propal($db, $_GET["propalid"]); - $propal->cond_reglement = $_POST['cond_reglement_id']; + $propal->cond_reglement_id = $_POST['cond_reglement_id']; $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_cond_reglement='".$_POST['cond_reglement_id']."' WHERE rowid='".$propalid."'"; $result = $db->query($sql); } @@ -396,7 +396,7 @@ if ($_POST["action"] == 'setconditions') if ($_POST["action"] == 'setmode') { $propal = new Propal($db, $_GET["propalid"]); - $propal->mode_reglement = $_POST['mode_reglement_id']; + $propal->mode_reglement_id = $_POST['mode_reglement_id']; $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_mode_reglement='".$_POST['mode_reglement_id']."' WHERE rowid='".$propalid."'"; $result = $db->query($sql); } @@ -554,11 +554,11 @@ if ($_GET['propalid'] > 0) print ''; if ($_GET['action'] == 'editconditions') { - $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->cond_reglement,'cond_reglement_id'); + $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->cond_reglement_id,'cond_reglement_id'); } else { - $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->cond_reglement,'none'); + $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->cond_reglement_id,'none'); } print ''; print ''; @@ -570,11 +570,11 @@ if ($_GET['propalid'] > 0) print ''; if ($_GET['action'] == 'editmode') { - $html->form_modes_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->mode_reglement,'mode_reglement_id'); + $html->form_modes_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->mode_reglement_id,'mode_reglement_id'); } else { - $html->form_modes_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->mode_reglement,'none'); + $html->form_modes_reglement($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->mode_reglement_id,'none'); } print ''; diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index c1aadf1210d..64592df40b9 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -238,7 +238,7 @@ class Commande $this->projetid = 0; } $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commande (fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, ref_client, model_pdf, fk_cond_reglement, fk_mode_reglement) '; - $sql .= ' VALUES ('.$this->soc_id.', now(), '.$user->id.', '.$this->projetid.', '.$this->db->idate($this->date_commande).', '.$this->source.', \''.$this->note.'\', \''.$this->ref_client.'\', \''.$this->modelpdf.'\', $this->cond_reglement_id, $this->mode_reglement_id)'; + $sql .= ' VALUES ('.$this->soc_id.', now(), '.$user->id.', '.$this->projetid.', '.$this->db->idate($this->date_commande).', '.$this->source.', \''.$this->note.'\', \''.$this->ref_client.'\', \''.$this->modelpdf.'\', '.$this->cond_reglement_id.', '.$this->mode_reglement_id.')'; if ( $this->db->query($sql) ) { diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 9b54929e288..6b90e41b7b2 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -523,30 +523,30 @@ class Propal { $obj = $this->db->fetch_object($resql); - $this->id = $rowid; + $this->id = $rowid; - $this->datep = $obj->dp; - $this->fin_validite = $obj->dfv; - $this->date = $obj->dp; - $this->ref = $obj->ref; - $this->price = $obj->price; - $this->remise = $obj->remise; - $this->remise_percent = $obj->remise_percent; - $this->total = $obj->total; - $this->total_ht = $obj->price; - $this->total_tva = $obj->tva; - $this->total_ttc = $obj->total; - $this->socidp = $obj->fk_soc; - $this->soc_id = $obj->fk_soc; - $this->projetidp = $obj->fk_projet; - $this->contactid = $obj->fk_soc_contact; - $this->modelpdf = $obj->model_pdf; - $this->note = $obj->note; - $this->note_public = $obj->note_public; - $this->statut = $obj->fk_statut; - $this->statut_libelle = $obj->statut_label; - $this->cond_reglement = $obj->fk_cond_reglement; - $this->mode_reglement = $obj->fk_mode_reglement; + $this->datep = $obj->dp; + $this->fin_validite = $obj->dfv; + $this->date = $obj->dp; + $this->ref = $obj->ref; + $this->price = $obj->price; + $this->remise = $obj->remise; + $this->remise_percent = $obj->remise_percent; + $this->total = $obj->total; + $this->total_ht = $obj->price; + $this->total_tva = $obj->tva; + $this->total_ttc = $obj->total; + $this->socidp = $obj->fk_soc; + $this->soc_id = $obj->fk_soc; + $this->projetidp = $obj->fk_projet; + $this->contactid = $obj->fk_soc_contact; + $this->modelpdf = $obj->model_pdf; + $this->note = $obj->note; + $this->note_public = $obj->note_public; + $this->statut = $obj->fk_statut; + $this->statut_libelle = $obj->statut_label; + $this->cond_reglement_id = $obj->fk_cond_reglement; + $this->mode_reglement_id = $obj->fk_mode_reglement; $this->user_author_id = $obj->fk_user_author;