31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
40$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips',
'orders'));
46$action =
GETPOST(
'action',
'aZ09');
53if ($action ==
'update') {
54 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
55 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'', $conf->entity);
57 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
58 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTTERM",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTTERM"),
'chaine', 0,
'', $conf->entity);
60 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
61 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTMODE",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTMODE"),
'chaine', 0,
'', $conf->entity);
63 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
64 dolibarr_set_const($db,
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE",
GETPOST(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"),
'chaine', 0,
'', $conf->entity);
66 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
67 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);
69 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
70 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);
72 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
73 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);
75 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
76 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);
78 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
79 dolibarr_set_const($db,
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
GETPOSTINT(
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH"),
'chaine', 0,
'', $conf->entity);
81 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
83 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
87 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
88 dolibarr_set_const($db,
"INVOICE_ADD_EPC_QR_CODE",
GETPOST(
"INVOICE_ADD_EPC_QR_CODE",
'int'),
'chaine', 0,
'', $conf->entity);
89 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
93 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
94 dolibarr_set_const($db,
"INVOICE_ADD_SWISS_QR_CODE",
GETPOST(
"INVOICE_ADD_SWISS_QR_CODE",
'alpha'),
'chaine', 0,
'', $conf->entity);
95 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
99 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
102 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
107 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
110 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
113 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
119 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
129$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
130llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
132$form =
new Form($db);
143print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
146print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
147print
'<input type="hidden" name="token" value="'.newToken().
'">';
148print
'<input type="hidden" name="action" value="update">';
150if (isModEnabled(
'propal')) {
153 print
'<div class="div-table-responsive-no-min">';
154 print
'<table summary="more" class="noborder centpercent">';
155 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
170 print
'<tr class="oddeven"><td>';
171 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
173 if ($conf->use_javascript_ajax) {
174 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
176 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
177 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
186if (isModEnabled(
'supplier_proposal')) {
187 $langs->load(
"supplier_proposal");
188 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
190 print
'<div class="div-table-responsive-no-min">';
191 print
'<table summary="more" class="noborder centpercent">';
192 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
194 print
'<tr class="oddeven"><td>';
195 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
197 if ($conf->use_javascript_ajax) {
198 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
200 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
201 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
205 print
'<tr class="oddeven"><td>';
206 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
208 if ($conf->use_javascript_ajax) {
209 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
211 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
212 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
221if (isModEnabled(
'supplier_order')) {
222 $langs->load(
"supplier_order");
223 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
225 print
'<div class="div-table-responsive-no-min">';
226 print
'<table summary="more" class="noborder centpercent">';
227 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
229 print
'<tr class="oddeven"><td>';
230 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
232 if ($conf->use_javascript_ajax) {
233 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
235 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
236 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
240 print
'<tr class="oddeven"><td>';
241 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
243 if ($conf->use_javascript_ajax) {
244 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
246 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
247 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
255if (isModEnabled(
'invoice')) {
258 print
'<div class="div-table-responsive-no-min">';
259 print
'<table summary="more" class="noborder centpercent">';
260 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
262 print
'<tr class="oddeven"><td>';
263 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
265 if ($conf->use_javascript_ajax) {
266 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
268 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
269 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
273 print
'<tr class="oddeven"><td>';
274 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
276 if ($conf->use_javascript_ajax) {
277 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
279 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
280 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
284 print
'<tr class="oddeven"><td>';
286 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
288 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
291 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
293 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
295 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
300 print
'<tr class="oddeven"><td>';
301 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
303 $arrval = array(
'0'=>$langs->trans(
"No"),
304 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
305 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
307 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
310 print
'<tr class="oddeven"><td>';
311 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
313 if ($conf->use_javascript_ajax) {
314 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
316 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
317 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
338if (isModEnabled(
'shipping')) {
341 print
'<div class="div-table-responsive-no-min">';
342 print
'<table summary="more" class="noborder centpercent">';
343 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
345 print
'<tr class="oddeven"><td>';
346 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
348 if ($conf->use_javascript_ajax) {
349 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
351 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
352 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
360if (isModEnabled(
'reception')) {
363 print
'<div class="div-table-responsive-no-min">';
364 print
'<table summary="more" class="noborder centpercent">';
365 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
367 print
'<tr class="oddeven"><td>';
368 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
370 if ($conf->use_javascript_ajax) {
371 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
373 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
374 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
378 print
'<tr class="oddeven"><td>';
379 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
381 if ($conf->use_javascript_ajax) {
382 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
384 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
385 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
389 print
'<tr class="oddeven"><td>';
390 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
392 if ($conf->use_javascript_ajax) {
393 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
395 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
396 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
403if (isModEnabled(
'stocktransfer')) {
406 print
'<div class="div-table-responsive-no-min">';
407 print
'<table summary="more" class="noborder centpercent">';
408 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
410 print
'<tr class="oddeven"><td>';
411 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
413 if ($conf->use_javascript_ajax) {
414 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
416 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
417 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
426print
'<br><div class="center">';
427print
'<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()
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return 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.