Vielen Dank @priojk, ich hab nun die pdf_cyan geändert und auch die weiteren Templates angepasst und es funktioniert. Ich hoffe, dass die Entwickler den Fix in die neue Version aufnehmen.
// Total remise
$total_line_remise = 0;
foreach ($object->lines as $i => $line) {
$resdiscount = pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2);
$total_line_remise += (is_numeric($resdiscount) ? $resdiscount : 0);
// Gestion remise sous forme de ligne négative
if ($line->total_ht < 0) {
$total_line_remise += -$line->total_ht;
}
// --- Multicurrency-safe discount printing --- // new
$usemc = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1);
$total_line_remise_print = $total_line_remise;
if ($usemc) {
$ratio = (!empty($object->total_ht) ? (float) $object->multicurrency_total_ht / (float) $object->total_ht : 0);
if (!empty($ratio)) $total_line_remise_print = price2num($total_line_remise * $ratio, 'MT');
}
// --- End Multicurrency-safe discount printing ---
}
if ($total_line_remise > 0) {
$pdf->SetFillColor(255, 255, 255);
$pdf->SetXY($col1x, $tab2_top + $tab2_hl);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalDiscount") : ''), 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top + $tab2_hl);
// $pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise, 0, $outputlangs), 0, 'R', 1); // old
$pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise_print, 0, $outputlangs), 0, 'R', 1); //new
$index++;
// Show total NET before discount
$pdf->SetFillColor(255, 255, 255);
$pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top);
// $pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise + $total_ht, 0, $outputlangs), 0, 'R', 1); // old
$pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise_print + $total_ht, 0, $outputlangs), 0, 'R', 1); // new
$index++;
}