Fix: Translation of Offered on PDF
This commit is contained in:
parent
af1cede0ed
commit
d370e2ff9f
@ -1379,7 +1379,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Remise %
|
// Remise %
|
||||||
if ($objp->remise_percent > 0 && $objp->special_code != 3)
|
if ($objp->remise_percent > 0 && $objp->special_code != 3)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1559,7 +1559,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent).'</td>';
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs).'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2640,7 +2640,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -724,7 +724,7 @@ if ($id > 0)
|
|||||||
print '<td align="right" nowrap="nowrap">'.$commandline->qty.'</td>';
|
print '<td align="right" nowrap="nowrap">'.$commandline->qty.'</td>';
|
||||||
if ($commandline->remise_percent > 0)
|
if ($commandline->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right" nowrap="nowrap">'.dol_print_reduction($commandline->remise_percent)."</td>\n";
|
print '<td align="right" nowrap="nowrap">'.dol_print_reduction($commandline->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -302,7 +302,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($com->lignes[$i]->remise_percent)
|
if ($com->lignes[$i]->remise_percent)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dol_print_reduction($com->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dol_print_reduction($com->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
|
|||||||
@ -321,7 +321,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($fac->lignes[$i]->remise_percent)
|
if ($fac->lignes[$i]->remise_percent)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($fac->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($fac->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
|
|||||||
@ -304,7 +304,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($propale->lignes[$i]->remise_percent && $propale->lignes[$i]->special_code != 3)
|
if ($propale->lignes[$i]->remise_percent && $propale->lignes[$i]->special_code != 3)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($propale->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($propale->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
|
|||||||
@ -433,7 +433,7 @@ AutomaticCode=Automatic code
|
|||||||
NotManaged=Not managed
|
NotManaged=Not managed
|
||||||
FeatureDisabled=Feature disabled
|
FeatureDisabled=Feature disabled
|
||||||
MoveBox=Move box %s
|
MoveBox=Move box %s
|
||||||
Offered=Offered
|
Offered=Free
|
||||||
NotEnoughPermissions=You don't have permission for this action
|
NotEnoughPermissions=You don't have permission for this action
|
||||||
SessionName=Session name
|
SessionName=Session name
|
||||||
Method=Method
|
Method=Method
|
||||||
|
|||||||
@ -522,11 +522,8 @@ function dol_set_user_page_param($db, &$user, $url='', $tab)
|
|||||||
* \param reduction Reduction percentage
|
* \param reduction Reduction percentage
|
||||||
* \return string Formated reduction
|
* \return string Formated reduction
|
||||||
*/
|
*/
|
||||||
function dol_print_reduction($reduction=0)
|
function dol_print_reduction($reduction=0,$langs)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$langs->load("main");
|
|
||||||
|
|
||||||
$string = '';
|
$string = '';
|
||||||
if ($reduction == 100)
|
if ($reduction == 100)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user