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 $socidp;
|
||||||
var $contactid;
|
var $contactid;
|
||||||
var $brouillon;
|
var $brouillon;
|
||||||
|
var $cond_reglement_id;
|
||||||
|
var $cond_reglement_code;
|
||||||
|
var $mode_reglement_id;
|
||||||
|
var $mode_reglement_code;
|
||||||
|
|
||||||
// Pour board
|
// Pour board
|
||||||
var $nbtodo;
|
var $nbtodo;
|
||||||
@ -233,8 +237,8 @@ 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) ';
|
$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.'\')';
|
$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) )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -647,11 +647,10 @@ else
|
|||||||
|
|
||||||
// Conditions et modes de réglement
|
// Conditions et modes de réglement
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans('PaymentConditions');
|
print $langs->trans('PaymentConditions');
|
||||||
print '</td>';
|
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>';
|
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">';
|
print '</td><td colspan="2">';
|
||||||
if ($_GET['action'] == 'editconditions')
|
if ($_GET['action'] == 'editconditions')
|
||||||
{
|
{
|
||||||
@ -662,12 +661,11 @@ else
|
|||||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
|
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="25%">';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
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>';
|
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">';
|
print '</td><td colspan="2">';
|
||||||
if ($_GET['action'] == 'editmode')
|
if ($_GET['action'] == 'editmode')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user