From b2901bfae03f124187e8c72c23acb240e7774fc9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 May 2021 00:15:06 +0200 Subject: [PATCH] Make code simpler --- 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 | 110 ------------------ htdocs/admin/pdf_invoice.php | 110 ------------------ htdocs/admin/pdf_order.php | 110 ------------------ .../admin/{pdf_proposal.php => pdf_other.php} | 6 +- htdocs/admin/pdf_project.php | 110 ------------------ htdocs/admin/pdf_reception.php | 110 ------------------ htdocs/admin/pdf_recruitment.php | 110 ------------------ htdocs/admin/pdf_shipment.php | 110 ------------------ htdocs/admin/pdf_stock.php | 110 ------------------ htdocs/admin/pdf_supplierinvoice.php | 110 ------------------ htdocs/admin/pdf_supplierorder.php | 110 ------------------ htdocs/admin/pdf_supplierproposal.php | 110 ------------------ htdocs/admin/pdf_ticket.php | 110 ------------------ htdocs/core/lib/pdf.lib.php | 103 +--------------- htdocs/langs/en_US/admin.lang | 18 +-- 19 files changed, 9 insertions(+), 1878 deletions(-) delete mode 100644 htdocs/admin/pdf_adherent.php delete mode 100644 htdocs/admin/pdf_contrat.php delete mode 100644 htdocs/admin/pdf_expensereport.php delete mode 100644 htdocs/admin/pdf_holiday.php delete mode 100644 htdocs/admin/pdf_intervention.php delete mode 100644 htdocs/admin/pdf_invoice.php delete mode 100644 htdocs/admin/pdf_order.php rename htdocs/admin/{pdf_proposal.php => pdf_other.php} (95%) delete mode 100644 htdocs/admin/pdf_project.php delete mode 100644 htdocs/admin/pdf_reception.php delete mode 100644 htdocs/admin/pdf_recruitment.php delete mode 100644 htdocs/admin/pdf_shipment.php delete mode 100644 htdocs/admin/pdf_stock.php delete mode 100644 htdocs/admin/pdf_supplierinvoice.php delete mode 100644 htdocs/admin/pdf_supplierorder.php delete mode 100644 htdocs/admin/pdf_supplierproposal.php delete mode 100644 htdocs/admin/pdf_ticket.php diff --git a/htdocs/admin/pdf_adherent.php b/htdocs/admin/pdf_adherent.php deleted file mode 100644 index af570117492..00000000000 --- a/htdocs/admin/pdf_adherent.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index b6624ba59d6..00000000000 --- a/htdocs/admin/pdf_contrat.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index 3620679f525..00000000000 --- a/htdocs/admin/pdf_expensereport.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index 7b6074b31aa..00000000000 --- a/htdocs/admin/pdf_holiday.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index 993e1f1f5b1..00000000000 --- a/htdocs/admin/pdf_intervention.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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 deleted file mode 100644 index 9064d2fd499..00000000000 --- a/htdocs/admin/pdf_invoice.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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 deleted file mode 100644 index b81cc649d61..00000000000 --- a/htdocs/admin/pdf_order.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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_proposal.php b/htdocs/admin/pdf_other.php similarity index 95% rename from htdocs/admin/pdf_proposal.php rename to htdocs/admin/pdf_other.php index 06d7bc6f15c..9120e101232 100644 --- a/htdocs/admin/pdf_proposal.php +++ b/htdocs/admin/pdf_other.php @@ -76,11 +76,13 @@ 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 dol_get_fiche_head($head, 'other', $langs->trans("other"), -1, 'pdf'); -print ''.$form->textwithpicto($langs->trans("PDFProposalDesc"), $s)."
\n"; +print ''.$form->textwithpicto($langs->trans("PDFOtherDesc"), $s)."
\n"; print "
\n"; +print load_fiche_titre($langs->trans("Proposal"), '', ''); + print '
'; print ''; print ''; diff --git a/htdocs/admin/pdf_project.php b/htdocs/admin/pdf_project.php deleted file mode 100644 index 3a85f0ea258..00000000000 --- a/htdocs/admin/pdf_project.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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_reception.php b/htdocs/admin/pdf_reception.php deleted file mode 100644 index 32003e51f30..00000000000 --- a/htdocs/admin/pdf_reception.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index 575d3bc23cc..00000000000 --- a/htdocs/admin/pdf_recruitment.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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_shipment.php b/htdocs/admin/pdf_shipment.php deleted file mode 100644 index d456a6fb2ea..00000000000 --- a/htdocs/admin/pdf_shipment.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index e6b0af587b0..00000000000 --- a/htdocs/admin/pdf_stock.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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 deleted file mode 100644 index 57dd647139d..00000000000 --- a/htdocs/admin/pdf_supplierinvoice.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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 deleted file mode 100644 index ecf0ad4cae8..00000000000 --- a/htdocs/admin/pdf_supplierorder.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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/admin/pdf_supplierproposal.php b/htdocs/admin/pdf_supplierproposal.php deleted file mode 100644 index 3fb929ed797..00000000000 --- a/htdocs/admin/pdf_supplierproposal.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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 deleted file mode 100644 index 5ca775e2447..00000000000 --- a/htdocs/admin/pdf_ticket.php +++ /dev/null @@ -1,110 +0,0 @@ - - * 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, '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(); diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 755f292132e..086152a974b 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -49,7 +49,7 @@ function pdf_admin_prepare_head() $head = array(); $head[$h][0] = DOL_URL_ROOT.'/admin/pdf.php'; - $head[$h][1] = $langs->trans("Général"); + $head[$h][1] = $langs->trans("Common"); $head[$h][2] = 'general'; $h++; @@ -59,105 +59,10 @@ 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'); - if (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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_supplierinvoice.php'; - $head[$h][1] = $langs->trans("SuppliersInvoice"); - $head[$h][2] = 'supplierinvoice'; - $h++; - } - if (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !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 (1 == 2 && !empty($conf->expensereport->enabled)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_expensereport.php'; - $head[$h][1] = $langs->trans("Trips"); - $head[$h][2] = 'expensereport'; + $head[$h][0] = DOL_URL_ROOT.'/admin/pdf_other.php'; + $head[$h][1] = $langs->trans("Other"); + $head[$h][2] = 'other'; $h++; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index ef1573645a2..d803593bc3e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -399,23 +399,7 @@ 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 -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 +PDFOtherDesc=PDF Option specific to some modules PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT