Fix: affichage des avoirs
This commit is contained in:
parent
c96d42bc7c
commit
758ce8ecff
@ -296,7 +296,7 @@ if ($_GET["id"] > 0)
|
|||||||
/*
|
/*
|
||||||
* Lignes de commandes
|
* 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.label as product, p.ref, p.fk_product_type, p.rowid as prodid,';
|
||||||
$sql.= ' p.description as product_desc';
|
$sql.= ' p.description as product_desc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX."commandedet as l";
|
$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 '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$commande->socid.'">';
|
||||||
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
||||||
print '</a>';
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -139,7 +139,7 @@ if ($_REQUEST['action'] == 'setremisepercent' && $user->rights->facture->creer)
|
|||||||
$_GET['facid']=$_REQUEST['facid'];
|
$_GET['facid']=$_REQUEST['facid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['action'] == "setabsolutediscount" && $user->rights->propale->creer)
|
if ($_POST['action'] == "setabsolutediscount" && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($_POST["remise_id"])
|
if ($_POST["remise_id"])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -371,7 +371,19 @@ if ($_GET["propalid"] > 0)
|
|||||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$propal->socid.'">';
|
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$propal->socid.'">';
|
||||||
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
|
||||||
print '</a>';
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user