32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
41$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips',
'orders'));
47$action =
GETPOST(
'action',
'aZ09');
54if ($action ==
'update') {
55 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
56 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'', $conf->entity);
58 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
59 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTTERM",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTTERM"),
'chaine', 0,
'', $conf->entity);
61 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
62 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTMODE",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTMODE"),
'chaine', 0,
'', $conf->entity);
64 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
65 dolibarr_set_const($db,
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE",
GETPOST(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"),
'chaine', 0,
'', $conf->entity);
67 if (GETPOSTISSET(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
68 dolibarr_set_const($db,
"SALES_ORDER_SHOW_SHIPPING_ADDRESS",
GETPOSTINT(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"),
'chaine', 0,
'', $conf->entity);
71 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
72 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'chaine', 0,
'', $conf->entity);
74 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
75 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'chaine', 0,
'', $conf->entity);
77 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
78 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'chaine', 0,
'', $conf->entity);
80 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
81 dolibarr_set_const($db,
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN",
GETPOST(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'chaine', 0,
'', $conf->entity);
83 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
84 dolibarr_set_const($db,
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
GETPOSTINT(
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"),
'chaine', 0,
'', $conf->entity);
86 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
88 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
92 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
93 dolibarr_set_const($db,
"INVOICE_ADD_EPC_QR_CODE",
GETPOST(
"INVOICE_ADD_EPC_QR_CODE",
'int'),
'chaine', 0,
'', $conf->entity);
94 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
98 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
99 dolibarr_set_const($db,
"INVOICE_ADD_SWISS_QR_CODE",
GETPOST(
"INVOICE_ADD_SWISS_QR_CODE",
'alpha'),
'chaine', 0,
'', $conf->entity);
100 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
104 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
107 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
112 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
115 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
118 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
124 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
134$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
135llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
137$form =
new Form($db);
148print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
151print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
152print
'<input type="hidden" name="token" value="'.newToken().
'">';
153print
'<input type="hidden" name="action" value="update">';
155if (isModEnabled(
'propal')) {
158 print
'<div class="div-table-responsive-no-min">';
159 print
'<table summary="more" class="noborder centpercent">';
160 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
175 print
'<tr class="oddeven"><td>';
176 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
178 if ($conf->use_javascript_ajax) {
179 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
181 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
182 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
191if (isModEnabled(
'order')) {
192 $langs->load(
"orders");
195 print
'<div class="div-table-responsive-no-min">';
196 print
'<table summary="more" class="noborder centpercent">';
197 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
199 print
'<tr class="oddeven"><td>';
200 print $form->textwithpicto($langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
202 if ($conf->use_javascript_ajax) {
203 print ajax_constantonoff(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS');
205 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
206 print $form->selectarray(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->SALES_ORDER_SHOW_SHIPPING_ADDRESS);
215if (isModEnabled(
'supplier_proposal')) {
216 $langs->load(
"supplier_proposal");
217 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
219 print
'<div class="div-table-responsive-no-min">';
220 print
'<table summary="more" class="noborder centpercent">';
221 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
223 print
'<tr class="oddeven"><td>';
224 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
226 if ($conf->use_javascript_ajax) {
227 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
229 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
230 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
234 print
'<tr class="oddeven"><td>';
235 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
237 if ($conf->use_javascript_ajax) {
238 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
240 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
241 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
250if (isModEnabled(
'supplier_order')) {
251 $langs->load(
"supplier_order");
252 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
254 print
'<div class="div-table-responsive-no-min">';
255 print
'<table summary="more" class="noborder centpercent">';
256 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
258 print
'<tr class="oddeven"><td>';
259 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
261 if ($conf->use_javascript_ajax) {
262 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
264 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
265 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
269 print
'<tr class="oddeven"><td>';
270 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
272 if ($conf->use_javascript_ajax) {
273 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
275 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
276 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
284if (isModEnabled(
'invoice')) {
287 print
'<div class="div-table-responsive-no-min">';
288 print
'<table summary="more" class="noborder centpercent">';
289 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
291 print
'<tr class="oddeven"><td>';
292 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
294 if ($conf->use_javascript_ajax) {
295 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
297 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
298 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
302 print
'<tr class="oddeven"><td>';
303 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
305 if ($conf->use_javascript_ajax) {
306 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
308 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
309 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
313 print
'<tr class="oddeven"><td>';
315 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
317 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
320 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
322 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
324 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
329 print
'<tr class="oddeven"><td>';
330 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
332 $arrval = array(
'0'=>$langs->trans(
"No"),
333 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
334 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
336 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
339 print
'<tr class="oddeven"><td>';
340 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
342 if ($conf->use_javascript_ajax) {
343 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
345 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
346 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
367if (isModEnabled(
'shipping')) {
370 print
'<div class="div-table-responsive-no-min">';
371 print
'<table summary="more" class="noborder centpercent">';
372 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
374 print
'<tr class="oddeven"><td>';
375 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
377 if ($conf->use_javascript_ajax) {
378 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
380 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
381 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
389if (isModEnabled(
'reception')) {
392 print
'<div class="div-table-responsive-no-min">';
393 print
'<table summary="more" class="noborder centpercent">';
394 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
396 print
'<tr class="oddeven"><td>';
397 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
399 if ($conf->use_javascript_ajax) {
400 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
402 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
403 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
407 print
'<tr class="oddeven"><td>';
408 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
410 if ($conf->use_javascript_ajax) {
411 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
413 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
414 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
418 print
'<tr class="oddeven"><td>';
419 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
421 if ($conf->use_javascript_ajax) {
422 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
424 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
425 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
432if (isModEnabled(
'stocktransfer')) {
435 print
'<div class="div-table-responsive-no-min">';
436 print
'<table summary="more" class="noborder centpercent">';
437 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
439 print
'<tr class="oddeven"><td>';
440 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
442 if ($conf->use_javascript_ajax) {
443 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
445 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
446 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
455print
'<br><div class="center">';
456print
'<input class="button button-save" type="submit" name="save" value="'.$langs->trans(
"Save").
'">';
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.