Ajout de la fonction getNomUrl dans discount.class.php
This commit is contained in:
parent
64f5933454
commit
c5669bc150
@ -1146,8 +1146,7 @@ if ($_GET['propalid'] > 0)
|
|||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
print ' - '.$langs->trans("DiscountFromCreditNote",$discount->ref_facture_source);
|
print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl());
|
||||||
// \TODO Mettre ici lien sur ref avoir en ajoutant fonction getNomUrl sur classe DiscountAbsolute
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1332,8 +1332,7 @@ else
|
|||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
print ' - '.$langs->trans("DiscountFromCreditNote",$discount->ref_facture_source);
|
print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl());
|
||||||
// \TODO Mettre ici lien sur ref avoir en ajoutant fonction getNomUrl sur classe DiscountAbsolute
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1648,8 +1648,7 @@ if ($_GET['action'] == 'create')
|
|||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
print $langs->trans("DiscountFromCreditNote",$discount->ref_facture_source);
|
print $langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl());
|
||||||
// \TODO Mettre ici lien sur ref avoir en ajoutant fonction getNomUrl sur classe DiscountAbsolute
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2290,8 +2289,7 @@ else
|
|||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
print ' - '.$langs->trans("DiscountFromCreditNote",$discount->ref_facture_source);
|
print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl());
|
||||||
// \TODO Mettre ici lien sur ref avoir en ajoutant fonction getNomUrl sur classe DiscountAbsolute
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -207,5 +207,29 @@ class DiscountAbsolute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Renvoie nom clicable (avec eventuellement le picto)
|
||||||
|
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
|
\param option Sur quoi pointe le lien
|
||||||
|
\return string Chaine avec URL
|
||||||
|
*/
|
||||||
|
function getNomUrl($withpicto=0,$option='')
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
$result='';
|
||||||
|
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->fk_facture_source.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
|
||||||
|
$picto='bill';
|
||||||
|
$label=$langs->trans("ShowDiscount").': '.$this->ref_facture_source;
|
||||||
|
|
||||||
|
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||||
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
|
$result.=$lien.$this->ref_facture_source.$lienfin;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -196,6 +196,7 @@ Reductions=Reductions
|
|||||||
ReductionsShort=Reduc.
|
ReductionsShort=Reduc.
|
||||||
Discount=Discount
|
Discount=Discount
|
||||||
Discounts=Discounts
|
Discounts=Discounts
|
||||||
|
ShowDiscount=Show discount
|
||||||
RelativeDiscount=Relative discount
|
RelativeDiscount=Relative discount
|
||||||
GlobalDiscount=Global discount
|
GlobalDiscount=Global discount
|
||||||
CreditNote=Credit note
|
CreditNote=Credit note
|
||||||
|
|||||||
@ -196,6 +196,7 @@ Reductions=R
|
|||||||
ReductionsShort=Réduc.
|
ReductionsShort=Réduc.
|
||||||
Discount=Remise
|
Discount=Remise
|
||||||
Discounts=Remises
|
Discounts=Remises
|
||||||
|
ShowDiscount=Visualiser l'avoir
|
||||||
RelativeDiscount=Remise relative
|
RelativeDiscount=Remise relative
|
||||||
GlobalDiscount=Remise fixe
|
GlobalDiscount=Remise fixe
|
||||||
CreditNote=Avoir
|
CreditNote=Avoir
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user