From 6353084777b62ed3adf0344146b9f052ef6c6f52 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Tue, 27 Apr 2021 00:22:39 +0200 Subject: [PATCH 1/3] init --- htdocs/admin/pdf.php | 4 + htdocs/admin/pdf_intervention.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_invoice.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_order.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_project.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_proposal.php | 123 +++++++++++++++++++++++++++ htdocs/admin/pdf_recruitment.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_supplierinvoice.php | 110 ++++++++++++++++++++++++ htdocs/admin/pdf_supplierorder.php | 110 ++++++++++++++++++++++++ htdocs/core/lib/pdf.lib.php | 80 +++++++++++++++++ htdocs/langs/en_US/admin.lang | 12 +++ 11 files changed, 989 insertions(+) create mode 100644 htdocs/admin/pdf_intervention.php create mode 100644 htdocs/admin/pdf_invoice.php create mode 100644 htdocs/admin/pdf_order.php create mode 100644 htdocs/admin/pdf_project.php create mode 100644 htdocs/admin/pdf_proposal.php create mode 100644 htdocs/admin/pdf_recruitment.php create mode 100644 htdocs/admin/pdf_supplierinvoice.php create mode 100644 htdocs/admin/pdf_supplierorder.php diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index a5c2770a9c4..0ee42d6cddf 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -161,6 +161,10 @@ if (class_exists('TCPDI')) { print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'general', $langs->trans("PDF"), -1, 'pdf'); + print ''.$form->textwithpicto($langs->trans("PDFDesc"), $s)."
\n"; print "
\n"; diff --git a/htdocs/admin/pdf_intervention.php b/htdocs/admin/pdf_intervention.php new file mode 100644 index 00000000000..f7a0244f9ab --- /dev/null +++ b/htdocs/admin/pdf_intervention.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'intervention', $langs->trans("Intervention"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFInterventionDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_invoice.php b/htdocs/admin/pdf_invoice.php new file mode 100644 index 00000000000..69859b9ea30 --- /dev/null +++ b/htdocs/admin/pdf_invoice.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'invoice', $langs->trans("Invoice"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFInvoiceDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_order.php b/htdocs/admin/pdf_order.php new file mode 100644 index 00000000000..e3a725eb33a --- /dev/null +++ b/htdocs/admin/pdf_order.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'order', $langs->trans("Order"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFOrderDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_project.php b/htdocs/admin/pdf_project.php new file mode 100644 index 00000000000..7e05c24ed56 --- /dev/null +++ b/htdocs/admin/pdf_project.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'project', $langs->trans("Project"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFProjectDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_proposal.php b/htdocs/admin/pdf_proposal.php new file mode 100644 index 00000000000..dc35a1cd538 --- /dev/null +++ b/htdocs/admin/pdf_proposal.php @@ -0,0 +1,123 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'proposal', $langs->trans("Proposals"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFProposalDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + +print ''; + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_GENERATE_PROPOSALS_WITH_PICTURE", $arrval, $conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE); +} +print '
'.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", $arrval, $conf->global->MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING); +} +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_recruitment.php b/htdocs/admin/pdf_recruitment.php new file mode 100644 index 00000000000..4e81e70802c --- /dev/null +++ b/htdocs/admin/pdf_recruitment.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'recruitment', $langs->trans("recruitment"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFRecruitmentDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_supplierinvoice.php b/htdocs/admin/pdf_supplierinvoice.php new file mode 100644 index 00000000000..c244e70457b --- /dev/null +++ b/htdocs/admin/pdf_supplierinvoice.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'supplierinvoice', $langs->trans("supplierinvoice"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFSupplierinvoiceDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_supplierorder.php b/htdocs/admin/pdf_supplierorder.php new file mode 100644 index 00000000000..98340aced97 --- /dev/null +++ b/htdocs/admin/pdf_supplierorder.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'supplierorder', $langs->trans("supplierorder"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFSupplierorderDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 529355b94b2..1d55b45c221 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -12,6 +12,7 @@ * Copyright (C) 2015-2016 Marcos García * Copyright (C) 2019 Lenin Rivas * Copyright (C) 2020 Nicolas ZABOURI + * Copyright (C) 2021 Anthony Berton * * 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 @@ -35,6 +36,85 @@ */ +/** + * Return array head with list of tabs to view object informations. + * + * @return array head array with tabs + */ +function pdf_admin_prepare_head() +{ + global $langs, $conf, $user; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf.php'; + $head[$h][1] = $langs->trans("Général"); + $head[$h][2] = 'general'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'pdf_admin'); + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_project.php'; + $head[$h][1] = $langs->trans("Project"); + $head[$h][2] = 'project'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_proposal.php'; + $head[$h][1] = $langs->trans("Proposal"); + $head[$h][2] = 'proposal'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_order.php'; + $head[$h][1] = $langs->trans("Order"); + $head[$h][2] = 'order'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_invoice.php'; + $head[$h][1] = $langs->trans("Invoice"); + $head[$h][2] = 'invoice'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_Ticket.php'; + $head[$h][1] = $langs->trans("Ticket"); + $head[$h][2] = 'ticket'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_intervention.php'; + $head[$h][1] = $langs->trans("Intervention"); + $head[$h][2] = 'intervention'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierproposal.php'; + $head[$h][1] = $langs->trans("SupplierProposal"); + $head[$h][2] = 'supplierproposal'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierorder.php'; + $head[$h][1] = $langs->trans("SupplierOrder"); + $head[$h][2] = 'supplierorder'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierinvoice.php'; + $head[$h][1] = $langs->trans("SuppliersInvoice"); + $head[$h][2] = 'supplierinvoice'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_recruitment.php'; + $head[$h][1] = $langs->trans("Recruitment"); + $head[$h][2] = 'recruitment'; + $h++; + + complete_head_from_modules($conf, $langs, null, $head, $h, 'pdf_admin', 'remove'); + + return $head; +} + + /** * Return array with format properties of default PDF format * diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6a11c26c50c..4fb5952bf5b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -398,6 +398,16 @@ SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF PDFDesc=Global options for PDF generation +PDFProjectDesc=PDF Option for project +PDFProposalDesc=PDF Option for proposal +PDFOrderDesc=PDF Option for order +PDFInvoiceDesc=PDF Option for invoice +PDFTicketDesc=PDF Option for ticket +PDFInterventionDesc=PDF option for intervention +PDFSupplierproposalDesc=PDF Option for supplier proposal +PDFSupplierorderDesc=PDF Option for supplier order +PDFSupplierinvoiceDesc=PDF Option for supplier invoice +PDFRecruitmentDesc=PDF Option for recrutment PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT @@ -1977,6 +1987,8 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF +MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal ligne +MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.
For example:
CODEGRP1+CODEGRP2 From e7242cb87fcb7faef52e368b22caf7ecf630a431 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Tue, 27 Apr 2021 00:23:59 +0200 Subject: [PATCH 2/3] next --- htdocs/admin/pdf_supplierproposal.php | 110 ++++++++++++++++++++++++++ htdocs/admin/pdf_ticket.php | 110 ++++++++++++++++++++++++++ 2 files changed, 220 insertions(+) create mode 100644 htdocs/admin/pdf_supplierproposal.php create mode 100644 htdocs/admin/pdf_ticket.php diff --git a/htdocs/admin/pdf_supplierproposal.php b/htdocs/admin/pdf_supplierproposal.php new file mode 100644 index 00000000000..45fd337354a --- /dev/null +++ b/htdocs/admin/pdf_supplierproposal.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'supplierproposal', $langs->trans("supplierproposal"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFSupplierproposalDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_ticket.php b/htdocs/admin/pdf_ticket.php new file mode 100644 index 00000000000..b8fbaed3b5c --- /dev/null +++ b/htdocs/admin/pdf_ticket.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'ticket', $langs->trans("Ticket"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFTicketDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); From 5d17e267385760d89541529c359c80db01058c8b Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Wed, 28 Apr 2021 23:25:03 +0200 Subject: [PATCH 3/3] add_pdf_template_and_read_if_module_activate --- htdocs/admin/pdf.php | 2 +- htdocs/admin/pdf_adherent.php | 110 +++++++++++++++++++ htdocs/admin/pdf_contrat.php | 110 +++++++++++++++++++ htdocs/admin/pdf_expensereport.php | 110 +++++++++++++++++++ htdocs/admin/pdf_holiday.php | 110 +++++++++++++++++++ htdocs/admin/pdf_intervention.php | 2 +- htdocs/admin/pdf_invoice.php | 2 +- htdocs/admin/pdf_order.php | 2 +- htdocs/admin/pdf_project.php | 2 +- htdocs/admin/pdf_proposal.php | 2 +- htdocs/admin/pdf_reception.php | 110 +++++++++++++++++++ htdocs/admin/pdf_recruitment.php | 2 +- htdocs/admin/pdf_shipment.php | 110 +++++++++++++++++++ htdocs/admin/pdf_stock.php | 110 +++++++++++++++++++ htdocs/admin/pdf_supplierinvoice.php | 2 +- htdocs/admin/pdf_supplierorder.php | 2 +- htdocs/admin/pdf_supplierproposal.php | 2 +- htdocs/admin/pdf_ticket.php | 2 +- htdocs/core/lib/pdf.lib.php | 148 +++++++++++++++++--------- htdocs/langs/en_US/admin.lang | 7 ++ 20 files changed, 888 insertions(+), 59 deletions(-) create mode 100644 htdocs/admin/pdf_adherent.php create mode 100644 htdocs/admin/pdf_contrat.php create mode 100644 htdocs/admin/pdf_expensereport.php create mode 100644 htdocs/admin/pdf_holiday.php create mode 100644 htdocs/admin/pdf_reception.php create mode 100644 htdocs/admin/pdf_shipment.php create mode 100644 htdocs/admin/pdf_stock.php diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 0ee42d6cddf..348f1e30cb5 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_adherent.php b/htdocs/admin/pdf_adherent.php new file mode 100644 index 00000000000..af570117492 --- /dev/null +++ b/htdocs/admin/pdf_adherent.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'adherent', $langs->trans("Adherent"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFAdherentDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_contrat.php b/htdocs/admin/pdf_contrat.php new file mode 100644 index 00000000000..b6624ba59d6 --- /dev/null +++ b/htdocs/admin/pdf_contrat.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'contrat', $langs->trans("Contrat"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFContratDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_expensereport.php b/htdocs/admin/pdf_expensereport.php new file mode 100644 index 00000000000..3620679f525 --- /dev/null +++ b/htdocs/admin/pdf_expensereport.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'expensereport', $langs->trans("Expensereport"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFExpensereportDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_holiday.php b/htdocs/admin/pdf_holiday.php new file mode 100644 index 00000000000..7b6074b31aa --- /dev/null +++ b/htdocs/admin/pdf_holiday.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'holiday', $langs->trans("Holiday"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFHolidaytDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_intervention.php b/htdocs/admin/pdf_intervention.php index f7a0244f9ab..993e1f1f5b1 100644 --- a/htdocs/admin/pdf_intervention.php +++ b/htdocs/admin/pdf_intervention.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_invoice.php b/htdocs/admin/pdf_invoice.php index 69859b9ea30..9064d2fd499 100644 --- a/htdocs/admin/pdf_invoice.php +++ b/htdocs/admin/pdf_invoice.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_order.php b/htdocs/admin/pdf_order.php index e3a725eb33a..b81cc649d61 100644 --- a/htdocs/admin/pdf_order.php +++ b/htdocs/admin/pdf_order.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_project.php b/htdocs/admin/pdf_project.php index 7e05c24ed56..3a85f0ea258 100644 --- a/htdocs/admin/pdf_project.php +++ b/htdocs/admin/pdf_project.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_proposal.php b/htdocs/admin/pdf_proposal.php index dc35a1cd538..06d7bc6f15c 100644 --- a/htdocs/admin/pdf_proposal.php +++ b/htdocs/admin/pdf_proposal.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_reception.php b/htdocs/admin/pdf_reception.php new file mode 100644 index 00000000000..32003e51f30 --- /dev/null +++ b/htdocs/admin/pdf_reception.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'reception', $langs->trans("reception"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFReceptionDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_recruitment.php b/htdocs/admin/pdf_recruitment.php index 4e81e70802c..575d3bc23cc 100644 --- a/htdocs/admin/pdf_recruitment.php +++ b/htdocs/admin/pdf_recruitment.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_shipment.php b/htdocs/admin/pdf_shipment.php new file mode 100644 index 00000000000..d456a6fb2ea --- /dev/null +++ b/htdocs/admin/pdf_shipment.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'shipment', $langs->trans("shipment"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFShipmentDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_stock.php b/htdocs/admin/pdf_stock.php new file mode 100644 index 00000000000..e6b0af587b0 --- /dev/null +++ b/htdocs/admin/pdf_stock.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012-2107 Juanjo Menent + * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/pdf.php + * \brief Page to setup PDF options + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); + +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); + + +/* + * Actions + */ + +if ($cancel) { + $action = ''; +} + +if ($action == 'update') { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + + +/* + * View + */ + +$wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +$form = new Form($db); +$formother = new FormOther($db); +$formadmin = new FormAdmin($db); + +print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); + +$head = pdf_admin_prepare_head(); + +print dol_get_fiche_head($head, 'stock', $langs->trans("Stock"), -1, 'pdf'); + +print ''.$form->textwithpicto($langs->trans("PDFStockDesc"), $s)."
\n"; +print "
\n"; + +print '
'; +print ''; +print ''; + +print '
'; +print ''; +print ''; + + +print ''; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("").''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print '
'; + +print '
'; + + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/pdf_supplierinvoice.php b/htdocs/admin/pdf_supplierinvoice.php index c244e70457b..57dd647139d 100644 --- a/htdocs/admin/pdf_supplierinvoice.php +++ b/htdocs/admin/pdf_supplierinvoice.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_supplierorder.php b/htdocs/admin/pdf_supplierorder.php index 98340aced97..ecf0ad4cae8 100644 --- a/htdocs/admin/pdf_supplierorder.php +++ b/htdocs/admin/pdf_supplierorder.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_supplierproposal.php b/htdocs/admin/pdf_supplierproposal.php index 45fd337354a..3fb929ed797 100644 --- a/htdocs/admin/pdf_supplierproposal.php +++ b/htdocs/admin/pdf_supplierproposal.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/admin/pdf_ticket.php b/htdocs/admin/pdf_ticket.php index b8fbaed3b5c..5ca775e2447 100644 --- a/htdocs/admin/pdf_ticket.php +++ b/htdocs/admin/pdf_ticket.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks')); +$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'stocks', 'Trips')); if (!$user->admin) { accessforbidden(); diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 1d55b45c221..05f53b72df7 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -59,55 +59,107 @@ function pdf_admin_prepare_head() // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'pdf_admin'); - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_project.php'; - $head[$h][1] = $langs->trans("Project"); - $head[$h][2] = 'project'; - $h++; + if (!empty($conf->adherent->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_adherent.php'; + $head[$h][1] = $langs->trans("Adherent"); + $head[$h][2] = 'adherent'; + $h++; + } + if (!empty($conf->projet->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_project.php'; + $head[$h][1] = $langs->trans("Project"); + $head[$h][2] = 'project'; + $h++; + } + if (!empty($conf->propal->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_proposal.php'; + $head[$h][1] = $langs->trans("Proposal"); + $head[$h][2] = 'proposal'; + $h++; + } + if (!empty($conf->commande->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_order.php'; + $head[$h][1] = $langs->trans("Order"); + $head[$h][2] = 'order'; + $h++; + } + if (!empty($conf->facture->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_invoice.php'; + $head[$h][1] = $langs->trans("Invoice"); + $head[$h][2] = 'invoice'; + $h++; + } + if (!empty($conf->expedition->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_shipment.php'; + $head[$h][1] = $langs->trans("Sendings"); + $head[$h][2] = 'shipment'; + $h++; + } + if (!empty($conf->reception->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_reception.php'; + $head[$h][1] = $langs->trans("Reception"); + $head[$h][2] = 'reception'; + $h++; + } + if (!empty($conf->ticket->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_Ticket.php'; + $head[$h][1] = $langs->trans("Ticket"); + $head[$h][2] = 'ticket'; + $h++; + } + if (!empty($conf->ficheinter->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_intervention.php'; + $head[$h][1] = $langs->trans("Intervention"); + $head[$h][2] = 'intervention'; + $h++; + } + if (!empty($conf->supplier_proposal->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierproposal.php'; + $head[$h][1] = $langs->trans("SupplierProposal"); + $head[$h][2] = 'supplierproposal'; + $h++; + } + if (!empty($conf->fournisseur->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierorder.php'; + $head[$h][1] = $langs->trans("SupplierOrder"); + $head[$h][2] = 'supplierorder'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_proposal.php'; - $head[$h][1] = $langs->trans("Proposal"); - $head[$h][2] = 'proposal'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_order.php'; - $head[$h][1] = $langs->trans("Order"); - $head[$h][2] = 'order'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_invoice.php'; - $head[$h][1] = $langs->trans("Invoice"); - $head[$h][2] = 'invoice'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_Ticket.php'; - $head[$h][1] = $langs->trans("Ticket"); - $head[$h][2] = 'ticket'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_intervention.php'; - $head[$h][1] = $langs->trans("Intervention"); - $head[$h][2] = 'intervention'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierproposal.php'; - $head[$h][1] = $langs->trans("SupplierProposal"); - $head[$h][2] = 'supplierproposal'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierorder.php'; - $head[$h][1] = $langs->trans("SupplierOrder"); - $head[$h][2] = 'supplierorder'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierinvoice.php'; - $head[$h][1] = $langs->trans("SuppliersInvoice"); - $head[$h][2] = 'supplierinvoice'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_recruitment.php'; - $head[$h][1] = $langs->trans("Recruitment"); - $head[$h][2] = 'recruitment'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_supplierinvoice.php'; + $head[$h][1] = $langs->trans("SuppliersInvoice"); + $head[$h][2] = 'supplierinvoice'; + $h++; + } + if (!empty($conf->recruitment->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_recruitment.php'; + $head[$h][1] = $langs->trans("Recruitment"); + $head[$h][2] = 'recruitment'; + $h++; + } + if (!empty($conf->contrat->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_contrat.php'; + $head[$h][1] = $langs->trans("Contrat"); + $head[$h][2] = 'contrat'; + $h++; + } + if (!empty($conf->stock->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_stock.php'; + $head[$h][1] = $langs->trans("Stock"); + $head[$h][2] = 'stock'; + $h++; + } + if (!empty($conf->holiday->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_holiday.php'; + $head[$h][1] = $langs->trans("Holidays"); + $head[$h][2] = 'holiday'; + $h++; + } + if (!empty($conf->expensereport->enabled)) { + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_expensereport.php'; + $head[$h][1] = $langs->trans("Trips"); + $head[$h][2] = 'expensereport'; + $h++; + } complete_head_from_modules($conf, $langs, null, $head, $h, 'pdf_admin', 'remove'); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4fb5952bf5b..1cddacbaeb1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -402,12 +402,19 @@ PDFProjectDesc=PDF Option for project PDFProposalDesc=PDF Option for proposal PDFOrderDesc=PDF Option for order PDFInvoiceDesc=PDF Option for invoice +PDFShipmentDesc=PDF Option for shipment +PDFReceptionDesc=PDF Option for reception PDFTicketDesc=PDF Option for ticket PDFInterventionDesc=PDF option for intervention PDFSupplierproposalDesc=PDF Option for supplier proposal PDFSupplierorderDesc=PDF Option for supplier order PDFSupplierinvoiceDesc=PDF Option for supplier invoice PDFRecruitmentDesc=PDF Option for recrutment +PDFContratDesc=PDF Option for contrat +PDFStockDesc=PDF Option for stock +PDFHolidaytDesc=PDF Option for holiday +PDFExpensereportDesc=PDF Option for Expensereport +PDFAdherentDescPDF Option for Adhrent PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT