fix double VAT line in commande PDF template
This commit is contained in:
parent
a91bdad8de
commit
e0a3820b9c
@ -1216,35 +1216,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// VAT
|
|
||||||
foreach ($this->tva_array as $tvakey => $tvaval) {
|
|
||||||
if ($tvakey != 0) { // On affiche pas taux 0
|
|
||||||
$this->atleastoneratenotnull++;
|
|
||||||
|
|
||||||
$index++;
|
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
|
||||||
|
|
||||||
$tvacompl = '';
|
|
||||||
if (preg_match('/\*/', $tvakey)) {
|
|
||||||
$tvakey = str_replace('*', '', $tvakey);
|
|
||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
|
||||||
}
|
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
|
||||||
$totalvat .= ' ';
|
|
||||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
|
||||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
|
||||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
|
||||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
|
||||||
} else {
|
|
||||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$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(price2num($tvaval['amount'], 'MT'), 0, $outputlangs), 0, 'R', 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
foreach ($this->tva_array as $tvakey => $tvaval) {
|
foreach ($this->tva_array as $tvakey => $tvaval) {
|
||||||
if ($tvakey != 0) { // On affiche pas taux 0
|
if ($tvakey != 0) { // On affiche pas taux 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user