Merge pull request #20514 from FHenry/new_hidden_option_in_contractPDF

NEW add hidden option on contract PDF line to hide qty and price
This commit is contained in:
Laurent Destailleur 2022-04-02 16:29:37 +02:00 committed by GitHub
commit c4c7b19fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -355,7 +355,12 @@ class pdf_strato extends ModelePDFContract
$desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines)
$txt = '';
$txt .= $outputlangs->transnoentities("Quantity").' : <strong>'.$objectligne->qty.'</strong> - '.$outputlangs->transnoentities("UnitPrice").' : <strong>'.price($objectligne->subprice).'</strong>'; // Desc (not empty for free lines)
if (empty($conf->global->CONTRACT_HIDE_QTY_ON_PDF)) {
$txt .= $outputlangs->transnoentities("Quantity") . ' : <strong>' . $objectligne->qty . '</strong>';
}
if (empty($conf->global->CONTRACT_HIDE_PRICE_ON_PDF)) {
$txt .= ' - ' . $outputlangs->transnoentities("UnitPrice") . ' : <strong>' . price($objectligne->subprice) . '</strong>';
}
if (empty($conf->global->CONTRACT_HIDE_PLANNED_DATE_ON_PDF)) {
$txt .= '<br>';
$txt .= $outputlangs->transnoentities("DateStartPlannedShort")." : <strong>".$datei."</strong> - ".$outputlangs->transnoentities("DateEndPlanned")." : <strong>".$datee.'</strong>';