Fix translation of total VAT
This commit is contained in:
parent
8f01db10a6
commit
7218a9de0e
@ -45,28 +45,28 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
|
||||
public $phpmin = array(5, 2);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
@ -240,11 +240,11 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
|
||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
$pdf->setPrintHeader(false);
|
||||
@ -317,16 +317,16 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
$height_incoterms=$nexY-$tab_top;
|
||||
|
||||
|
||||
// Rect prend une longueur en 3eme param
|
||||
$pdf->SetDrawColor(192,192,192);
|
||||
$pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_incoterms+1);
|
||||
|
||||
|
||||
$tab_top = $nexY+6;
|
||||
$height_incoterms += 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Affiche notes
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
@ -478,7 +478,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||
else $tvaligne=$object->lines[$i]->total_tva;
|
||||
|
||||
|
||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||
@ -585,7 +585,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Pied de page
|
||||
$this->_pagefoot($pdf,$object,$outputlangs);
|
||||
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
|
||||
@ -953,7 +953,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$tvakey=str_replace('*','',$tvakey);
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -1294,7 +1294,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
|
||||
@ -1176,7 +1176,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tvakey=str_replace('*','',$tvakey);
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
$pdf->SetAutoPageBreak(1,0);
|
||||
|
||||
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
$pdf->setPrintHeader(false);
|
||||
@ -322,19 +322,19 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->AddPage();
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
|
||||
|
||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
|
||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||
|
||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||
|
||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
|
||||
$tab_height = 130;
|
||||
@ -383,7 +383,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$notetoshow.='Affaire suivi par '.$tmpuser->getFullName($langs);
|
||||
if ($tmpuser->email) $notetoshow.=', Mail: '.$tmpuser->email;
|
||||
if ($tmpuser->office_phone) $notetoshow.=', Tel: '.$tmpuser->office_phone;
|
||||
}
|
||||
}
|
||||
if ($notetoshow)
|
||||
{
|
||||
$tab_top = 88 + $height_incoterms;
|
||||
@ -552,14 +552,14 @@ class pdf_azur extends ModelePDFPropales
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||
else $tvaligne=$object->lines[$i]->total_tva;
|
||||
|
||||
|
||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||
$localtax2_rate=$object->lines[$i]->localtax2_tx;
|
||||
$localtax1_type=$object->lines[$i]->localtax1_type;
|
||||
$localtax2_type=$object->lines[$i]->localtax2_type;
|
||||
|
||||
$localtax2_type=$object->lines[$i]->localtax2_type;
|
||||
|
||||
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
|
||||
if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100;
|
||||
if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100;
|
||||
@ -667,7 +667,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
|
||||
}
|
||||
|
||||
|
||||
// Pied de page
|
||||
$this->_pagefoot($pdf,$object,$outputlangs);
|
||||
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
|
||||
@ -1103,7 +1103,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$tvakey=str_replace('*','',$tvakey);
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -1479,7 +1479,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
|
||||
@ -620,7 +620,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -632,7 +632,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
|
||||
@ -439,7 +439,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||
else $tvaligne=$object->lines[$i]->total_tva;
|
||||
|
||||
|
||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||
@ -718,7 +718,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -730,7 +730,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
@ -1124,7 +1124,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->MultiCell(100, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posy+=1;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdir = get_exdir(0,2,0,0,$objphoto,'product') . dol_sanitizeFileName($objphoto->ref).'/';
|
||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||
}
|
||||
|
||||
|
||||
$realpath='';
|
||||
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
||||
{
|
||||
@ -445,7 +445,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
if ($up_excl_tax > 0)
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
|
||||
*/
|
||||
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
@ -466,11 +466,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
if ($total_excl_tax > 0)
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||
*/
|
||||
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||
else $tvaligne=$object->lines[$i]->total_tva;
|
||||
|
||||
|
||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||
@ -941,7 +941,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$tvakey=str_replace('*','',$tvakey);
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat =$outputlangs->transcountrynoentities("TotalVAT",$mysoc->country_code).' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
@ -1035,7 +1035,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
if (! empty($object->paye)) $resteapayer=0;
|
||||
*/
|
||||
|
||||
|
||||
if ($deja_regle > 0)
|
||||
{
|
||||
$index++;
|
||||
@ -1297,7 +1297,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->MultiCell(100, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posy+=2;
|
||||
|
||||
// Show list of linked objects
|
||||
|
||||
Loading…
Reference in New Issue
Block a user