Merge pull request #17518 from bb2a/add_option_pdf_global_with_picture
[NEW] PDF width picture option
This commit is contained in:
commit
99a939df57
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2107 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2021 Anthony Berton <bertonanthony@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -41,17 +41,12 @@ if (!$user->admin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($cancel) {
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
||||||
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
||||||
@ -62,6 +57,9 @@ if ($action == 'update') {
|
|||||||
if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
|
if (GETPOSTISSET('MAIN_GENERATE_PROPOSALS_WITH_PICTURE')) {
|
||||||
dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_GENERATE_PROPOSALS_WITH_PICTURE", GETPOST("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
if (GETPOSTISSET('MAIN_DOCUMENTS_WITH_PICTURE_WIDTH')) {
|
||||||
|
dolibarr_set_const($db, "MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", GETPOST("MAIN_DOCUMENTS_WITH_PICTURE_WIDTH", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
|
||||||
@ -92,6 +90,7 @@ $tooltiptext = '';
|
|||||||
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
|
print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("PDFOtherDesc"), $tooltiptext)."</span><br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
if (!empty($conf->propal->enabled)) {
|
||||||
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
print load_fiche_titre($langs->trans("Proposal"), '', '');
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
@ -126,10 +125,11 @@ print '</td></tr>';
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
print '<br><div class="center">';
|
||||||
print $form->buttonsSaveCancel();
|
print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||||
*/
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|||||||
@ -2004,7 +2004,8 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
|
|||||||
MAIN_PDF_MARGIN_TOP=Top margin on PDF
|
MAIN_PDF_MARGIN_TOP=Top margin on PDF
|
||||||
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
|
||||||
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
|
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
|
||||||
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line
|
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines
|
||||||
|
MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines
|
||||||
MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame
|
MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame
|
||||||
MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame
|
MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame
|
||||||
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
|
MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user