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');
59$modulepart =
GETPOST(
'modulepart',
'aZ09');
63if ($modulepart ==
'propal') {
64 $diroffile =
$conf->propal->dir_output;
65 $varname =
'MAIN_INFO_PROPAL_TERMSOFSALE';
67if ($modulepart ==
'order') {
68 $diroffile =
$conf->order->dir_output;
69 $varname =
'MAIN_INFO_ORDER_TERMSOFSALE';
71if ($modulepart ==
'invoice') {
72 $diroffile =
$conf->invoice->dir_output;
73 $varname =
'MAIN_INFO_INVOICE_TERMSOFSALE';
81if ($action ==
'update') {
82 if (GETPOSTISSET(
'MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
83 dolibarr_set_const($db,
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING",
GETPOST(
"MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"),
'chaine', 0,
'',
$conf->entity);
85 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
88 if (GETPOSTISSET(
'PROPOSAL_PDF_HIDE_PAYMENTMODE')) {
91 if (GETPOSTISSET(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
94 if (GETPOSTISSET(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS')) {
98 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE')) {
99 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);
101 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN')) {
102 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);
104 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE')) {
105 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);
107 if (GETPOSTISSET(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN')) {
108 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);
110 if (GETPOSTISSET(
'MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
113 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL')) {
116 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER')) {
119 if (GETPOSTISSET(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) {
122 if (GETPOSTISSET(
'INVOICE_ADD_ZATCA_QR_CODE')) {
124 if (
GETPOSTINT(
'INVOICE_ADD_ZATCA_QR_CODE') == 1) {
128 if (GETPOSTISSET(
'INVOICE_ADD_EPC_QR_CODE')) {
130 if (
GETPOSTINT(
'INVOICE_ADD_EPC_QR_CODE') == 1) {
134 if (GETPOSTISSET(
'INVOICE_ADD_SWISS_QR_CODE')) {
136 if (
GETPOST(
'INVOICE_ADD_SWISS_QR_CODE',
'alpha') !=
'0') {
140 if (GETPOSTISSET(
'INVOICE_CATEGORY_OF_OPERATION')) {
143 if (GETPOSTISSET(
'INVOICE_SHOW_SHIPPING_ADDRESS')) {
147 if (GETPOSTISSET(
'PDF_INVOICE_SHOW_VAT_ANALYSIS')) {
151 if (GETPOSTISSET(
'INVOICE_HIDE_LINKED_OBJECT')) {
154 if (GETPOSTISSET(
'BARCODE_ON_SHIPPING_PDF')) {
157 if (GETPOSTISSET(
'BARCODE_ON_RECEPTION_PDF')) {
160 if (GETPOSTISSET(
'BARCODE_ON_STOCKTRANSFER_PDF')) {
165 foreach (array(
'MAIN_INFO_PROPAL_TERMSOFSALE',
'MAIN_INFO_ORDER_TERMSOFSALE',
'MAIN_INFO_INVOICE_TERMSOFSALE') as $varname) {
166 if (isset($_FILES[$varname]) && $_FILES[$varname][
"name"]) {
167 if (!preg_match(
'/(\.pdf)$/i', $_FILES[$varname][
"name"])) {
168 $langs->load(
"errors");
171 if ($varname ==
'MAIN_INFO_PROPAL_TERMSOFSALE') {
172 $diroffile =
$conf->propal->dir_output;
173 } elseif ($varname ==
'MAIN_INFO_ORDER_TERMSOFSALE') {
174 $diroffile =
$conf->order->dir_output;
175 } elseif ($varname ==
'MAIN_INFO_INVOICE_TERMSOFSALE') {
176 $diroffile =
$conf->invoice->dir_output;
179 $dirforterms = $diroffile.
'/';
180 $original_file = $_FILES[$varname][
"name"];
181 $result =
dol_move_uploaded_file($_FILES[$varname][
"tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES[$varname][
'error']);
182 if ((
int) $result > 0) {
192 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?mainmenu=home&leftmenu=setup");
198if ($action ==
'removetermsofsale') {
199 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
202 if ($filename !=
'') {
214$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
215llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-pdf_other');
217$form =
new Form($db);
229print
'<span class="opacitymedium">'.$form->textwithpicto($langs->trans(
"PDFOtherDesc"), $tooltiptext).
"</span><br>\n";
234$tooltipconcatpdf = ($maxfilesizearray[
'maxmin'] > 0) ? $langs->trans(
'MaxSize').
' : '.$maxfilesizearray[
'maxmin'].
' '.$langs->trans(
'Kb') :
'';
235$documenturl = DOL_URL_ROOT.
'/document.php';
236if (isset(
$conf->global->DOL_URL_ROOT_DOCUMENT_PHP)) {
241print
'<form enctype="multipart/form-data" method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
242print
'<input type="hidden" name="token" value="'.newToken().
'">';
243print
'<input type="hidden" name="action" value="update">';
245if (isModEnabled(
'propal')) {
246 print
'<div id="#proposal"></div>';
250 print
'<div class="div-table-responsive-no-min">';
251 print
'<table summary="more" class="noborder centpercent">';
252 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
267 print
'<tr class="oddeven"><td>';
268 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
270 if (
$conf->use_javascript_ajax) {
271 print ajax_constantonoff(
'PDF_PROPAL_SHOW_PRICE_INCL_TAX');
273 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
274 print $form->selectarray(
"PDF_PROPAL_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_PROPAL_SHOW_PRICE_INCL_TAX'));
278 print
'<tr class="oddeven"><td>';
279 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
281 if (
$conf->use_javascript_ajax) {
282 print ajax_constantonoff(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE');
284 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
285 print $form->selectarray(
"MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_PROPOSALS_WITH_PICTURE'));
290 print
'<tr class="oddeven"><td>';
291 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL"), $tooltipconcatpdf);
293 if (
$conf->use_javascript_ajax) {
294 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL', array(),
null, 0, 0, 1);
296 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
297 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_PROPAL", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_PROPAL'));
301 $modulepart =
'propal';
302 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
303 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_PROPAL_TERMSOFSALE" id="MAIN_INFO_PROPAL_TERMSOFSALE" accept="application/pdf">';
306 if (file_exists(
$conf->propal->dir_output.
'/'.$termofsale)) {
308 print
'<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.
'?modulepart='.$modulepart.
'&file='.urlencode($termofsale).
'">'.$termofsale.
'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0,
'');
309 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removetermsofsale&modulepart='.$modulepart.
'&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
323if (isModEnabled(
'order')) {
324 print
'<div id="#order"></div>';
326 $langs->load(
"orders");
329 print
'<div class="div-table-responsive-no-min">';
330 print
'<table summary="more" class="noborder centpercent">';
332 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
334 print
'<tr class="oddeven"><td>';
335 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
337 if (
$conf->use_javascript_ajax) {
338 print ajax_constantonoff(
'PDF_ORDER_SHOW_PRICE_INCL_TAX');
340 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
341 print $form->selectarray(
"PDF_ORDER_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_ORDER_SHOW_PRICE_INCL_TAX'));
345 print
'<tr class="oddeven"><td>';
346 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
348 if (
$conf->use_javascript_ajax) {
349 print ajax_constantonoff(
'MAIN_GENERATE_ORDERS_WITH_PICTURE');
351 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
352 print $form->selectarray(
"MAIN_GENERATE_ORDERS_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_ORDERS_WITH_PICTURE'));
356 print
'<tr class="oddeven"><td>';
357 print $form->textwithpicto($langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"SALES_ORDER_SHOW_SHIPPING_ADDRESSMore"));
359 if (
$conf->use_javascript_ajax) {
360 print ajax_constantonoff(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS');
362 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
363 print $form->selectarray(
"SALES_ORDER_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'SALES_ORDER_SHOW_SHIPPING_ADDRESS'));
368 print
'<tr class="oddeven"><td>';
369 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER"),
'');
371 if (
$conf->use_javascript_ajax) {
372 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER', array(),
null, 0, 0, 1);
374 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
375 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_ORDER", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_ORDER'));
379 $modulepart =
'order';
380 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
381 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_ORDER_TERMSOFSALE" id="MAIN_INFO_ORDER_TERMSOFSALE" accept="application/pdf">';
384 if (file_exists(
$conf->order->dir_output.
'/'.$termofsale)) {
386 print
'<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.
'?modulepart='.$modulepart.
'&file='.urlencode($termofsale).
'">'.$termofsale.
'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0,
'');
387 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removetermsofsale&modulepart='.$modulepart.
'&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
402if (isModEnabled(
'invoice')) {
403 print
'<div id="#invoice"></div>';
407 print
'<div class="div-table-responsive-no-min">';
408 print
'<table summary="more" class="noborder centpercent">';
409 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
411 print
'<tr class="oddeven"><td>';
412 print $form->textwithpicto($langs->trans(
"PDF_XXX_SHOW_PRICE_INCL_TAX"), $langs->trans(
"AvailableWithSomePDFTemplatesOnly"));
414 if (
$conf->use_javascript_ajax) {
415 print ajax_constantonoff(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX');
417 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
418 print $form->selectarray(
"PDF_INVOICE_SHOW_PRICE_INCL_TAX", $arrval,
getDolGlobalString(
'PDF_INVOICE_SHOW_PRICE_INCL_TAX'));
422 print
'<tr class="oddeven"><td>';
423 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_WITH_PICTURE"), $langs->trans(
"RandomlySelectedIfSeveral"));
425 if (
$conf->use_javascript_ajax) {
426 print ajax_constantonoff(
'MAIN_GENERATE_INVOICES_WITH_PICTURE');
428 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
429 print $form->selectarray(
"MAIN_GENERATE_INVOICES_WITH_PICTURE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_INVOICES_WITH_PICTURE'));
433 print
'<tr class="oddeven"><td>';
434 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_ZATCA_QR_CODE"), $langs->trans(
"INVOICE_ADD_ZATCA_QR_CODEMore"));
436 if (
$conf->use_javascript_ajax) {
437 print ajax_constantonoff(
'INVOICE_ADD_ZATCA_QR_CODE');
439 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
440 print $form->selectarray(
"INVOICE_ADD_ZATCA_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_ZATCA_QR_CODE'));
444 print
'<tr class="oddeven"><td>';
445 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_EPC_QR_CODE"), $langs->trans(
"INVOICE_ADD_EPC_QR_CODEMore"));
447 if (
$conf->use_javascript_ajax) {
448 print ajax_constantonoff(
'INVOICE_ADD_EPC_QR_CODE');
450 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
451 print $form->selectarray(
"INVOICE_ADD_EPC_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_EPC_QR_CODE'));
455 print
'<tr class="oddeven"><td>';
457 print $form->textwithpicto($langs->trans(
"INVOICE_ADD_SWISS_QR_CODE"), $langs->trans(
"INVOICE_ADD_SWISS_QR_CODEMore"));
459 print $langs->trans(
"INVOICE_ADD_SWISS_QR_CODE");
462 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
464 $arrval[
'bottom'] = $langs->trans(
"AtBottomOfPage").
' ('.$langs->trans(
"Experimental").
' - Need PHP 8.1+ and some PHP libs)';
466 print $form->selectarray(
"INVOICE_ADD_SWISS_QR_CODE", $arrval,
getDolGlobalString(
'INVOICE_ADD_SWISS_QR_CODE'));
471 print
'<tr class="oddeven"><td>';
472 print $form->textwithpicto($langs->trans(
"InvoiceOptionCategoryOfOperations"), $langs->trans(
'InvoiceOptionCategoryOfOperationsHelp'), 1);
474 $arrval = array(
'0'=>$langs->trans(
"No"),
475 '1'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes1"),
476 '2'=>$langs->trans(
"InvoiceOptionCategoryOfOperationsYes2")
478 print $form->selectarray(
"INVOICE_CATEGORY_OF_OPERATION", $arrval,
getDolGlobalString(
'INVOICE_CATEGORY_OF_OPERATION'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
481 print
'<tr class="oddeven"><td>';
482 print $form->textwithpicto($langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESS"), $langs->trans(
"INVOICE_SHOW_SHIPPING_ADDRESSMore"));
484 if (
$conf->use_javascript_ajax) {
485 print ajax_constantonoff(
'INVOICE_SHOW_SHIPPING_ADDRESS');
487 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
488 print $form->selectarray(
"INVOICE_SHOW_SHIPPING_ADDRESS", $arrval,
getDolGlobalString(
'INVOICE_SHOW_SHIPPING_ADDRESS'));
492 print
'<tr class="oddeven"><td>';
493 print $form->textwithpicto($langs->trans(
"PDF_INVOICE_SHOW_VAT_ANALYSIS"),
'');
495 if (
$conf->use_javascript_ajax) {
496 print ajax_constantonoff(
'PDF_INVOICE_SHOW_VAT_ANALYSIS');
498 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
499 print $form->selectarray(
"PDF_INVOICE_SHOW_VAT_ANALYSIS", $arrval,
$conf->global->PDF_INVOICE_SHOW_VAT_ANALYSIS);
516 print
'<tr class="oddeven"><td>';
517 print $form->textwithpicto($langs->trans(
"INVOICE_HIDE_LINKED_OBJECT"), $langs->trans(
"INVOICE_HIDE_LINKED_OBJECTMore"));
519 if (
$conf->use_javascript_ajax) {
520 print ajax_constantonoff(
'INVOICE_HIDE_LINKED_OBJECT');
522 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
523 print $form->selectarray(
"INVOICE_HIDE_LINKED_OBJECT", $arrval,
getDolGlobalString(
'INVOICE_HIDE_LINKED_OBJECT'));
528 print
'<tr class="oddeven"><td>';
529 print $form->textwithpicto($langs->trans(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE"),
'');
531 if (
$conf->use_javascript_ajax) {
532 print ajax_constantonoff(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE', array(),
null, 0, 0, 1);
534 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
535 print $form->selectarray(
"MAIN_PDF_ADD_TERMSOFSALE_INVOICE", $arrval,
getDolGlobalString(
'MAIN_PDF_ADD_TERMSOFSALE_INVOICE'));
539 $modulepart =
'invoice';
540 print
'<div class="inline-block nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
541 print
'<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="MAIN_INFO_INVOICE_TERMSOFSALE" id="MAIN_INFO_INVOICE_TERMSOFSALE" accept="application/pdf">';
544 if (file_exists(
$conf->invoice->dir_output.
'/'.$termofsale)) {
546 print
'<div class="inline-block valignmiddle marginrightonly"><a href="'.$documenturl.
'?modulepart='.$modulepart.
'&file='.urlencode($termofsale).
'">'.$termofsale.
'</a>'.$formfile->showPreview($file[0], $modulepart, $termofsale, 0,
'');
547 print
'<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=removetermsofsale&modulepart='.$modulepart.
'&token='.
newToken().
'">'.
img_delete($langs->trans(
"Delete"),
'',
'marginleftonly').
'</a></div>';
562if (isModEnabled(
'supplier_proposal')) {
563 print
'<div id="#supplier_proposal"></div>';
565 $langs->load(
"supplier_proposal");
566 print
load_fiche_titre($langs->trans(
"SupplierProposal"),
'',
'supplier_proposal');
568 print
'<div class="div-table-responsive-no-min">';
569 print
'<table summary="more" class="noborder centpercent">';
570 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
572 print
'<tr class="oddeven"><td>';
573 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE"),
'');
575 if (
$conf->use_javascript_ajax) {
576 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE');
578 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
579 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE'));
583 print
'<tr class="oddeven"><td>';
584 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN"),
'');
586 if (
$conf->use_javascript_ajax) {
587 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN');
589 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
590 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN'));
601if (isModEnabled(
'supplier_order')) {
602 print
'<div id="#supplier_order"></div>';
604 $langs->load(
"supplier_order");
605 print
load_fiche_titre($langs->trans(
"SupplierOrder"),
'',
'supplier_proposal');
607 print
'<div class="div-table-responsive-no-min">';
608 print
'<table summary="more" class="noborder centpercent">';
609 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameter").
'</td><td width="200px"></td></tr>';
611 print
'<tr class="oddeven"><td>';
612 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE"),
'');
614 if (
$conf->use_javascript_ajax) {
615 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE');
617 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
618 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE'));
622 print
'<tr class="oddeven"><td>';
623 print $form->textwithpicto($langs->trans(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN"),
'');
625 if (
$conf->use_javascript_ajax) {
626 print ajax_constantonoff(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN');
628 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
629 print $form->selectarray(
"MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN", $arrval,
getDolGlobalString(
'MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN'));
639if (isModEnabled(
'shipping')) {
640 print
'<div id="#shipping"></div>';
644 print
'<div class="div-table-responsive-no-min">';
645 print
'<table summary="more" class="noborder centpercent">';
646 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
648 print
'<tr class="oddeven"><td>';
649 print $langs->trans(
"BARCODE_ON_SHIPPING_PDF");
651 if (
$conf->use_javascript_ajax) {
652 print ajax_constantonoff(
'BARCODE_ON_SHIPPING_PDF');
654 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
655 print $form->selectarray(
"BARCODE_ON_SHIPPING_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_SHIPPING_PDF'));
664if (isModEnabled(
'reception')) {
665 print
'<div id="#reception"></div>';
669 print
'<div class="div-table-responsive-no-min">';
670 print
'<table summary="more" class="noborder centpercent">';
671 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
673 print
'<tr class="oddeven"><td>';
674 print $langs->trans(
"RECEPTION_PDF_HIDE_ORDERED");
676 if (
$conf->use_javascript_ajax) {
677 print ajax_constantonoff(
'RECEPTION_PDF_HIDE_ORDERED');
679 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
680 print $form->selectarray(
"RECEPTION_PDF_HIDE_ORDERED", $arrval,
getDolGlobalString(
'RECEPTION_PDF_HIDE_ORDERED'));
684 print
'<tr class="oddeven"><td>';
685 print $langs->trans(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT");
687 if (
$conf->use_javascript_ajax) {
688 print ajax_constantonoff(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT');
690 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
691 print $form->selectarray(
"MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT", $arrval,
getDolGlobalString(
'MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT'));
695 print
'<tr class="oddeven"><td>';
696 print $langs->trans(
"BARCODE_ON_RECEPTION_PDF");
698 if (
$conf->use_javascript_ajax) {
699 print ajax_constantonoff(
'BARCODE_ON_RECEPTION_PDF');
701 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
702 print $form->selectarray(
"BARCODE_ON_RECEPTION_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_RECEPTION_PDF'));
711if (isModEnabled(
'stocktransfer')) {
712 print
'<div id="#stocktransfer"></div>';
716 print
'<div class="div-table-responsive-no-min">';
717 print
'<table summary="more" class="noborder centpercent">';
718 print
'<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans(
"Parameters").
'</td><td width="200px"></td></tr>';
720 print
'<tr class="oddeven"><td>';
721 print $langs->trans(
"BARCODE_ON_STOCKTRANSFER_PDF");
723 if (
$conf->use_javascript_ajax) {
724 print ajax_constantonoff(
'BARCODE_ON_STOCKTRANSFER_PDF');
726 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
727 print $form->selectarray(
"BARCODE_ON_STOCKTRANSFER_PDF", $arrval,
getDolGlobalString(
'BARCODE_ON_STOCKTRANSFER_PDF'));
737print
'<br><div class="center">';
738print
'<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.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $keyforsourcefile='addedfile', $upload_dir='', $mode=0)
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, $morecssdiv='')
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_sanitizePathName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a path name.
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.