This commit is contained in:
Regis Houssin 2006-02-16 16:38:15 +00:00
parent 7cea7db763
commit 6968b9e8be
3 changed files with 30 additions and 30 deletions

View File

@ -387,7 +387,7 @@ if ($_POST['action'] == 'set_contact')
if ($_POST["action"] == 'setconditions') if ($_POST["action"] == 'setconditions')
{ {
$propal = new Propal($db, $_GET["propalid"]); $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."'"; $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_cond_reglement='".$_POST['cond_reglement_id']."' WHERE rowid='".$propalid."'";
$result = $db->query($sql); $result = $db->query($sql);
} }
@ -396,7 +396,7 @@ if ($_POST["action"] == 'setconditions')
if ($_POST["action"] == 'setmode') if ($_POST["action"] == 'setmode')
{ {
$propal = new Propal($db, $_GET["propalid"]); $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."'"; $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_mode_reglement='".$_POST['mode_reglement_id']."' WHERE rowid='".$propalid."'";
$result = $db->query($sql); $result = $db->query($sql);
} }
@ -554,11 +554,11 @@ if ($_GET['propalid'] > 0)
print '</td><td colspan="3">'; print '</td><td colspan="3">';
if ($_GET['action'] == 'editconditions') 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 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 '</td>'; print '</td>';
print '<td width="25%">'; print '<td width="25%">';
@ -570,11 +570,11 @@ if ($_GET['propalid'] > 0)
print '</td><td width="25%">'; print '</td><td width="25%">';
if ($_GET['action'] == 'editmode') 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 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 '</td></tr>'; print '</td></tr>';

View File

@ -238,7 +238,7 @@ class Commande
$this->projetid = 0; $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 = '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) ) if ( $this->db->query($sql) )
{ {

View File

@ -523,30 +523,30 @@ class Propal
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$this->id = $rowid; $this->id = $rowid;
$this->datep = $obj->dp; $this->datep = $obj->dp;
$this->fin_validite = $obj->dfv; $this->fin_validite = $obj->dfv;
$this->date = $obj->dp; $this->date = $obj->dp;
$this->ref = $obj->ref; $this->ref = $obj->ref;
$this->price = $obj->price; $this->price = $obj->price;
$this->remise = $obj->remise; $this->remise = $obj->remise;
$this->remise_percent = $obj->remise_percent; $this->remise_percent = $obj->remise_percent;
$this->total = $obj->total; $this->total = $obj->total;
$this->total_ht = $obj->price; $this->total_ht = $obj->price;
$this->total_tva = $obj->tva; $this->total_tva = $obj->tva;
$this->total_ttc = $obj->total; $this->total_ttc = $obj->total;
$this->socidp = $obj->fk_soc; $this->socidp = $obj->fk_soc;
$this->soc_id = $obj->fk_soc; $this->soc_id = $obj->fk_soc;
$this->projetidp = $obj->fk_projet; $this->projetidp = $obj->fk_projet;
$this->contactid = $obj->fk_soc_contact; $this->contactid = $obj->fk_soc_contact;
$this->modelpdf = $obj->model_pdf; $this->modelpdf = $obj->model_pdf;
$this->note = $obj->note; $this->note = $obj->note;
$this->note_public = $obj->note_public; $this->note_public = $obj->note_public;
$this->statut = $obj->fk_statut; $this->statut = $obj->fk_statut;
$this->statut_libelle = $obj->statut_label; $this->statut_libelle = $obj->statut_label;
$this->cond_reglement = $obj->fk_cond_reglement; $this->cond_reglement_id = $obj->fk_cond_reglement;
$this->mode_reglement = $obj->fk_mode_reglement; $this->mode_reglement_id = $obj->fk_mode_reglement;
$this->user_author_id = $obj->fk_user_author; $this->user_author_id = $obj->fk_user_author;