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_DOCUMENTS_WITH_PICTURE_WIDTH')) {
66 dolibarr_set_const($db,
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
GETPOST(
"MAIN_DOCUMENTS_WITH_PICTURE_WIDTH",
'int'),
'chaine', 0,
'', $conf->entity);
68 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
69 dolibarr_set_const($db,
"INVOICE_ADD_ZATCA_QR_CODE",
GETPOST(
"INVOICE_ADD_ZATCA_QR_CODE",
'int'),
'chaine', 0,
'', $conf->entity);
72 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
73 dolibarr_set_const($db,
"INVOICE_ADD_SWISS_QR_CODE",
GETPOST(
"INVOICE_ADD_SWISS_QR_CODE",
'alpha'),
'chaine', 0,
'', $conf->entity);
76 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
77 dolibarr_set_const($db,
"INVOICE_CATEGORY_OF_OPERATION",
GETPOST(
"INVOICE_CATEGORY_OF_OPERATION",
'int'),
'chaine', 0,
'', $conf->entity);
79 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
80 dolibarr_set_const($db,
"INVOICE_SHOW_SHIPPING_ADDRESS",
GETPOST(
"INVOICE_SHOW_SHIPPING_ADDRESS",
'int'),
'chaine', 0,
'', $conf->entity);
86 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
96$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
97llxHeader(
'', $langs->trans(
"Setup"), $wikihelp);
110print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
113print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
114print
'<input type="hidden" name="token" value="'.newToken().
'">';
115print
'<input type="hidden" name="action" value="update">';
117if (isModEnabled(
'propal')) {
120 print
'<div class="div-table-responsive-no-min">';
121 print
'<table summary="more" class="noborder centpercent">';
122 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
125 print
'<tr class="oddeven"><td>';
126 print $form->textwithpicto($langs->trans(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'');
128 if ($conf->use_javascript_ajax) {
129 print ajax_constantonoff(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING');
131 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
132 print $form->selectarray(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING);
136 print
'<tr class="oddeven"><td>';
137 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
139 if ($conf->use_javascript_ajax) {
140 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
142 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
143 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
152if (isModEnabled(
'facture')) {
155 print
'<div class="div-table-responsive-no-min">';
156 print
'<table summary="more" class="noborder centpercent">';
157 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
159 print
'<tr class="oddeven"><td>';
160 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
162 if ($conf->use_javascript_ajax) {
163 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
165 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
166 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
170 print
'<tr class="oddeven"><td>';
172 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
174 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
177 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
179 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
181 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
186 print
'<tr class="oddeven"><td>';
187 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
189 $arrval = array(
'0'=>$langs->trans(
"No"),
190 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
191 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
193 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval, $conf->global->INVOICE_CATEGORY_OF_OPERATION, 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
196 print
'<tr class="oddeven"><td>';
197 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
199 if ($conf->use_javascript_ajax) {
200 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
202 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
203 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval, $conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
213if (isModEnabled(
'reception')) {
216 print
'<div class="div-table-responsive-no-min">';
217 print
'<table summary="more" class="noborder centpercent">';
218 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
220 print
'<tr class="oddeven"><td>';
221 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
223 if ($conf->use_javascript_ajax) {
224 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
226 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
227 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval, $conf->global->RECEPTION_PDF_HIDE_ORDERED);
231 print
'<tr class="oddeven"><td>';
232 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
234 if ($conf->use_javascript_ajax) {
235 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
237 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
238 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval, $conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT);
247print
'<br><div class="center">';
248print
'<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.
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.