Fix: affichage des avoirs

This commit is contained in:
Regis Houssin 2007-04-04 10:44:44 +00:00
parent c96d42bc7c
commit 758ce8ecff
3 changed files with 28 additions and 4 deletions

View File

@ -296,7 +296,7 @@ if ($_GET["id"] > 0)
/*
* Lignes de commandes
*/
$sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice, l.info_bits,';
$sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.fk_remise_except, l.remise_percent, l.subprice, l.info_bits,';
$sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid,';
$sql.= ' p.description as product_desc';
$sql.= ' FROM '.MAIN_DB_PREFIX."commandedet as l";
@ -351,7 +351,19 @@ if ($_GET["id"] > 0)
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$commande->socid.'">';
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
print '</a>';
if ($objp->description) print ' - '.nl2br($objp->description);
if ($objp->description)
{
if ($objp->description == '(CREDIT_NOTE)')
{
$discount=new DiscountAbsolute($db);
$discount->fetch($objp->fk_remise_except);
print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
}
else
{
print ' - '.nl2br($objp->description);
}
}
}
else
{

View File

@ -139,7 +139,7 @@ if ($_REQUEST['action'] == 'setremisepercent' && $user->rights->facture->creer)
$_GET['facid']=$_REQUEST['facid'];
}
if ($_POST['action'] == "setabsolutediscount" && $user->rights->propale->creer)
if ($_POST['action'] == "setabsolutediscount" && $user->rights->facture->creer)
{
if ($_POST["remise_id"])
{

View File

@ -371,7 +371,19 @@ if ($_GET["propalid"] > 0)
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$propal->socid.'">';
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
print '</a>';
if ($objp->description) print ' - '.nl2br($objp->description);
if ($objp->description)
{
if ($objp->description == '(CREDIT_NOTE)')
{
$discount=new DiscountAbsolute($db);
$discount->fetch($objp->fk_remise_except);
print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
}
else
{
print ' - '.nl2br($objp->description);
}
}
}
else
{