Merge pull request #20149 from marc-dll/13.0_FIX_pdf_deposit_detail

FIX: invoice pdf: lines originating from deposits were not detailed anymore
This commit is contained in:
Laurent Destailleur 2022-02-25 14:29:33 +01:00 committed by GitHub
commit 6dadfc9d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1271,7 +1271,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
$textwasmodified = ($note == $prodser->note);
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note = $prodser->multilangs[$outputlangs->defaultlang]["note"];
}
} elseif ($object->element == 'facture' || $object->element == 'facturefourn') {
} elseif (($object->element == 'facture' || $object->element == 'facturefourn') && preg_match('/^\(DEPOSIT\).+/', $desc)) { // We must not replace '(DEPOSIT)' when it is alone, it will be translated and detailed later
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
}