30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/usergroups.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
39$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips'));
45$action =
GETPOST(
'action',
'aZ09');
52if ($action ==
'update') {
53 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
54 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'', $conf->entity);
56 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
57 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTTERM",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTTERM"),
'chaine', 0,
'', $conf->entity);
59 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
60 dolibarr_set_const($db,
"PROPOSAL_PDF_HIDE_PAYMENTMODE",
GETPOST(
"PROPOSAL_PDF_HIDE_PAYMENTMODE"),
'chaine', 0,
'', $conf->entity);
62 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
63 dolibarr_set_const($db,
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE",
GETPOST(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"),
'chaine', 0,
'', $conf->entity);
65 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
66 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);
68 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
69 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);
71 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
72 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);
74 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
75 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);
77 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
78 dolibarr_set_const($db,
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
GETPOST(
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
'int'),
'chaine', 0,
'', $conf->entity);
80 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
81 dolibarr_set_const($db,
"INVOICE_ADD_ZATCA_QR_CODE",
GETPOST(
"INVOICE_ADD_ZATCA_QR_CODE",
'int'),
'chaine', 0,
'', $conf->entity);
82 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
86 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
87 dolibarr_set_const($db,
"INVOICE_ADD_SWISS_QR_CODE",
GETPOST(
"INVOICE_ADD_SWISS_QR_CODE",
'alpha'),
'chaine', 0,
'', $conf->entity);
88 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
92 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
93 dolibarr_set_const($db,
"INVOICE_CATEGORY_OF_OPERATION",
GETPOST(
"INVOICE_CATEGORY_OF_OPERATION",
'int'),
'chaine', 0,
'', $conf->entity);
95 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
96 dolibarr_set_const($db,
"INVOICE_SHOW_SHIPPING_ADDRESS",
GETPOST(
"INVOICE_SHOW_SHIPPING_ADDRESS",
'int'),
'chaine', 0,
'', $conf->entity);
102 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
112$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
113llxHeader(
'', $langs->trans(
"Setup"), $wikihelp);
115$form =
new Form($db);
126print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
129print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
130print
'<input type="hidden" name="token" value="'.newToken().
'">';
131print
'<input type="hidden" name="action" value="update">';
133if (isModEnabled(
'propal')) {
136 print
'<div class="div-table-responsive-no-min">';
137 print
'<table summary="more" class="noborder centpercent">';
138 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
141 print
'<tr class="oddeven"><td>';
142 print $form->textwithpicto($langs->trans(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'');
144 if ($conf->use_javascript_ajax) {
145 print ajax_constantonoff(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
147 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
148 print $form->selectarray(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
152 print
'<tr class="oddeven"><td>';
153 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
155 if ($conf->use_javascript_ajax) {
156 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
158 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
159 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
168if (isModEnabled(
'supplier_proposal')) {
169 $langs->load(
"supplier_proposal");
170 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
172 print
'<div class="div-table-responsive-no-min">';
173 print
'<table summary="more" class="noborder centpercent">';
174 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
176 print
'<tr class="oddeven"><td>';
177 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
179 if ($conf->use_javascript_ajax) {
180 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
182 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
183 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
187 print
'<tr class="oddeven"><td>';
188 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
190 if ($conf->use_javascript_ajax) {
191 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
193 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
194 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
203if (isModEnabled(
'supplier_order')) {
204 $langs->load(
"supplier_order");
205 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
207 print
'<div class="div-table-responsive-no-min">';
208 print
'<table summary="more" class="noborder centpercent">';
209 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
211 print
'<tr class="oddeven"><td>';
212 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
214 if ($conf->use_javascript_ajax) {
215 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
217 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
218 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
222 print
'<tr class="oddeven"><td>';
223 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
225 if ($conf->use_javascript_ajax) {
226 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
228 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
229 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval, $conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
237if (isModEnabled(
'facture')) {
240 print
'<div class="div-table-responsive-no-min">';
241 print
'<table summary="more" class="noborder centpercent">';
242 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
244 print
'<tr class="oddeven"><td>';
245 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
247 if ($conf->use_javascript_ajax) {
248 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
250 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
251 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
255 print
'<tr class="oddeven"><td>';
257 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
259 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
262 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
264 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
266 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
271 print
'<tr class="oddeven"><td>';
272 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
274 $arrval = array(
'0'=>$langs->trans(
"No"),
275 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
276 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
278 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
281 print
'<tr class="oddeven"><td>';
282 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
284 if ($conf->use_javascript_ajax) {
285 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
287 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
288 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
311if (isModEnabled(
'reception')) {
314 print
'<div class="div-table-responsive-no-min">';
315 print
'<table summary="more" class="noborder centpercent">';
316 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
318 print
'<tr class="oddeven"><td>';
319 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
321 if ($conf->use_javascript_ajax) {
322 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
324 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
325 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval, $conf->global->RECEPTION_PDF_HIDE_ORDERED);
329 print
'<tr class="oddeven"><td>';
330 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
332 if ($conf->use_javascript_ajax) {
333 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
335 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
336 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval, $conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT);
345print
'<br><div class="center">';
346print
'<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($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return value of a param into GET or POST supervariable.
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 informations.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.