Load dict lang file for currency translation
This commit is contained in:
parent
31f4821f76
commit
8898721a76
@ -108,6 +108,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|||||||
@ -83,7 +83,11 @@ class html_cerfafr extends ModeleDon
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
|
|
||||||
$langs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
|
$outputlangs->load("companies");
|
||||||
|
$outputlangs->load("bills");
|
||||||
|
$outputlangs->load("products");
|
||||||
|
|
||||||
if ($conf->don->dir_output)
|
if ($conf->don->dir_output)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,10 +86,11 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("sendings");
|
$outputlangs->load("sendings");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|||||||
@ -132,10 +132,11 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("propal");
|
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
$outputlangs->load("propal");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/modules/facture/pdf_crabe.modules.php
|
* \file htdocs/includes/modules/facture/pdf_crabe.modules.php
|
||||||
\ingroup facture
|
* \ingroup facture
|
||||||
\brief File of class to generate invoices from crab model
|
* \brief File of class to generate invoices from crab model
|
||||||
\author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
require_once(DOL_DOCUMENT_ROOT."/includes/modules/facture/modules_facture.php");
|
||||||
@ -84,7 +84,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// Recupere emmetteur
|
// Recupere emmetteur
|
||||||
$this->emetteur=$mysoc;
|
$this->emetteur=$mysoc;
|
||||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<27>tait pas d<>fini
|
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // By default, if was not defined
|
||||||
|
|
||||||
// Defini position des colonnes
|
// Defini position des colonnes
|
||||||
$this->posxdesc=$this->marge_gauche+1;
|
$this->posxdesc=$this->marge_gauche+1;
|
||||||
@ -254,8 +254,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|
||||||
// TVA
|
// TVA
|
||||||
$pdf->SetXY ($this->posxtva, $curY);
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, vatrate($fac->lignes[$i]->tva_tx,1,$fac->lignes[$i]->info_bits), 0, 'R');
|
{
|
||||||
|
$pdf->SetXY ($this->posxtva, $curY);
|
||||||
|
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, vatrate($fac->lignes[$i]->tva_tx,1,$fac->lignes[$i]->info_bits), 0, 'R');
|
||||||
|
}
|
||||||
|
|
||||||
// Prix unitaire HT avant remise
|
// Prix unitaire HT avant remise
|
||||||
$pdf->SetXY ($this->posxup, $curY);
|
$pdf->SetXY ($this->posxup, $curY);
|
||||||
@ -677,6 +680,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$tab2_top = $posy;
|
$tab2_top = $posy;
|
||||||
$tab2_hl = 5;
|
$tab2_hl = 5;
|
||||||
$tab2_height = $tab2_hl * 4;
|
$tab2_height = $tab2_hl * 4;
|
||||||
@ -685,6 +690,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
// Tableau total
|
// Tableau total
|
||||||
$lltot = 200; $col1x = 120; $col2x = 170; $largcol2 = $lltot - $col2x;
|
$lltot = 200; $col1x = 120; $col2x = 170; $largcol2 = $lltot - $col2x;
|
||||||
|
|
||||||
|
$useborder=0;
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
||||||
// Total HT
|
// Total HT
|
||||||
@ -694,51 +700,57 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||||
|
|
||||||
// Affichage des totaux de TVA par taux (conformement a la reglementation)
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248,248,248);
|
$pdf->SetFillColor(248,248,248);
|
||||||
|
|
||||||
foreach( $this->tva as $tvakey => $tvaval )
|
$this->atleastoneratenotnull=0;
|
||||||
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
{
|
{
|
||||||
if ($tvakey) // On affiche pas taux 0
|
foreach( $this->tva as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
$this->atleastoneratenotnull++;
|
if ($tvakey) // On affiche pas taux 0
|
||||||
|
{
|
||||||
|
$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
$index++;
|
||||||
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$tvacompl='';
|
||||||
|
if (eregi('\*',$tvakey))
|
||||||
|
{
|
||||||
|
$tvakey=eregi_replace('\*','',$tvakey);
|
||||||
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
|
}
|
||||||
|
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||||
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->atleastoneratenotnull) // If no vat at all
|
||||||
|
{
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$tvacompl='';
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||||
if (eregi('\*',$tvakey))
|
|
||||||
{
|
|
||||||
$tvakey=eregi_replace('\*','',$tvakey);
|
|
||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
|
||||||
}
|
|
||||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
|
||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
|
||||||
|
// Total TTC
|
||||||
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
{
|
{
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->SetFillColor(224,224,224);
|
||||||
|
$text=$outputlangs->transnoentities("TotalTTC");
|
||||||
|
if ($object->type == 2) $text=$outputlangs->transnoentities("TotalTTCToYourCredit");
|
||||||
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $text, $useborder, 'L', 1);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$useborder=0;
|
|
||||||
|
|
||||||
// Total TTC
|
|
||||||
$index++;
|
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
|
||||||
$pdf->SetFillColor(224,224,224);
|
|
||||||
$text=$outputlangs->transnoentities("TotalTTC");
|
|
||||||
if ($object->type == 2) $text=$outputlangs->transnoentities("TotalTTCToYourCredit");
|
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $text, $useborder, 'L', 1);
|
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
$creditnoteamount=$object->getSommeCreditNote();
|
$creditnoteamount=$object->getSommeCreditNote();
|
||||||
@ -824,9 +836,12 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
|
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
|
||||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||||
|
|
||||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
$pdf->SetXY ($this->posxtva-1, $tab_top+2);
|
{
|
||||||
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
|
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||||
|
$pdf->SetXY ($this->posxtva-1, $tab_top+2);
|
||||||
|
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||||
|
}
|
||||||
|
|
||||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||||
|
|||||||
@ -114,6 +114,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
@ -221,11 +222,15 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|
||||||
// TVA
|
// TVA
|
||||||
if ($this->franchise!=1)
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
{
|
{
|
||||||
$pdf->SetXY ($this->marges['g']+119, $curY);
|
if ($this->franchise!=1)
|
||||||
$pdf->MultiCell(10, 3, $fac->lignes[$i]->tva_tx, 0, 'R');
|
{
|
||||||
|
$pdf->SetXY ($this->marges['g']+119, $curY);
|
||||||
|
$pdf->MultiCell(10, 3, $fac->lignes[$i]->tva_tx, 0, 'R');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prix unitaire HT avant remise
|
// Prix unitaire HT avant remise
|
||||||
$pdf->SetXY ($this->marges['g']+132, $curY);
|
$pdf->SetXY ($this->marges['g']+132, $curY);
|
||||||
$pdf->MultiCell(16, 3, price($fac->lignes[$i]->subprice), 0, 'R', 0);
|
$pdf->MultiCell(16, 3, price($fac->lignes[$i]->subprice), 0, 'R', 0);
|
||||||
@ -584,7 +589,8 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
function _tableau_tot(&$pdf, $fac, $deja_regle, $posy, $outputlangs)
|
function _tableau_tot(&$pdf, $fac, $deja_regle, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
@ -593,6 +599,10 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$tab2_height = $tab2_hl * 4;
|
$tab2_height = $tab2_hl * 4;
|
||||||
$pdf->SetFont('Arial','', 9);
|
$pdf->SetFont('Arial','', 9);
|
||||||
|
|
||||||
|
// Tableau total
|
||||||
|
$col1x=$this->marges['g']+110; $col2x=$this->marges['g']+164;
|
||||||
|
$lltot = 200; $largcol2 = $lltot - $col2x;
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $tab2_top + 0);
|
$pdf->SetXY ($this->marges['g'], $tab2_top + 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -603,31 +613,65 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->MultiCell(100, $tab2_hl, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
$pdf->MultiCell(100, $tab2_hl, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$useborder=0;
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
||||||
// Total TTC
|
// Total HT
|
||||||
$col1x=$this->marges['g']+110; $col2x=$this->marges['g']+164;
|
|
||||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 0);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 0);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell(26, $tab2_hl, price($fac->total_ht + $fac->remise), 0, 'R', 0);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ht + $fac->remise), 0, 'R', 0);
|
||||||
|
|
||||||
// Total VAT
|
// Show VAT by rates and total
|
||||||
$index++;
|
$pdf->SetFillColor(248,248,248);
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 0);
|
$this->atleastoneratenotnull=0;
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
$pdf->MultiCell(26, $tab2_hl, price($fac->total_tva), 0, 'R', 0);
|
{
|
||||||
|
foreach( $this->tva as $tvakey => $tvaval )
|
||||||
|
{
|
||||||
|
if ($tvakey) // On affiche pas taux 0
|
||||||
|
{
|
||||||
|
$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
$index++;
|
||||||
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$tvacompl='';
|
||||||
|
if (eregi('\*',$tvakey))
|
||||||
|
{
|
||||||
|
$tvakey=eregi_replace('\*','',$tvakey);
|
||||||
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
|
}
|
||||||
|
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||||
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->atleastoneratenotnull) // If no vat at all
|
||||||
|
{
|
||||||
|
$index++;
|
||||||
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||||
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Total TTC
|
// Total TTC
|
||||||
$index++;
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
{
|
||||||
$pdf->SetTextColor(22,137,210);
|
$index++;
|
||||||
$pdf->SetFont('Arial','B', 11);
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), 0, 'L', 0);
|
$pdf->SetTextColor(22,137,210);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetFont('Arial','B', 11);
|
||||||
$pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc), 0, 'R', 0);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), 0, 'L', 0);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
|
$pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ttc), 0, 'R', 0);
|
||||||
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
$creditnoteamount=$fac->getSommeCreditNote();
|
$creditnoteamount=$fac->getSommeCreditNote();
|
||||||
$resteapayer = $fac->total_ttc - $deja_regle - $creditnoteamount;
|
$resteapayer = $fac->total_ttc - $deja_regle - $creditnoteamount;
|
||||||
@ -642,7 +686,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPayed"), 0, 'L', 0);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPayed"), 0, 'L', 0);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell(26, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||||
|
|
||||||
// Credit note
|
// Credit note
|
||||||
if ($creditnoteamount)
|
if ($creditnoteamount)
|
||||||
@ -664,7 +708,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), 0, 'L', 0);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), 0, 'L', 0);
|
||||||
$pdf->SetFillColor(224,224,224);
|
$pdf->SetFillColor(224,224,224);
|
||||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc - $deja_regle), 0, 'R', 0);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($fac->total_ttc - $deja_regle), 0, 'R', 0);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,7 +722,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $fac, $outputlangs)
|
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $fac, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
@ -688,7 +732,10 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
|
|
||||||
$pdf->Text($this->marges['g']+1,$tab_top + 5, $outputlangs->transnoentities("Designation"));
|
$pdf->Text($this->marges['g']+1,$tab_top + 5, $outputlangs->transnoentities("Designation"));
|
||||||
if ($this->franchise!=1) $pdf->Text($this->marges['g']+120, $tab_top + 5, $outputlangs->transnoentities("VAT"));
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
|
{
|
||||||
|
if ($this->franchise!=1) $pdf->Text($this->marges['g']+120, $tab_top + 5, $outputlangs->transnoentities("VAT"));
|
||||||
|
}
|
||||||
$pdf->Text($this->marges['g']+135, $tab_top + 5,$outputlangs->transnoentities("PriceUHT"));
|
$pdf->Text($this->marges['g']+135, $tab_top + 5,$outputlangs->transnoentities("PriceUHT"));
|
||||||
$pdf->Text($this->marges['g']+153, $tab_top + 5, $outputlangs->transnoentities("Qty"));
|
$pdf->Text($this->marges['g']+153, $tab_top + 5, $outputlangs->transnoentities("Qty"));
|
||||||
|
|
||||||
@ -896,7 +943,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',13);
|
$pdf->SetFont('Arial','B',13);
|
||||||
$pdf->SetXY($this->marges['g'],$posy);
|
$pdf->SetXY($this->marges['g'],$posy);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Bill").' '.$outputlangs->transnoentities("Of").' '.dolibarr_print_date($fac->date,"%d %B %Y",false,$outputlangs,true), '' , 'L');
|
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Bill").' '.$outputlangs->transnoentities("Of").' '.dol_print_date($fac->date,"%d %B %Y",false,$outputlangs,true), '' , 'L');
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->SetXY($this->marges['g'],$posy+6);
|
$pdf->SetXY($this->marges['g'],$posy+6);
|
||||||
$pdf->SetTextColor(22,137,210);
|
$pdf->SetTextColor(22,137,210);
|
||||||
|
|||||||
@ -98,6 +98,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("deliveries");
|
$outputlangs->load("deliveries");
|
||||||
@ -225,9 +226,9 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
||||||
if ($i < ($nblignes - 1)) // If it's not last line
|
if ($i < ($nblignes - 1)) // If it's not last line
|
||||||
{
|
{
|
||||||
//on récupère la description du produit suivant
|
//on r<EFBFBD>cup<EFBFBD>re la description du produit suivant
|
||||||
$follow_descproduitservice = $delivery->lignes[$i+1]->desc;
|
$follow_descproduitservice = $delivery->lignes[$i+1]->desc;
|
||||||
//on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres)
|
//on compte le nombre de ligne afin de v<EFBFBD>rifier la place disponible (largeur de ligne 52 caracteres)
|
||||||
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52)*4);
|
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52)*4);
|
||||||
}
|
}
|
||||||
else // If it's last line
|
else // If it's last line
|
||||||
|
|||||||
@ -116,11 +116,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("orders");
|
$outputlangs->load("orders");
|
||||||
$outputlangs->load("dict");
|
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user