Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-04-08 01:27:34 +02:00
commit 1b35acf102
12 changed files with 201 additions and 114 deletions

View file

@ -173,7 +173,7 @@ function supplierinvoice_prepare_head(FactureFournisseur $object)
*
* @return array<array{0:string,1:string,2:string}> head array with tabs
*/
function supplierinvoice_admin_prepare_head()
function supplier_invoice_admin_prepare_head()
{
global $langs, $conf, $user, $db;

View file

@ -21,7 +21,7 @@ CREATE TABLE llx_mymodule_myobject(
label VARCHAR(255),
qty INTEGER,
date_creation DATETIME NOT NULL,
tms TIMESTAMP,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_create INTEGER,
fk_user_modif INTEGER,
status INTEGER,

View file

@ -16,7 +16,7 @@
create table llx_mymodule_myobject_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_object integer NOT NULL,
import_key varchar(14) -- import key
) ENGINE=innodb;

View file

@ -1,14 +1,15 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 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-2013 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.facture.class.php';
/**
* @var Conf $conf
@ -47,6 +43,16 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.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_invoice.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.facture.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "other", "orders"));
@ -213,7 +219,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'invoice', $langs->trans("Suppliers"), -1, 'company');

View file

@ -1,9 +1,10 @@
<?php
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 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
@ -27,9 +28,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/fourn.lib.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
/**
* @var Conf $conf
@ -40,6 +38,14 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
* @var User $user
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
if (getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/supplier_invoice.lib.php';
} else {
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
}
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "errors", "other", "bills", "orders"));
@ -175,7 +181,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'supplierpayment', $langs->trans("Suppliers"), -1, 'company');
/*

View file

@ -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-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* 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-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* 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,8 +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
@ -41,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_invoice.lib.php';
} else {
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
}
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "other", "bills", "orders", "suppliers"));
@ -80,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'supplierinvoice', $langs->trans("Suppliers"), -1, 'company');

View file

@ -1,13 +1,14 @@
<?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-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2023 Nick Fragoulis
* 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-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2023 Nick Fragoulis
* 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
@ -31,8 +32,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 +41,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_invoice.lib.php';
} else {
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
}
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "other", "bills", "orders", "suppliers"));
@ -81,7 +87,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'attributesrec', $langs->trans("Suppliers"), -1, 'company');

View file

@ -1,13 +1,14 @@
<?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) 2013 Juanjo Menent <jmenent@2byte.es>
* 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) 2013 Juanjo Menent <jmenent@2byte.es>
* 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
@ -31,9 +32,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
@ -43,6 +41,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_invoice.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();
}
@ -83,7 +88,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'supplierinvoicedet', $langs->trans("Suppliers"), -1, 'company');

View file

@ -1,14 +1,15 @@
<?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) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* Copyright (C) 2023 Nick Fragoulis
* 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) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* Copyright (C) 2023 Nick Fragoulis
* 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
@ -32,9 +33,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
@ -44,6 +42,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_invoice.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();
}
@ -84,7 +89,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_invoice_admin_prepare_head();
} else {
$head = supplierorder_admin_prepare_head();
}
print dol_get_fiche_head($head, 'attributeslinesrec', $langs->trans("Suppliers"), -1, 'company');

View file

@ -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');

View file

@ -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');

View file

@ -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');