Ajout mode_reglement et cond_reglement dans commande
This commit is contained in:
parent
a764e9e316
commit
fc6a83a554
@ -42,6 +42,10 @@ class Commande
|
||||
var $socidp;
|
||||
var $contactid;
|
||||
var $brouillon;
|
||||
var $cond_reglement_id;
|
||||
var $cond_reglement_code;
|
||||
var $mode_reglement_id;
|
||||
var $mode_reglement_code;
|
||||
|
||||
// Pour board
|
||||
var $nbtodo;
|
||||
@ -233,8 +237,8 @@ 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) ';
|
||||
$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.'\')';
|
||||
$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.')';
|
||||
|
||||
if ( $this->db->query($sql) )
|
||||
{
|
||||
|
||||
@ -647,11 +647,10 @@ else
|
||||
|
||||
// Conditions et modes de réglement
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditions');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editconditions' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&id='.$commande->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</tr>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($_GET['action'] == 'editconditions')
|
||||
{
|
||||
@ -662,12 +661,11 @@ else
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="25%">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print '<tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editmode' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&facid='.$commande->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</tr>';
|
||||
print '</td><td colspan="2">';
|
||||
if ($_GET['action'] == 'editmode')
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user