clean code (#38081)
* clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code * clean code --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
0a1cba2486
commit
bd6dba76ba
32 changed files with 205 additions and 224 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -51,7 +51,6 @@ $langs->loadLangs(array("admin", "members"));
|
|||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
// Hook to be used by external payment modules (ie Payzen, ...)
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager->initHooks(array('newpayment'));
|
||||
|
||||
if (!$user->admin) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
|
|
@ -46,13 +46,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies", "members"));
|
||||
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('membersindex'));
|
||||
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -83,8 +83,6 @@ if ($cancel) {
|
|||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
$action = 'edit';
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (C) 2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -86,7 +86,7 @@ if ($action == 'getWorkstationByProduct' && $user->hasRight('product', 'lire'))
|
|||
$error = 'NOT FOUND';
|
||||
} else {
|
||||
$error = null;
|
||||
$result['defaultWk']=$product->fk_default_workstation;
|
||||
$result['defaultWk'] = $product->fk_default_workstation;
|
||||
}
|
||||
|
||||
$result['error']=$error;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -25,21 +25,20 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('mrp', 'other'));
|
||||
|
||||
|
|
@ -84,7 +83,6 @@ if (!$sortorder) {
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = getMultidirOutput($object) . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomagenda', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -30,6 +30,7 @@ require '../main.inc.php';
|
|||
* The main.inc.php has been included so the following variable are now defined:
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
|
|
@ -63,7 +64,6 @@ $hideref = (GETPOSTINT('hideref') ? GETPOSTINT('hideref') : (getDolGlobalString(
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = getMultidirOutput($object) . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomcard', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -25,6 +25,14 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
|
@ -32,14 +40,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp", "companies", "other", "mails"));
|
||||
|
||||
|
|
@ -75,7 +75,6 @@ if (!$sortfield) {
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = getMultidirOutput($object) . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomdocument', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -25,20 +25,20 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('mrp', 'other'));
|
||||
|
||||
|
|
@ -73,7 +73,6 @@ $pagenext = $page + 1;
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = getMultidirOutput($object) . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('bomlist')); // Note that conf->hooks_modules contains array
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -25,19 +25,19 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp", "other", "stocks"));
|
||||
|
|
@ -45,17 +45,16 @@ $langs->loadLangs(array("mrp", "other", "stocks"));
|
|||
// Get parameters
|
||||
$id = GETPOSTINT('id');
|
||||
$lineid = GETPOSTINT('lineid');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bomnet_needs'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// Initialize a technical objects for hooks
|
||||
$hookmanager->initHooks(array('bomnetneeds')); // Note that conf->hooks_modules contains array
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -24,16 +24,17 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mrp", "companies"));
|
||||
|
|
@ -47,7 +48,6 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new BOM($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// Initialize a technical objects for hooks
|
||||
$hookmanager->initHooks(array('bomnote', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
|
@ -30,10 +30,8 @@
|
|||
*/
|
||||
function bomAdminPrepareHead()
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $langs, $conf, $extrafields;
|
||||
|
||||
global $db;
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extrafields->fetch_name_optionals_label('bom_bom');
|
||||
$extrafields->fetch_name_optionals_label('bom_bomline');
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -31,6 +31,13 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
|
|
@ -48,16 +55,8 @@ if (isModEnabled('intervention')) {
|
|||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager->initHooks(array('commercialindex'));
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -28,9 +28,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -38,8 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('mailingindex'));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -23,6 +23,14 @@
|
|||
* \brief Tab of events on Proposal
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
|
|
@ -30,13 +38,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
|||
require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("propal", "other"));
|
||||
|
|
@ -80,7 +81,6 @@ if (!$sortorder) {
|
|||
|
||||
// Initialize a technical objects
|
||||
$object = new Propal($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->propal->multidir_output[$conf->entity] . '/temp/massgeneration/' . $user->id;
|
||||
$hookmanager->initHooks(array('propalagenda', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
|
|
@ -96,6 +96,7 @@ $permissiontoread = $user->hasRight("propal", "lire");
|
|||
$permissiontoadd = $user->hasRight("propal", "creer");
|
||||
|
||||
// Security check
|
||||
$socid = '';
|
||||
if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
|
@ -150,7 +151,11 @@ if ($object->id > 0) {
|
|||
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||
$query = ['restore_lastsearch_values' => 1];
|
||||
if (!empty($socid) && $socid > 0) {
|
||||
$query += ['socid' => $socid];
|
||||
}
|
||||
$linkback = '<a href="' . dolBuildUrl(DOL_URL_ROOT . '/comm/propal/list.php', $query) . '">' . $langs->trans("BackToList") . '</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
// Ref customer
|
||||
|
|
@ -167,7 +172,7 @@ if ($object->id > 0) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="' . dolBuildUrl($_SERVER['PHP_SELF'], ['action' => 'classify', 'id' => $object->id], true) . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project(dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id]), $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Lenin Rivas <lenin.rivas777@gmail.com>
|
||||
|
|
@ -182,14 +182,14 @@ if ($reshook < 0) {
|
|||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
if (empty($reshook)) {
|
||||
$backurlforlist = DOL_URL_ROOT . '/comm/propal/list.php';
|
||||
$backurlforlist = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/list.php');
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = DOL_URL_ROOT . '/comm/propal/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__');
|
||||
$backtopage = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/card.php', ['id' => ((!empty($id) && $id > 0) ? $id : '__ID__')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ if (empty($reshook)) {
|
|||
// Cancel proposal
|
||||
$result = $object->setCancel($user);
|
||||
if ($result > 0) {
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
|
||||
header('Location: ' . dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]));
|
||||
exit();
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
|
|
@ -296,7 +296,7 @@ if (empty($reshook)) {
|
|||
// Delete proposal
|
||||
$result = $object->delete($user);
|
||||
if ($result > 0) {
|
||||
header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1');
|
||||
header('Location: ' . dolBuildUrl(DOL_URL_ROOT . '/comm/propal/list.php', ['restore_lastsearch_values' => 1]));
|
||||
exit();
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
|
|
@ -472,7 +472,7 @@ if (empty($reshook)) {
|
|||
} elseif ($action == 'setdate_livraison' && $usercancreate) {
|
||||
$result = $object->setDeliveryDate($user, dol_mktime(12, 0, 0, GETPOSTINT('date_livraisonmonth'), GETPOSTINT('date_livraisonday'), GETPOSTINT('date_livraisonyear')));
|
||||
if ($result < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'setref_client' && $usercancreate) {
|
||||
// Positionne ref client
|
||||
|
|
@ -483,8 +483,14 @@ if (empty($reshook)) {
|
|||
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm') && $usercancreate) {
|
||||
// Set incoterm
|
||||
$result = $object->setIncoterms(GETPOSTINT('incoterm_id'), GETPOST('location_incoterms'));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'settags' && isModEnabled('category') && $usercancreate) { // Set tags
|
||||
$result = $object->setCategories(GETPOST('categories', 'array'));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'add' && $usercancreate) {
|
||||
// Create proposal
|
||||
$object->socid = $socid;
|
||||
|
|
@ -1003,10 +1009,16 @@ if (empty($reshook)) {
|
|||
}
|
||||
} elseif ($action == 'addline' && GETPOST('updateallvatlinesblock', 'alpha') && GETPOST('vatforblocklines', 'alpha') !== '' && $usercancreate) {
|
||||
$tx_tva = GETPOST('vatforblocklines') ? GETPOST('vatforblocklines') : 0;
|
||||
$object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'tva', $tx_tva);
|
||||
$result = $object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'tva', $tx_tva);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
} elseif ($action == 'addline' && GETPOST('updatealldiscountlinesblock', 'alpha') && GETPOST('discountforblocklines', 'alpha') !== '' && $usercancreate) {
|
||||
$discount = GETPOST('discountforblocklines') ? GETPOST('discountforblocklines') : 0;
|
||||
$object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'discount', $discount);
|
||||
$result = $object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'discount', $discount);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2022 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
|
|
@ -3562,8 +3562,8 @@ class Propal extends CommonObject
|
|||
$response->warning_delay = $delay_warning / 60 / 60 / 24;
|
||||
$response->label = $label;
|
||||
$response->labelShort = $labelShort;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?search_option=late&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->url = dolBuildUrl(DOL_URL_ROOT.'/comm/propal/list.php', ['search_status' => $status, 'mainmenu' => 'commercial', 'leftmenu' => 'propals']);
|
||||
$response->url_late = dolBuildUrl(DOL_URL_ROOT.'/comm/propal/list.php', ['search_option' => 'late', 'mainmenu' => 'commercial', 'leftmenu' => 'propals', 'sortfield' => 'p.datep', 'sortorder' => 'asc']);
|
||||
$response->img = img_object('', "propal");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
|
@ -3979,7 +3979,7 @@ class Propal extends CommonObject
|
|||
|
||||
if ($txttoshow) {
|
||||
$result .= ' <span class="note inline-block">';
|
||||
$result .= '<a href="'.DOL_URL_ROOT.'/comm/propal/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($txttoshow).'">';
|
||||
$result .= '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/comm/propal/note.php', ['id' => $this->id]).'" class="classfortooltip" title="'.dol_escape_htmltag($txttoshow).'">';
|
||||
$result .= img_picto('', 'note');
|
||||
$result .= '</a>';
|
||||
$result .= '</span>';
|
||||
|
|
@ -4025,12 +4025,10 @@ class Propal extends CommonObject
|
|||
$outputlangs->loadLangs(array("propale", "products"));
|
||||
|
||||
if (!dol_strlen($modele)) {
|
||||
$modele = 'azur';
|
||||
$modele = getDolGlobalString('PROPALE_ADDON_PDF', 'cyan');
|
||||
|
||||
if ($this->model_pdf) {
|
||||
$modele = $this->model_pdf;
|
||||
} elseif (getDolGlobalString('PROPALE_ADDON_PDF')) {
|
||||
$modele = getDolGlobalString('PROPALE_ADDON_PDF');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -30,6 +30,13 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
|
@ -39,13 +46,6 @@ if (isModEnabled('project')) {
|
|||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('propal', 'compta', 'other', 'companies'));
|
||||
|
|
@ -133,8 +133,11 @@ if ($object->id > 0) {
|
|||
|
||||
|
||||
// Proposal card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
$query = ['restore_lastsearch_values' => 1];
|
||||
if (!empty($socid) && $socid > 0) {
|
||||
$query += ['socid' => $socid];
|
||||
}
|
||||
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/comm/propal/list.php', $query).'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -28,10 +28,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -39,9 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager->initHooks(array('proposalindex'));
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
|
|
@ -42,6 +42,14 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php';
|
||||
|
|
@ -58,13 +66,6 @@ if (isModEnabled('category')) {
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'sendings', 'categories'));
|
||||
|
|
@ -207,7 +208,6 @@ $diroutputmassaction = $conf->propal->multidir_output[$conf->entity].'/temp/mass
|
|||
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
$object = new Propal($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 Valentin Grimal <valentin.grimal@pichinov.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -27,12 +27,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -40,6 +34,11 @@ require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("propal");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -111,8 +111,11 @@ if ($object->id > 0) {
|
|||
|
||||
|
||||
// Proposal card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
$query = ['restore_lastsearch_values' => 1];
|
||||
if (!empty($socid) && $socid > 0) {
|
||||
$query += ['socid' => $socid];
|
||||
}
|
||||
$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/comm/propal/list.php', $query).'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
|
|
@ -130,7 +133,7 @@ if ($object->id > 0) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.dolBuildUrl($_SERVER['PHP_SELF'], ['action' => 'classify', 'id' => $object->id], true).'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project(dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id]), $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -33,15 +33,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -50,8 +41,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('specialexpensesindex'));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
|
|
@ -39,7 +40,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('companies', 'admin', 'donations'));
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
|
||||
// List of supported format
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -50,7 +50,6 @@ $langs->loadLangs(array("admin", "donations"));
|
|||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
// Hook to be used by external payment modules (ie Payzen, ...)
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager->initHooks(array('newpayment'));
|
||||
|
||||
if (!$user->admin) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -329,21 +329,6 @@ if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sear
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-donation page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
|
||||
|
||||
// Example : Adding jquery code
|
||||
// print '<script type="text/javascript">
|
||||
// jQuery(document).ready(function() {
|
||||
// function init_myfunc()
|
||||
// {
|
||||
// jQuery("#myid").removeAttr(\'disabled\');
|
||||
// jQuery("#myid").attr(\'disabled\',\'disabled\');
|
||||
// }
|
||||
// init_myfunc();
|
||||
// jQuery("#mybutton").click(function() {
|
||||
// init_myfunc();
|
||||
// });
|
||||
// });
|
||||
// </script>';
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
$param = '';
|
||||
|
|
@ -602,10 +587,10 @@ while ($i < $imaxinloop) {
|
|||
|
||||
$donationstatic->setVarsFromFetchObj($obj);
|
||||
|
||||
$donationstatic->id = $obj->rowid;
|
||||
$donationstatic->id = (int) $obj->rowid;
|
||||
$donationstatic->ref = ($obj->ref ? $obj->ref : $obj->rowid);
|
||||
$donationstatic->date = $db->jdate($obj->datedon);
|
||||
$donationstatic->status = $obj->status;
|
||||
$donationstatic->status = (int) $obj->status;
|
||||
$donationstatic->lastname = $obj->lastname;
|
||||
$donationstatic->firstname = $obj->firstname;
|
||||
$object = $donationstatic;
|
||||
|
|
@ -699,7 +684,7 @@ while ($i < $imaxinloop) {
|
|||
print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
|
||||
// Status
|
||||
print '<td class="center">'.$donationstatic->LibStatut($obj->status, 5).'</td>';
|
||||
print '<td class="center">'.$donationstatic->LibStatut($donationstatic->status, 5).'</td>';
|
||||
|
||||
// Action column
|
||||
if (empty($conf->main_checkbox_left_column)) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -49,8 +49,9 @@ $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; //
|
|||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sclist';
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array:int'); // Array of ids of elements selected into a list
|
||||
|
||||
$paiementid = GETPOSTINT('paiementid');
|
||||
$paiementid = GETPOSTINT('paiementid');
|
||||
|
||||
$search_ref = GETPOST("search_ref", "alpha");
|
||||
$search_date_startday = GETPOSTINT('search_date_startday');
|
||||
|
|
@ -270,6 +271,7 @@ $num = $db->num_rows($resql);
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
|
||||
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
$param = '';
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
|
|
@ -340,10 +342,10 @@ if ($search_all) {
|
|||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields
|
||||
$massactionbutton = '';
|
||||
if ($massactionbutton) {
|
||||
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
}
|
||||
// $massactionbutton = '';
|
||||
// if ($massactionbutton) {
|
||||
// $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
// }
|
||||
|
||||
$moreforfilter = '';
|
||||
print '<div class="div-table-responsive">';
|
||||
|
|
@ -530,7 +532,7 @@ while ($i < $imaxinloop) {
|
|||
print '<tr class="oddeven">';
|
||||
if ($conf->main_checkbox_left_column) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
if (/* $massactionbutton || */ $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->id_paiement, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
|
|
@ -640,7 +642,7 @@ while ($i < $imaxinloop) {
|
|||
|
||||
if (!$conf->main_checkbox_left_column) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
if (/* $massactionbutton || */ $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($obj->id_paiement, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -25,6 +25,13 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
|
@ -33,13 +40,6 @@ if (isModEnabled("bank")) {
|
|||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("bills", "banks", "companies", "donations"));
|
||||
|
|
@ -109,8 +109,8 @@ if (empty($object->id)) {
|
|||
|
||||
$h = 0;
|
||||
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT.'/don/payment/card.php?id='.$id;
|
||||
$head = [];
|
||||
$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/don/payment/card.php', ['id'=> $id]);
|
||||
$head[$h][1] = $langs->trans("DonationPayment");
|
||||
$hselected = (string) $h;
|
||||
$h++;
|
||||
|
|
@ -236,9 +236,9 @@ print '<div class="tabsAction">';
|
|||
if (empty($action)) {
|
||||
if ($user->hasRight('don', 'supprimer')) {
|
||||
if (!$disable_delete) {
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1);
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'delete'], true), '', 1);
|
||||
} else {
|
||||
print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, [ 'attr' => ['classOverride' => 'butActionRefused']]);
|
||||
print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id], false, '#'), '', 1, ['attr' => ['classOverride' => 'butActionRefused']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -124,7 +124,7 @@ if (!$mesg) {
|
|||
$data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear);
|
||||
|
||||
$filenameamount = $dir."/donationamount-".$year.".png";
|
||||
$fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=donationStats&file=donationamoutinyear-'.$year.'.png';
|
||||
$fileurlamount = dolBuildUrl(DOL_URL_ROOT.'/viewimage.php', ['modulepart' => 'donationStats', 'file' => 'donationamoutinyear-'.$year.'.png']);
|
||||
|
||||
$px2 = new DolGraph();
|
||||
$mesg = $px2->isGraphKo();
|
||||
|
|
@ -153,7 +153,7 @@ if (!$mesg) {
|
|||
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||
|
||||
$filename_avg = $dir."/donationaverage-".$year.".png";
|
||||
$fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=donationStats&file=donationaverageinyear-'.$year.'.png';
|
||||
$fileurl_avg = dolBuildUrl(DOL_URL_ROOT.'/viewimage.php', ['modulepart' => 'donationStats', 'file' => 'donationaverageinyear-'.$year.'.png']);
|
||||
|
||||
$px3 = new DolGraph();
|
||||
$mesg = $px3->isGraphKo();
|
||||
|
|
@ -290,7 +290,7 @@ foreach ($data as $val) {
|
|||
while (!empty($year) && $oldyear > (int) $year + 1) {
|
||||
$oldyear--;
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
||||
print '<td class="center"><a href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['year' => $oldyear]).'">'.$oldyear.'</a></td>';
|
||||
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right"></td>';
|
||||
|
|
@ -306,7 +306,14 @@ foreach ($data as $val) {
|
|||
$greenavg = (empty($val['avg_diff']) || $val['avg_diff'] >= 0);
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
|
||||
$query = ['year' => $year, 'mode' => $mode];
|
||||
if ($socid > 0) {
|
||||
$query += ['socid' => $socid];
|
||||
}
|
||||
if ($userid > 0) {
|
||||
$query += ['userid' => $userid];
|
||||
}
|
||||
print '<td align="center"><a href="'.dolBuildUrl($_SERVER["PHP_SELF"], $query).'">'.$year.'</a></td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td class="right opacitylow" style="'.($greennb ? 'color: green;' : 'color: red;').'">'.(!empty($val['nb_diff']) && $val['nb_diff'] < 0 ? '' : '+').round(!empty($val['nb_diff']) ? $val['nb_diff'] : 0).'%</td>';
|
||||
print '<td class="right"><span class="amount">'.price(price2num($val['total'], 'MT'), 1).'</span></td>';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2012-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -30,6 +30,13 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
|
@ -53,20 +60,10 @@ if (isModEnabled('holiday')) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('users', 'holiday', 'trips', 'boxes'));
|
||||
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
$hookmanager = new HookManager($db);
|
||||
|
||||
$hookmanager->initHooks(array('hrmindex'));
|
||||
|
||||
// Get Parameters
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
|
|
@ -35,6 +32,8 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
|||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php";
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("opensurvey");
|
||||
|
|
@ -44,8 +43,6 @@ if (!$user->hasRight('opensurvey', 'read')) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('opensurveyindex'));
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -44,8 +44,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('projects', 'companies'));
|
||||
|
||||
$hookmanager = new HookManager($db);
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager->initHooks(array('projectsindex'));
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -46,7 +46,6 @@ $langs->load("companies");
|
|||
|
||||
|
||||
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||
$hookmanager = new HookManager($db);
|
||||
$hookmanager->initHooks(array('thirdpartiesindex'));
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue