Nettoyage
This commit is contained in:
parent
5f9ffb452d
commit
85256a4322
@ -69,8 +69,8 @@ if ($_GET["projetid"])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Categorisation dans projet
|
// Categorisation dans projet
|
||||||
if ($_POST['action'] == 'classin' && $user->rights->commande->creer)
|
if ($_POST['action'] == 'classin' && $user->rights->commande->creer)
|
||||||
@ -240,8 +240,8 @@ if ($_REQUEST['action'] == 'setremiseabsolue' && $user->rights->facture->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ajout d'une ligne produit dans la commande
|
* Ajout d'une ligne produit dans la commande
|
||||||
*/
|
*/
|
||||||
if ($_POST['action'] == 'addligne' && $user->rights->commande->creer)
|
if ($_POST['action'] == 'addligne' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
if ($_POST['qty'] && (($_POST['pu'] && $_POST['desc']) || $_POST['idprod']))
|
if ($_POST['qty'] && (($_POST['pu'] && $_POST['desc']) || $_POST['idprod']))
|
||||||
@ -285,7 +285,8 @@ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer)
|
|||||||
{
|
{
|
||||||
$desc = $prod->description;
|
$desc = $prod->description;
|
||||||
}
|
}
|
||||||
|
// \todo La valeur de la TVA a 0 devrait etre retournée par get_default_tva
|
||||||
|
$tva_tx = ($soc->tva_assuj=='0')?0:get_default_tva($mysoc,$soc,$prod->tva_tx);
|
||||||
$tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx);
|
$tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -315,8 +316,8 @@ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mise à jour d'une ligne dans la propale
|
* Mise à jour d'une ligne dans la propale
|
||||||
*/
|
*/
|
||||||
if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POST['save'] == $langs->trans('Save'))
|
if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POST['save'] == $langs->trans('Save'))
|
||||||
{
|
{
|
||||||
$commande = new Commande($db,'',$_POST['id']);
|
$commande = new Commande($db,'',$_POST['id']);
|
||||||
@ -514,8 +515,8 @@ if ($action=='remove_file')
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Envoi de la commande par mail
|
* Envoi de la commande par mail
|
||||||
*/
|
*/
|
||||||
if ($_POST['action'] == 'send')
|
if ($_POST['action'] == 'send')
|
||||||
{
|
{
|
||||||
$langs->load('mails');
|
$langs->load('mails');
|
||||||
@ -668,10 +669,8 @@ if ($_POST['action'] == 'send')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Order'),'Commande');
|
llxHeader('',$langs->trans('Order'),'Commande');
|
||||||
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
@ -728,12 +727,10 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
|||||||
// Reference client
|
// Reference client
|
||||||
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
|
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
|
||||||
print '<input type="text" name="ref_client" value=""></td>';
|
print '<input type="text" name="ref_client" value=""></td>';
|
||||||
print '<td rowspan="'.$nbrow.'" valign="top"><textarea name="note" cols="70" rows="8"></textarea></td>';
|
print '<td rowspan="'.$nbrow.'" valign="top"><textarea name="note" cols="70" rows="8"></textarea></td></tr>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
print '<tr><td>'.$langs->trans('Customer').'</td><td>'.$soc->getNomUrl(1).'</td>';
|
print '<tr><td>'.$langs->trans('Customer').'</td><td>'.$soc->getNomUrl(1).'</td></tr>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Contact de la propale
|
* Contact de la propale
|
||||||
@ -795,43 +792,6 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
|||||||
$html->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
|
$html->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Réductions relatives (Remises-Ristournes-Rabbais)
|
|
||||||
/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures
|
|
||||||
et non globalement
|
|
||||||
$relative_discount=$soc->remise_client;
|
|
||||||
print '<tr><td>'.$langs->trans("CustomerRelativeDiscount").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print '<input type="text" name="remise_percent" size="1" value="'.$relative_discount.'"> %';
|
|
||||||
print '</td><td>'.img_info().' ';
|
|
||||||
if ($relative_discount)
|
|
||||||
{
|
|
||||||
print $langs->trans("CompanyHasRelativeDiscount",$relative_discount);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("CompanyHasNoRelativeDiscount");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Réductions (Remises-Ristournes-Rabbais)
|
|
||||||
/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées
|
|
||||||
$absolute_discount=$soc->getCurrentDiscount();
|
|
||||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscount").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
print '<input type="text" name="remise_absolue" size="1" value="0"> '.$langs->trans("Currency".$conf->monnaie);
|
|
||||||
print '</td><td>'.img_info().' ';
|
|
||||||
if ($absolute_discount)
|
|
||||||
{
|
|
||||||
print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Projet
|
// Projet
|
||||||
if ($conf->projet->enabled)
|
if ($conf->projet->enabled)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user