QUAL - Supplier modules - Separate - admin supplier order head (#37780)
This commit is contained in:
parent
2affbb79f8
commit
e447869e92
3 changed files with 67 additions and 38 deletions
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 Pierre Ardoin <developpeur@lesmetiersdubatiment.fr>
|
||||
* Copyright (C) 2026 Pierre Ardoin <developpeur@lesmetiersdubatiment.fr>
|
||||
* Copyright (C) 2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -32,11 +33,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/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
|
|
@ -47,6 +43,17 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/supplier_order.lib.php';
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "other", "orders", "stocks"));
|
||||
|
||||
|
|
@ -230,7 +237,11 @@ print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup'
|
|||
|
||||
print "<br>";
|
||||
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
$head = supplier_order_admin_prepare_head();
|
||||
} else {
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
}
|
||||
|
||||
print dol_get_fiche_head($head, 'order', $langs->trans("Suppliers"), -1, 'company');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -29,9 +30,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
|
|
@ -41,6 +39,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/supplier_order.lib.php';
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
|
@ -81,7 +86,11 @@ $linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore
|
|||
print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
$head = supplier_order_admin_prepare_head();
|
||||
} else {
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
}
|
||||
|
||||
print dol_get_fiche_head($head, 'supplierorder', $langs->trans("Suppliers"), -1, 'company');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -30,9 +31,6 @@
|
|||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
|
|
@ -42,6 +40,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/supplier_order.lib.php';
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
|
@ -81,7 +86,11 @@ $linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore
|
|||
print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
||||
$head = supplier_order_admin_prepare_head();
|
||||
} else {
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
}
|
||||
|
||||
print dol_get_fiche_head($head, 'supplierorderdet', $langs->trans("Suppliers"), -1, 'company');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue