Merge pull request #20015 from FHenry/14_fix_captial_footer

fix: if capital is not numeric just display input value
This commit is contained in:
Laurent Destailleur 2022-02-07 20:45:02 +01:00 committed by GitHub
commit cea124b73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1063,8 +1063,8 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$tmpamounttoshow = price2num($fromcompany->capital); // This field is a free string
if (is_numeric($tmpamounttoshow) && $tmpamounttoshow > 0) {
$line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", price($tmpamounttoshow, 0, $outputlangs, 0, 0, 0, $conf->currency));
} else {
$line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", $tmpamounttoshow, $outputlangs);
} elseif (!empty($fromcompany->capital)) {
$line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", $fromcompany->capital, $outputlangs);
}
}
// Prof Id 1