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';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
52$langs->loadLangs(array(
'admin',
'bills',
'companies',
'languages',
'members',
'other',
'products',
'propal',
'receptions',
'stocks',
'trips',
'orders'));
58$action =
GETPOST(
'action',
'aZ09');
65if ($action ==
'update') {
66 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
67 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'',
$conf->entity);
69 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
72 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
75 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
78 if (GETPOSTISSET(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
82 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
83 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);
85 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
86 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);
88 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
89 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);
91 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
92 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);
94 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
97 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
100 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
103 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
106 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
108 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
112 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
114 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
118 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
120 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
124 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
127 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
131 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
135 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
138 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
141 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
146 if ($_FILES[
'termsofsale'][
"name"]) {
147 if (!preg_match(
'/(\.pdf)$/i', $_FILES[
'termsofsale'][
"name"])) {
148 $langs->load(
"errors");
151 $dirforterms =
$conf->mycompany->dir_output.
'/';
152 $original_file = $_FILES[
'termsofsale'][
"name"];
153 $result =
dol_move_uploaded_file($_FILES[
'termsofsale'][
"tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES[
'termsofsale'][
'error']);
162 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
168if ($action ==
'removetermsofsale') {
169 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
171 $filename = $mysoc->termsofsale;
172 $file =
$conf->mycompany->dir_output.
'/'.$filename;
174 if ($filename !=
'') {
179 $mysoc->termsofsale =
'';
187$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
188llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
190$form =
new Form($db);
202print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
205print
'<form enctype="multipart/form-data" method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
206print
'<input type="hidden" name="token" value="'.newToken().
'">';
207print
'<input type="hidden" name="action" value="update">';
209if (isModEnabled(
'propal')) {
212 print
'<div class="div-table-responsive-no-min">';
213 print
'<table summary="more" class="noborder centpercent">';
214 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_PDF_ADD_TERMSOFSALE_PROPAL"), $langs->trans(
"PdfAddTermOfSaleHelp"));
232 if (
$conf->use_javascript_ajax) {
233 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL');
235 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
236 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval,
$conf->global->MAIN_PDF_ADD_TERMSOFSALE_PROPAL);
240 print
'<tr class="oddeven"><td>';
241 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
243 if (
$conf->use_javascript_ajax) {
244 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
246 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
247 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval,
$conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE);
255if (isModEnabled(
'order')) {
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>';
261 print
'<tr class="oddeven"><td>';
262 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER"), $langs->trans(
"PdfAddTermOfSaleHelp"));
264 if (
$conf->use_javascript_ajax) {
265 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER');
267 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
268 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval,
$conf->global->MAIN_PDF_ADD_TERMSOFSALE_ORDER);
275if (isModEnabled(
'order')) {
276 $langs->load(
"orders");
279 print
'<div class="div-table-responsive-no-min">';
280 print
'<table summary="more" class="noborder centpercent">';
281 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
283 print
'<tr class="oddeven"><td>';
284 print $form->textwithpicto($langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
286 if (
$conf->use_javascript_ajax) {
287 print ajax_constantonoff(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS');
289 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
290 print $form->selectarray(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval,
$conf->global->SALES_ORDER_SHOW_SHIPPING_ADDRESS);
299if (isModEnabled(
'supplier_proposal')) {
300 $langs->load(
"supplier_proposal");
301 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
303 print
'<div class="div-table-responsive-no-min">';
304 print
'<table summary="more" class="noborder centpercent">';
305 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
307 print
'<tr class="oddeven"><td>';
308 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
310 if (
$conf->use_javascript_ajax) {
311 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
313 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
314 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval,
$conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE);
318 print
'<tr class="oddeven"><td>';
319 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
321 if (
$conf->use_javascript_ajax) {
322 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
324 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
325 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval,
$conf->global->MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN);
334if (isModEnabled(
'supplier_order')) {
335 $langs->load(
"supplier_order");
336 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
338 print
'<div class="div-table-responsive-no-min">';
339 print
'<table summary="more" class="noborder centpercent">';
340 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
342 print
'<tr class="oddeven"><td>';
343 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
345 if (
$conf->use_javascript_ajax) {
346 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
348 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
349 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval,
$conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE);
353 print
'<tr class="oddeven"><td>';
354 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
356 if (
$conf->use_javascript_ajax) {
357 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
359 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
360 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval,
$conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN);
368if (isModEnabled(
'invoice')) {
371 print
'<div class="div-table-responsive-no-min">';
372 print
'<table summary="more" class="noborder centpercent">';
373 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
375 print
'<tr class="oddeven"><td>';
376 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE"), $langs->trans(
"PdfAddTermOfSaleHelp"));
378 if (
$conf->use_javascript_ajax) {
379 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE');
381 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
382 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval,
$conf->global->MAIN_PDF_ADD_TERMSOFSALE_INVOICE);
385 print
'<tr class="oddeven"><td>';
386 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
388 if (
$conf->use_javascript_ajax) {
389 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
391 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
392 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
396 print
'<tr class="oddeven"><td>';
397 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
399 if (
$conf->use_javascript_ajax) {
400 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
402 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
403 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
407 print
'<tr class="oddeven"><td>';
409 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
411 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
414 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
416 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
418 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
423 print
'<tr class="oddeven"><td>';
424 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
426 $arrval = array(
'0'=>$langs->trans(
"No"),
427 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
428 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
430 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
433 print
'<tr class="oddeven"><td>';
434 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
436 if (
$conf->use_javascript_ajax) {
437 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
439 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
440 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval,
$conf->global->INVOICE_SHOW_SHIPPING_ADDRESS);
474if (isModEnabled(
'shipping')) {
477 print
'<div class="div-table-responsive-no-min">';
478 print
'<table summary="more" class="noborder centpercent">';
479 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
481 print
'<tr class="oddeven"><td>';
482 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
484 if (
$conf->use_javascript_ajax) {
485 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
487 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
488 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
496if (isModEnabled(
'reception')) {
499 print
'<div class="div-table-responsive-no-min">';
500 print
'<table summary="more" class="noborder centpercent">';
501 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
503 print
'<tr class="oddeven"><td>';
504 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
506 if (
$conf->use_javascript_ajax) {
507 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
509 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
510 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
514 print
'<tr class="oddeven"><td>';
515 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
517 if (
$conf->use_javascript_ajax) {
518 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
520 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
521 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
525 print
'<tr class="oddeven"><td>';
526 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
528 if (
$conf->use_javascript_ajax) {
529 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
531 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
532 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
539if (isModEnabled(
'stocktransfer')) {
542 print
'<div class="div-table-responsive-no-min">';
543 print
'<table summary="more" class="noborder centpercent">';
544 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
546 print
'<tr class="oddeven"><td>';
547 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
549 if (
$conf->use_javascript_ajax) {
550 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
552 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
553 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
562print
'<div class="div-table-responsive-no-min">';
563print
'<table summary="more" class="noborder centpercent">';
564print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px">'.$langs->trans(
"Value").
'</td></tr>';
567$tooltiptermsofsale = $langs->trans(
'AvailableFormats').
' : pdf';
569$tooltiptermsofsale .= ($maxfilesizearray[
'maxmin'] > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxfilesizearray[
'maxmin'].
' '.$langs->trans(
'Kb') :
'';
570$documenturl = DOL_URL_ROOT.
'/document.php';
571if (isset(
$conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) {
572 $documenturl =
$conf->global->DOL_URL_ROOT_DOCUMENT_PHP;
574$modulepart =
'mycompany';
576print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"TERMSOFSALE"), $tooltiptermsofsale).
'</label></td><td>';
577print
'<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
578print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="termsofsale" id="termsofsale" accept="application/pdf">';
580if (!empty($mysoc->termsofsale)) {
581 if (file_exists(
$conf->mycompany->dir_output.
'/'.$mysoc->termsofsale)) {
582 print
'<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.
'?modulepart='.$modulepart.
'&file='.urlencode($mysoc->termsofsale).
'">'.$mysoc->termsofsale.
'</a>'.$formfile->showPreview($mysoc->termsofsale, $modulepart, $mysoc->termsofsale, 0,
'');
583 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removetermsofsale&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
591print
'<br><div class="center">';
592print
'<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.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile', $upload_dir='')
Check validity of a file upload from an GUI page, and move it to its final destination.
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.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
pdf_admin_prepare_head()
Return array head with list of tabs to view object information.
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.