Show setup of option SHOW_SUBPRODUCT_REF_IN_PDF

This commit is contained in:
Laurent Destailleur 2020-12-09 17:35:02 +01:00
parent f56b46bd3e
commit 30da1ab8b2
4 changed files with 10 additions and 2 deletions

View File

@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
// Load translation files required by the page
$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members'));
$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks'));
if (!$user->admin) accessforbidden();
@ -80,6 +80,7 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", GETPOST("MAIN_PDF_MAIN_HIDE_THIRD_TAX"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "SHOW_SUBPRODUCT_REF_IN_PDF", GETPOST('SHOW_SUBPRODUCT_REF_IN_PDF', 'alpha'), 'chaine', 0, '', $conf->entity);
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
@ -331,6 +332,10 @@ print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? G
//}
print '</td></tr>';
// SHOW_SUBPRODUCT_REF_IN_PDF - Option to show the detail of product ref for kits.
print '<tr class="oddeven"><td>'.$langs->trans("SHOW_SUBPRODUCT_REF_IN_PDF", $langs->transnoentitiesnoconv("AllowAddLimitStockByWarehouse"), $langs->transnoentitiesnoconv("Module52Name")).'</td><td>';
print $form->selectyesno('SHOW_SUBPRODUCT_REF_IN_PDF', (!empty($conf->global->SHOW_SUBPRODUCT_REF_IN_PDF)) ? $conf->global->SHOW_SUBPRODUCT_REF_IN_PDF : 0, 1);
print '</td></tr>';
print '</table>';
print '</div>';

View File

@ -1868,6 +1868,7 @@ class Expedition extends CommonObject
$statusType = 'status'.$status;
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
if ($status == self::STATUS_CLOSED) $statusType = 'status6';
if ($status == self::STATUS_CANCELED) $statusType = 'status9';
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
}

View File

@ -2084,4 +2084,5 @@ YouMayFindSecurityAdviceHere=You may find security advisory here
ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it.
ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment.
CombinationsSeparator=Separator character for product combinations
SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples
SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples
SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF.

View File

@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Other shipments for this order
SendingsAndReceivingForSameOrder=Shipments and receipts for this order
SendingsToValidate=Shipments to validate
StatusSendingCanceled=Canceled
StatusSendingCanceledShort=Canceled
StatusSendingDraft=Draft
StatusSendingValidated=Validated (products to ship or already shipped)
StatusSendingProcessed=Processed