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