mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Debut correction pour gestion cas utilisation no UCIN06.
Les remises de type avoir ne doivent pas s'inclure dans les lignes details mais dans comme paiements deja réalisé.
This commit is contained in:
@@ -42,7 +42,7 @@ $user->getrights('commande');
|
||||
|
||||
if (! $user->rights->commande->lire) accessforbidden();
|
||||
|
||||
// S<>curit<69> acc<63>s client
|
||||
// S<>curit<69> acc<63>s client
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
@@ -126,7 +126,7 @@ if ($_GET["id"] > 0)
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Soci<63>t<EFBFBD>
|
||||
// Soci<63>t<EFBFBD>
|
||||
print '<tr><td>'.$langs->trans('Company').'</td>';
|
||||
print '<td colspan="3">'.$soc->getNomUrl(1,'compta').'</td>';
|
||||
print '</tr>';
|
||||
@@ -135,21 +135,28 @@ if ($_GET["id"] > 0)
|
||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
||||
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
|
||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
$absolute_discount=$soc->getCurrentDiscount();
|
||||
$absolute_discount=$soc->getCurrentDiscount('','fk_facture_source IS NULL');
|
||||
$absolute_creditnote=$soc->getCurrentDiscount('','fk_facture_source IS NOT NULL');
|
||||
print '. ';
|
||||
if ($absolute_discount)
|
||||
{
|
||||
if ($commande->statut > 0)
|
||||
{
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->trans("Currency".$conf->monnaie));
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remise dispo de type non avoir
|
||||
$filter='fk_facture_source IS NULL';
|
||||
print '<br>';
|
||||
print $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$commande->id,0,'remise_id',$soc->id,$absolute_discount);
|
||||
print $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$commande->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
|
||||
}
|
||||
}
|
||||
else print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
|
||||
if ($absolute_creditnote)
|
||||
{
|
||||
print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'. ';
|
||||
}
|
||||
if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
|
||||
print '</td></tr>';
|
||||
|
||||
// Date
|
||||
@@ -214,7 +221,7 @@ if ($_GET["id"] > 0)
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Conditions et modes de r<>glement
|
||||
// Conditions et modes de r<>glement
|
||||
print '<tr><td height="10">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
@@ -436,7 +443,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
|
||||
/*
|
||||
* Documents g<>n<EFBFBD>r<EFBFBD>s
|
||||
* Documents g<>n<EFBFBD>r<EFBFBD>s
|
||||
*
|
||||
*/
|
||||
$comref = sanitize_string($commande->ref);
|
||||
@@ -498,7 +505,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
|
||||
/*
|
||||
* Liste des exp<78>ditions
|
||||
* Liste des exp<78>ditions
|
||||
*/
|
||||
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande";
|
||||
$sql .= " , ed.qty as qty_livre, e.ref, ed.fk_expedition as expedition_id";
|
||||
@@ -593,7 +600,7 @@ if ($_GET["id"] > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Commande non trouv<75>e
|
||||
// Commande non trouv<75>e
|
||||
print "Commande inexistante";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user