2004-10-19 22:19:58 +02:00
< ? php
2020-09-16 10:51:19 +02:00
/* Copyright ( C ) 2001 - 2005 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2004 - 2015 Laurent Destailleur < eldy @ users . sourceforge . net >
* Copyright ( C ) 2005 - 2012 Regis Houssin < regis . houssin @ inodbox . com >
* Copyright ( C ) 2015 Jean - François Ferry < jfefe @ aternatik . fr >
* Copyright ( C ) 2019 Nicolas ZABOURI < info @ inovea - conseil . com >
* Copyright ( C ) 2020 Pierre Ardoin < mapiolca @ me . com >
* Copyright ( C ) 2020 Tobias Sekan < tobias . sekan @ startmail . com >
2024-09-18 03:27:25 +02:00
* Copyright ( C ) 2024 MDW < mdeweerd @ users . noreply . github . com >
2024-11-04 23:53:20 +01:00
* Copyright ( C ) 2024 Frédéric France < frederic . france @ free . fr >
2002-04-29 20:01:16 +02:00
*
* 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
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2002-04-29 20:01:16 +02:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2002-04-29 20:01:16 +02:00
*/
2004-10-30 14:15:59 +02:00
2005-01-29 01:44:52 +01:00
/**
2020-09-16 10:51:19 +02:00
* \file htdocs / comm / index . php
* \ingroup commercial
* \brief Home page of commercial area
2009-01-23 01:47:23 +01:00
*/
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2012-08-22 23:24:21 +02:00
require '../main.inc.php' ;
2020-09-16 10:51:19 +02:00
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' ;
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php' ;
2021-04-26 11:59:47 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/order.lib.php' ;
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'contract' )) {
2023-08-28 14:52:59 +02:00
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php' ;
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' )) {
2022-06-22 13:24:15 +02:00
require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php' ;
}
2019-06-18 14:07:52 +02:00
2024-11-04 23:53:20 +01:00
/**
* @ var Conf $conf
* @ var DoliDB $db
* @ var HookManager $hookmanager
* @ var Translate $langs
* @ var User $user
*/
2024-06-30 21:02:50 +02:00
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
2020-09-16 10:51:19 +02:00
$hookmanager = new HookManager ( $db );
2019-06-18 14:07:52 +02:00
$hookmanager -> initHooks ( array ( 'commercialindex' ));
2018-05-26 19:03:41 +02:00
// Load translation files required by the page
2020-09-16 10:51:19 +02:00
$langs -> loadLangs ( array ( " boxes " , " commercial " , " contracts " , " orders " , " propal " , " supplier_proposal " ));
2002-04-30 12:44:42 +02:00
2020-09-16 19:39:50 +02:00
$action = GETPOST ( 'action' , 'aZ09' );
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$bid = GETPOSTINT ( 'bid' );
2012-10-13 11:41:17 +02:00
2024-01-14 12:26:37 +01:00
// Securite access client
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$socid = GETPOSTINT ( 'socid' );
2024-11-04 23:53:20 +01:00
if ( ! empty ( $user -> socid ) && $user -> socid > 0 ) {
2009-01-23 01:47:23 +01:00
$action = '' ;
2019-10-31 20:46:31 +01:00
$socid = $user -> socid ;
2003-10-14 13:02:31 +02:00
}
2024-09-18 03:27:25 +02:00
$total = 0 ;
2023-02-05 09:33:54 +01:00
2024-04-03 15:30:10 +02:00
$max = getDolGlobalInt ( 'MAIN_SIZE_SHORTLIST_LIMIT' , 5 );
2023-11-27 11:39:32 +01:00
$maxofloop = ( ! getDolGlobalString ( 'MAIN_MAXLIST_OVERLOAD' ) ? 500 : $conf -> global -> MAIN_MAXLIST_OVERLOAD );
2019-11-13 19:35:02 +01:00
$now = dol_now ();
2005-06-21 21:49:42 +02:00
2023-02-07 00:19:54 +01:00
//restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
2022-12-13 14:32:43 +01:00
if ( ! $user -> hasRight ( 'propal' , 'read' ) && ! $user -> hasRight ( 'supplier_proposal' , 'read' ) && ! $user -> hasRight ( 'commande' , 'read' ) && ! $user -> hasRight ( 'fournisseur' , 'commande' , 'read' )
2023-12-08 12:41:36 +01:00
&& ! $user -> hasRight ( 'supplier_order' , 'read' ) && ! $user -> hasRight ( 'fichinter' , 'read' ) && ! $user -> hasRight ( 'contrat' , 'read' )) {
2022-12-13 14:32:43 +01:00
accessforbidden ();
}
2021-03-29 22:43:39 +02:00
2021-04-26 10:22:28 +02:00
2021-03-29 22:43:39 +02:00
2002-05-10 14:28:10 +02:00
/*
2005-01-29 15:58:53 +01:00
* Actions
2002-05-10 14:28:10 +02:00
*/
2002-05-09 16:57:48 +02:00
2021-03-29 22:43:39 +02:00
// None
2002-05-09 16:57:48 +02:00
2005-01-29 15:58:53 +01:00
/*
2008-08-09 00:12:27 +02:00
* View
2005-01-29 15:58:53 +01:00
*/
2011-11-08 10:18:45 +01:00
$form = new Form ( $db );
2008-01-20 14:53:02 +01:00
$formfile = new FormFile ( $db );
2019-11-13 19:35:02 +01:00
$companystatic = new Societe ( $db );
2024-09-18 03:27:25 +02:00
$propalstatic = null ;
$supplierproposalstatic = null ;
$orderstatic = null ;
$supplierorderstatic = null ;
$fichinterstatic = null ;
2022-08-23 20:01:34 +02:00
if ( isModEnabled ( " propal " )) {
2021-02-22 13:14:13 +01:00
$propalstatic = new Propal ( $db );
}
2022-08-31 22:02:31 +02:00
if ( isModEnabled ( 'supplier_proposal' )) {
2021-02-22 13:14:13 +01:00
$supplierproposalstatic = new SupplierProposal ( $db );
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'order' )) {
2021-02-22 13:14:13 +01:00
$orderstatic = new Commande ( $db );
}
2023-04-18 16:15:13 +02:00
if ( isModEnabled ( " supplier_order " )) {
2021-02-22 13:14:13 +01:00
$supplierorderstatic = new CommandeFournisseur ( $db );
}
2007-07-13 19:10:38 +02:00
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' )) {
2022-06-22 13:24:15 +02:00
$fichinterstatic = new Fichinter ( $db );
}
2019-01-27 11:55:16 +01:00
llxHeader ( " " , $langs -> trans ( " CommercialArea " ));
2006-04-08 00:27:25 +02:00
2019-09-28 06:02:25 +02:00
print load_fiche_titre ( $langs -> trans ( " CommercialArea " ), '' , 'commercial' );
2002-05-09 16:57:48 +02:00
2024-06-27 10:41:55 +02:00
print '<div class="fichecenter">' ;
print '<div class="twocolumns">' ;
print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">' ;
2004-05-08 20:44:22 +02:00
2021-08-23 23:53:58 +02:00
$tmp = getCustomerProposalPieChart ( $socid );
if ( $tmp ) {
print $tmp ;
}
$tmp = getCustomerOrderPieChart ( $socid );
if ( $tmp ) {
print $tmp ;
}
2021-04-26 11:59:47 +02:00
2005-01-29 01:44:52 +01:00
/*
2020-09-01 13:20:56 +02:00
* Draft customer proposals
2005-01-29 01:44:52 +01:00
*/
2022-07-10 01:18:06 +02:00
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( " propal " ) && $user -> hasRight ( " propal " , " lire " ) && is_object ( $propalstatic )) {
2021-02-22 13:14:13 +01:00
$sql = " SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-11-02 11:41:07 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " propal as p, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE p.entity IN ( " . getEntity ( $propalstatic -> element ) . " ) " ;
2019-11-13 19:35:02 +01:00
$sql .= " AND p.fk_soc = s.rowid " ;
2020-09-16 10:51:19 +02:00
$sql .= " AND p.fk_statut = " . Propal :: STATUS_DRAFT ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-03-22 13:31:06 +01:00
$sql .= " AND s.rowid = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2019-11-13 19:35:02 +01:00
$resql = $db -> query ( $sql );
2020-09-10 11:04:41 +02:00
if ( $resql ) {
2015-10-13 14:09:14 +02:00
$total = 0 ;
$num = $db -> num_rows ( $resql );
2021-04-26 10:22:28 +02:00
$nbofloop = min ( $num , $maxofloop );
2020-09-16 14:03:41 +02:00
startSimpleTable ( " ProposalsDraft " , " comm/propal/list.php " , " search_status= " . Propal :: STATUS_DRAFT , 2 , $num );
2020-09-10 11:07:10 +02:00
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
2009-01-23 01:47:23 +01:00
$i = 0 ;
2021-02-02 11:34:34 +01:00
$othernb = 0 ;
2020-09-10 11:04:41 +02:00
2021-04-26 10:22:28 +02:00
while ( $i < $nbofloop ) {
2009-01-23 01:47:23 +01:00
$obj = $db -> fetch_object ( $resql );
2017-11-12 12:39:23 +01:00
2021-02-02 11:34:34 +01:00
if ( $i >= $max ) {
2023-02-19 13:58:57 +01:00
$othernb ++ ;
2021-02-02 11:34:34 +01:00
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2021-02-02 11:34:34 +01:00
continue ;
}
2019-11-13 19:35:02 +01:00
$propalstatic -> id = $obj -> rowid ;
$propalstatic -> ref = $obj -> ref ;
2020-09-10 11:04:41 +02:00
$propalstatic -> ref_client = $obj -> ref_client ;
$propalstatic -> total_ht = $obj -> total_ht ;
$propalstatic -> total_tva = $obj -> total_tva ;
$propalstatic -> total_ttc = $obj -> total_ttc ;
2020-11-02 11:41:07 +01:00
$propalstatic -> statut = $obj -> status ;
2024-11-10 12:37:26 +01:00
$propalstatic -> status = $obj -> status ;
2020-09-10 11:07:10 +02:00
2019-11-13 19:35:02 +01:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2024-11-10 12:37:26 +01:00
print '<td class="nowraponall tdoverflowmax125 minwidth75">' . $propalstatic -> getNomUrl ( 1 ) . '</td>' ;
print '<td class="nowrap tdoverflowmax250">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="nowrap right tdamount amount">' . price (( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc )) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '</tr>' ;
2009-01-23 01:47:23 +01:00
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2009-01-23 01:47:23 +01:00
}
2021-02-02 11:34:34 +01:00
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
2021-04-26 10:22:28 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '...' . ( $othernb < $maxofloop ? ' (' . $othernb . ')' : '' ) . '</span>' ;
2021-02-02 11:34:34 +01:00
print '</td>' ;
print " </tr> \n " ;
}
2015-10-20 18:19:32 +02:00
}
2012-07-05 15:38:08 +02:00
2020-09-10 11:04:41 +02:00
addSummaryTableLine ( 3 , $num , $nbofloop , $total , " NoProposal " );
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2009-01-23 01:47:23 +01:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2009-04-05 04:23:57 +02:00
dol_print_error ( $db );
}
2002-04-29 20:01:16 +02:00
}
2005-06-21 21:49:42 +02:00
2016-02-09 11:56:12 +01:00
/*
* Draft supplier proposals
*/
2022-07-10 01:18:06 +02:00
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( 'supplier_proposal' ) && $user -> hasRight ( " supplier_proposal " , " lire " ) && is_object ( $supplierproposalstatic )) {
2021-02-21 19:29:42 +01:00
$sql = " SELECT p.rowid, p.ref, p.total_ht, p.total_tva, p.total_ttc, p.fk_statut as status " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-11-02 11:41:07 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " supplier_proposal as p, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE p.entity IN ( " . getEntity ( $supplierproposalstatic -> element ) . " ) " ;
$sql .= " AND p.fk_statut = " . SupplierProposal :: STATUS_DRAFT ;
2020-09-10 11:04:41 +02:00
$sql .= " AND p.fk_soc = s.rowid " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-04-24 20:18:11 +02:00
$sql .= " AND s.rowid = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2020-09-10 11:04:41 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
$total = 0 ;
$num = $db -> num_rows ( $resql );
2021-04-26 10:22:28 +02:00
$nbofloop = min ( $num , $maxofloop );
2020-09-16 14:03:41 +02:00
startSimpleTable ( " SupplierProposalsDraft " , " supplier_proposal/list.php " , " search_status= " . SupplierProposal :: STATUS_DRAFT , 2 , $num );
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
$i = 0 ;
2021-02-02 11:34:34 +01:00
$othernb = 0 ;
2020-09-10 11:04:41 +02:00
2021-04-26 10:22:28 +02:00
while ( $i < $nbofloop ) {
2020-09-10 11:04:41 +02:00
$obj = $db -> fetch_object ( $resql );
2021-02-02 11:34:34 +01:00
if ( $i >= $max ) {
$othernb += 1 ;
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2021-02-02 11:34:34 +01:00
continue ;
}
2020-09-10 11:04:41 +02:00
$supplierproposalstatic -> id = $obj -> rowid ;
$supplierproposalstatic -> ref = $obj -> ref ;
$supplierproposalstatic -> total_ht = $obj -> total_ht ;
$supplierproposalstatic -> total_tva = $obj -> total_tva ;
$supplierproposalstatic -> total_ttc = $obj -> total_ttc ;
2020-12-01 02:41:19 +01:00
$supplierproposalstatic -> statut = $obj -> status ;
2024-11-10 12:37:26 +01:00
$supplierproposalstatic -> status = $obj -> status ;
2020-09-10 11:04:41 +02:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta = $obj -> code_compta ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2024-11-10 12:37:26 +01:00
print '<td class="nowraponall tdoverflowmax125 minwidth75">' . $supplierproposalstatic -> getNomUrl ( 1 ) . '</td>' ;
print '<td class="nowrap tdoverflowmax250">' . $companystatic -> getNomUrl ( 1 , 'supplier' ) . '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="nowrap right tdamount amount">' . price ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '</tr>' ;
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2020-09-10 11:04:41 +02:00
}
2021-02-02 11:34:34 +01:00
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
2021-04-26 10:22:28 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '...' . ( $othernb < $maxofloop ? ' (' . $othernb . ')' : '' ) . '</span>' ;
2021-02-02 11:34:34 +01:00
print '</td>' ;
print " </tr> \n " ;
}
2020-09-10 11:04:41 +02:00
}
addSummaryTableLine ( 3 , $num , $nbofloop , $total , " NoProposal " );
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
} else {
dol_print_error ( $db );
}
2016-02-09 11:56:12 +01:00
}
2003-11-09 16:37:14 +01:00
/*
2022-10-12 15:29:30 +02:00
* Draft sales orders
2003-11-09 16:37:14 +01:00
*/
2022-07-10 01:18:06 +02:00
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( 'order' ) && $user -> hasRight ( 'commande' , 'lire' ) && is_object ( $orderstatic )) {
2021-02-20 08:00:27 +01:00
$sql = " SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, c.fk_statut as status " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-11-02 11:41:07 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " commande as c, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE c.entity IN ( " . getEntity ( $orderstatic -> element ) . " ) " ;
$sql .= " AND c.fk_statut = " . Commande :: STATUS_DRAFT ;
$sql .= " AND c.fk_soc = s.rowid " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-04-26 10:22:28 +02:00
$sql .= " AND c.fk_soc = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2002-04-29 20:01:16 +02:00
2009-01-23 01:47:23 +01:00
$resql = $db -> query ( $sql );
2020-09-10 11:04:41 +02:00
if ( $resql ) {
2015-10-13 14:09:14 +02:00
$total = 0 ;
$num = $db -> num_rows ( $resql );
2021-04-26 10:22:28 +02:00
$nbofloop = min ( $num , $maxofloop );
2020-09-16 14:03:41 +02:00
startSimpleTable ( " DraftOrders " , " commande/list.php " , " search_status= " . Commande :: STATUS_DRAFT , 2 , $num );
2017-11-12 12:39:23 +01:00
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
2009-01-23 01:47:23 +01:00
$i = 0 ;
2021-02-02 11:34:34 +01:00
$othernb = 0 ;
2020-09-10 11:04:41 +02:00
2021-04-26 10:22:28 +02:00
while ( $i < $nbofloop ) {
2009-01-23 01:47:23 +01:00
$obj = $db -> fetch_object ( $resql );
2020-09-10 11:04:41 +02:00
2021-02-02 11:34:34 +01:00
if ( $i >= $max ) {
$othernb += 1 ;
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2021-02-02 11:34:34 +01:00
continue ;
}
2020-09-10 11:04:41 +02:00
$orderstatic -> id = $obj -> rowid ;
$orderstatic -> ref = $obj -> ref ;
$orderstatic -> ref_client = $obj -> ref_client ;
$orderstatic -> total_ht = $obj -> total_ht ;
$orderstatic -> total_tva = $obj -> total_tva ;
$orderstatic -> total_ttc = $obj -> total_ttc ;
2020-11-02 11:41:07 +01:00
$orderstatic -> statut = $obj -> status ;
2024-11-10 12:37:26 +01:00
$orderstatic -> status = $obj -> status ;
2020-09-10 11:07:10 +02:00
2019-11-13 19:35:02 +01:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
$companystatic -> entity = $obj -> entity ;
2020-12-08 15:36:37 +01:00
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2024-11-10 12:37:26 +01:00
print '<td class="nowraponall tdoverflowmax125 minwidth75">' . $orderstatic -> getNomUrl ( 1 ) . '</td>' ;
print '<td class="nowrap tdoverflowmax250">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="nowrap right tdamount amount">' . price ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '</tr>' ;
2009-01-23 01:47:23 +01:00
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2009-01-23 01:47:23 +01:00
}
2021-02-02 11:34:34 +01:00
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
2021-04-26 10:22:28 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '...' . ( $othernb < $maxofloop ? ' (' . $othernb . ')' : '' ) . '</span>' ;
2021-02-02 11:34:34 +01:00
print '</td>' ;
print " </tr> \n " ;
}
2015-10-20 18:19:32 +02:00
}
2012-07-05 15:38:08 +02:00
2022-07-10 01:18:06 +02:00
addSummaryTableLine ( 3 , $num , $nbofloop , $total , " NoOrder " );
2020-09-10 11:04:41 +02:00
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2011-12-29 18:07:41 +01:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2015-10-20 17:00:34 +02:00
dol_print_error ( $db );
}
}
/*
2020-11-02 11:41:07 +01:00
* Draft purchase orders
2015-10-20 17:00:34 +02:00
*/
2022-07-10 01:18:06 +02:00
2023-11-27 11:39:32 +01:00
if (( isModEnabled ( " fournisseur " ) && ! getDolGlobalString ( 'MAIN_USE_NEW_SUPPLIERMOD' ) && $user -> hasRight ( " fournisseur " , " commande " , " lire " )) || ( isModEnabled ( " supplier_order " ) && $user -> hasRight ( " supplier_order " , " lire " ))) {
2024-04-01 15:04:20 +02:00
$supplierorderstatic = new CommandeFournisseur ( $db );
2021-03-16 17:38:12 +01:00
$sql = " SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_statut as status " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
$sql .= " , s.code_client, s.code_compta, s.client " ;
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-11-02 11:41:07 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " commande_fournisseur as cf, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE cf.entity IN ( " . getEntity ( $supplierorderstatic -> element ) . " ) " ;
$sql .= " AND cf.fk_statut = " . CommandeFournisseur :: STATUS_DRAFT ;
$sql .= " AND cf.fk_soc = s.rowid " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-08-23 17:41:11 +02:00
$sql .= " AND cf.fk_soc = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2020-09-10 11:04:41 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
$total = 0 ;
$num = $db -> num_rows ( $resql );
2021-04-26 10:22:28 +02:00
$nbofloop = min ( $num , $maxofloop );
2020-09-16 14:03:41 +02:00
startSimpleTable ( " DraftSuppliersOrders " , " fourn/commande/list.php " , " search_status= " . CommandeFournisseur :: STATUS_DRAFT , 2 , $num );
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
$i = 0 ;
2021-02-02 11:34:34 +01:00
$othernb = 0 ;
2020-09-10 11:04:41 +02:00
2021-04-26 10:22:28 +02:00
while ( $i < $nbofloop ) {
2020-09-10 11:04:41 +02:00
$obj = $db -> fetch_object ( $resql );
2021-02-02 11:34:34 +01:00
if ( $i >= $max ) {
$othernb += 1 ;
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2021-02-02 11:34:34 +01:00
continue ;
}
2020-09-10 11:04:41 +02:00
$supplierorderstatic -> id = $obj -> rowid ;
$supplierorderstatic -> ref = $obj -> ref ;
2021-03-16 17:38:12 +01:00
$supplierorderstatic -> ref_supplier = $obj -> ref_supplier ;
2020-09-10 11:04:41 +02:00
$supplierorderstatic -> total_ht = $obj -> total_ht ;
$supplierorderstatic -> total_tva = $obj -> total_tva ;
$supplierorderstatic -> total_ttc = $obj -> total_ttc ;
2020-11-02 11:41:07 +01:00
$supplierorderstatic -> statut = $obj -> status ;
2024-11-10 12:37:26 +01:00
$supplierorderstatic -> status = $obj -> status ;
2020-09-10 11:04:41 +02:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta = $obj -> code_compta ;
2024-04-03 15:30:10 +02:00
$companystatic -> code_compta_client = $obj -> code_compta ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2004-05-08 20:44:22 +02:00
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2024-11-10 12:37:26 +01:00
print '<td class="nowraponall tdoverflowmax125 minwidth75">' . $supplierorderstatic -> getNomUrl ( 1 ) . '</td>' ;
print '<td class="nowrap tdoverflowmax250">' . $companystatic -> getNomUrl ( 1 , 'supplier' ) . '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="nowrap right tdamount amount">' . price ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '</tr>' ;
2013-03-16 14:53:15 +01:00
2020-09-10 11:04:41 +02:00
$i ++ ;
2023-11-27 11:39:32 +01:00
$total += ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc );
2020-09-10 11:04:41 +02:00
}
2021-02-02 11:34:34 +01:00
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
2021-04-26 10:22:28 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '...' . ( $othernb < $maxofloop ? ' (' . $othernb . ')' : '' ) . '</span>' ;
2021-02-02 11:34:34 +01:00
print '</td>' ;
print " </tr> \n " ;
}
2020-09-10 11:04:41 +02:00
}
2004-10-30 14:15:59 +02:00
2022-07-10 01:18:06 +02:00
addSummaryTableLine ( 3 , $num , $nbofloop , $total , " NoOrder " );
2020-09-10 11:04:41 +02:00
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
} else {
dol_print_error ( $db );
}
}
2009-04-06 19:49:18 +02:00
2021-07-14 12:55:33 +02:00
/*
2022-12-13 14:32:43 +01:00
* Draft interventions
2021-07-14 12:55:33 +02:00
*/
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( 'intervention' ) && is_object ( $fichinterstatic )) {
2023-04-13 22:31:38 +02:00
$sql = " SELECT f.rowid, f.ref, s.nom as name, f.fk_statut, f.duree as duration " ;
2022-06-22 13:24:15 +02:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2022-06-22 13:24:15 +02:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2021-07-14 12:55:33 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " fichinter as f " ;
$sql .= " , " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-07-14 12:55:33 +02:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
$sql .= " WHERE f.entity IN ( " . getEntity ( 'intervention' ) . " ) " ;
$sql .= " AND f.fk_soc = s.rowid " ;
$sql .= " AND f.fk_statut = 0 " ;
if ( $socid ) {
2021-07-14 13:57:17 +02:00
$sql .= " AND f.fk_soc = " . (( int ) $socid );
2021-07-14 12:55:33 +02:00
}
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-07-14 13:57:17 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-07-14 12:55:33 +02:00
}
2022-06-22 13:24:15 +02:00
2021-07-14 12:55:33 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
2022-06-22 13:24:15 +02:00
$num = $db -> num_rows ( $resql );
$nbofloop = min ( $num , $maxofloop );
2022-12-13 14:32:43 +01:00
startSimpleTable ( " DraftFichinter " , " fichinter/list.php " , " search_status= " . Fichinter :: STATUS_DRAFT , 2 , $num );
2022-06-22 13:24:15 +02:00
2022-12-13 14:32:43 +01:00
//print '<tr class="liste_titre">';
//print '<th colspan="2">'.$langs->trans("DraftFichinter").'</th></tr>';
2022-06-22 13:24:15 +02:00
2022-12-13 14:32:43 +01:00
if ( $num > 0 ) {
2021-07-14 12:55:33 +02:00
$i = 0 ;
2022-06-22 13:24:15 +02:00
while ( $i < $nbofloop ) {
2021-07-14 12:55:33 +02:00
$obj = $db -> fetch_object ( $resql );
2022-06-22 13:24:15 +02:00
2024-09-18 03:27:25 +02:00
$fichinterstatic -> id = $obj -> rowid ;
$fichinterstatic -> ref = $obj -> ref ;
$fichinterstatic -> statut = $obj -> fk_statut ;
2024-11-10 12:37:26 +01:00
$fichinterstatic -> status = $obj -> fk_statut ;
2022-06-22 13:24:15 +02:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
$companystatic -> name_alias = $obj -> name_alias ;
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2022-06-22 13:24:15 +02:00
$companystatic -> client = $obj -> client ;
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
$companystatic -> email = $obj -> email ;
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2022-08-27 22:14:56 +02:00
2021-07-14 12:55:33 +02:00
print '<tr class="oddeven">' ;
2024-11-10 12:37:26 +01:00
print '<td class="tdoverflowmax125 minwidth75">' ;
2022-06-22 13:24:15 +02:00
print $fichinterstatic -> getNomUrl ( 1 );
print " </td> " ;
2024-11-10 12:37:26 +01:00
print '<td class="tdoverflowmax250 minwidth100">' ;
2022-06-22 13:24:15 +02:00
print $companystatic -> getNomUrl ( 1 , 'customer' );
2023-04-13 22:31:38 +02:00
print '</td>' ;
print '<td class="nowraponall tdoverflowmax100 right">' ;
print convertSecondToTime ( $obj -> duration );
print '</td>' ;
print '</tr>' ;
2021-07-14 12:55:33 +02:00
$i ++ ;
}
}
2022-12-13 14:32:43 +01:00
addSummaryTableLine ( 3 , $num , $nbofloop , $total , " NoIntervention " );
finishSimpleTable ( true );
2024-02-26 16:35:01 +01:00
$db -> free ( $resql );
2021-07-14 12:55:33 +02:00
}
}
2024-06-27 10:41:55 +02:00
print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">' ;
2005-10-25 21:40:01 +02:00
2005-06-21 21:49:42 +02:00
/*
2009-08-26 00:35:10 +02:00
* Last modified customers or prospects
2005-06-21 21:49:42 +02:00
*/
2022-09-10 11:02:48 +02:00
if ( isModEnabled ( " societe " ) && $user -> hasRight ( 'societe' , 'lire' )) {
2020-12-08 15:36:37 +01:00
$sql = " SELECT s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
$sql .= " , s.datec, s.tms " ;
2019-11-13 19:35:02 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE s.entity IN ( " . getEntity ( $companystatic -> element ) . " ) " ;
$sql .= " AND s.client IN ( " . Societe :: CUSTOMER . " , " . Societe :: PROSPECT . " , " . Societe :: CUSTOMER_AND_PROSPECT . " ) " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
2022-03-18 11:55:45 +01:00
// Add where from hooks
$parameters = array ( 'socid' => $socid );
$reshook = $hookmanager -> executeHooks ( 'printFieldListWhere' , $parameters , $companystatic ); // Note that $action and $object may have been modified by hook
if ( empty ( $reshook )) {
if ( $socid > 0 ) {
$sql .= " AND s.rowid = " . (( int ) $socid );
}
2021-02-22 13:14:13 +01:00
}
2022-03-18 11:55:45 +01:00
$sql .= $hookmanager -> resPrint ;
2009-04-06 19:49:18 +02:00
$sql .= " ORDER BY s.tms DESC " ;
2009-01-23 01:47:23 +01:00
$sql .= $db -> plimit ( $max , 0 );
$resql = $db -> query ( $sql );
2020-09-10 11:04:41 +02:00
if ( $resql ) {
2023-11-27 11:39:32 +01:00
if ( ! getDolGlobalString ( 'SOCIETE_DISABLE_PROSPECTS' ) && ! getDolGlobalString ( 'SOCIETE_DISABLE_CUSTOMERS' )) {
2020-09-10 11:04:41 +02:00
$header = " BoxTitleLastCustomersOrProspects " ;
2023-11-27 11:39:32 +01:00
} elseif ( getDolGlobalString ( 'SOCIETE_DISABLE_CUSTOMERS' )) {
2020-09-10 11:04:41 +02:00
$header = " BoxTitleLastModifiedProspects " ;
2021-02-22 13:14:13 +01:00
} else {
2020-09-10 11:04:41 +02:00
$header = " BoxTitleLastModifiedCustomers " ;
2020-09-08 11:15:33 +02:00
}
2020-09-10 11:04:41 +02:00
$num = $db -> num_rows ( $resql );
2024-04-01 15:04:20 +02:00
startSimpleTable ( $langs -> trans ( $header , min ( $max , $num )), " societe/list.php " , " type=p,c&sortfield=s.tms&sortorder=DESC " , 1 , - 1 , 'company' );
2020-09-10 11:04:41 +02:00
if ( $num ) {
$i = 0 ;
while ( $i < $num && $i < $max ) {
2009-01-23 01:47:23 +01:00
$objp = $db -> fetch_object ( $resql );
2020-09-10 11:04:41 +02:00
2020-12-08 15:36:37 +01:00
$companystatic -> id = $objp -> socid ;
2019-11-13 19:35:02 +01:00
$companystatic -> name = $objp -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $objp -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $objp -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $objp -> code_compta_client ;
$companystatic -> code_compta_client = $objp -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $objp -> client ;
$companystatic -> code_fournisseur = $objp -> code_fournisseur ;
$companystatic -> code_compta_fournisseur = $objp -> code_compta_fournisseur ;
$companystatic -> fournisseur = $objp -> fournisseur ;
$companystatic -> logo = $objp -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $objp -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $objp -> entity ;
$companystatic -> canvas = $objp -> canvas ;
2020-09-10 11:04:41 +02:00
2017-04-14 11:22:48 +02:00
print '<tr class="oddeven">' ;
2022-08-27 22:14:56 +02:00
print '<td class="nowraponall tdoverflowmax100">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2020-10-16 15:40:52 +02:00
print '<td class="nowrap">' ;
//print $companystatic->getLibCustProspStatut();
$obj = $companystatic ;
$s = '' ;
2023-11-27 11:39:32 +01:00
if (( $obj -> client == 2 || $obj -> client == 3 ) && ! getDolGlobalString ( 'SOCIETE_DISABLE_PROSPECTS' )) {
2020-10-16 15:40:52 +02:00
$s .= '<a class="customer-back opacitymedium" title="' . $langs -> trans ( " Prospect " ) . '" href="' . DOL_URL_ROOT . '/comm/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Prospect " ), 0 , 1 ) . '</a>' ;
}
2023-11-27 11:39:32 +01:00
if (( $obj -> client == 1 || $obj -> client == 3 ) && ! getDolGlobalString ( 'SOCIETE_DISABLE_CUSTOMERS' )) {
2020-10-16 15:40:52 +02:00
$s .= '<a class="customer-back" title="' . $langs -> trans ( " Customer " ) . '" href="' . DOL_URL_ROOT . '/comm/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Customer " ), 0 , 1 ) . '</a>' ;
}
/*
2023-04-18 16:15:13 +02:00
if (( isModEnabled ( " supplier_order " ) || isModEnabled ( " supplier_invoice " )) && $obj -> fournisseur )
2020-10-16 15:40:52 +02:00
{
$s .= '<a class="vendor-back" title="' . $langs -> trans ( " Supplier " ) . '" href="' . DOL_URL_ROOT . '/fourn/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Supplier " ), 0 , 1 ) . '</a>' ;
} */
print $s ;
print '</td>' ;
2022-05-17 23:53:36 +02:00
$datem = $db -> jdate ( $objp -> tms );
print '<td class="right nowrap tddate" title="' . dol_escape_htmltag ( $langs -> trans ( " DateModification " ) . ': ' . dol_print_date ( $datem , 'dayhour' , 'tzuserrel' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzuserrel' );
print '</td>' ;
2009-01-23 01:47:23 +01:00
print '</tr>' ;
2020-09-10 11:04:41 +02:00
2009-01-23 01:47:23 +01:00
$i ++ ;
}
2009-05-10 06:20:37 +02:00
}
2020-09-10 11:04:41 +02:00
addSummaryTableLine ( 3 , $num );
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
} else {
dol_print_error ( $db );
2009-05-10 06:20:37 +02:00
}
}
2020-09-10 11:04:41 +02:00
2024-04-03 15:30:10 +02:00
/*
* Last modified proposals
*/
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( 'propal' ) && is_object ( $propalstatic )) {
2024-07-15 17:00:25 +02:00
$sql = " SELECT c.rowid, c.entity, c.ref, c.fk_statut as status, c.tms as datem, " ;
2024-08-14 16:51:53 +02:00
$sql .= " s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta as code_compta_client " ;
2024-04-03 15:30:10 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " propal as c, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
$sql .= " WHERE c.entity IN ( " . getEntity ( $propalstatic -> element ) . " ) " ;
$sql .= " AND c.fk_soc = s.rowid " ;
// If the internal user must only see his customers, force searching by him
$search_sale = 0 ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2024-04-03 15:30:10 +02:00
$search_sale = $user -> id ;
}
// Search on sale representative
if ( $search_sale && $search_sale != '-1' ) {
if ( $search_sale == - 2 ) {
$sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . " societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc) " ;
} elseif ( $search_sale > 0 ) {
$sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . " societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc AND sc.fk_user = " . (( int ) $search_sale ) . " ) " ;
}
}
// Search on socid
if ( $socid ) {
$sql .= " AND c.fk_soc = " . (( int ) $socid );
}
$sql .= " ORDER BY c.tms DESC " ;
$sql .= $db -> plimit ( $max , 0 );
$resql = $db -> query ( $sql );
if ( $resql ) {
$num = $db -> num_rows ( $resql );
startSimpleTable ( $langs -> trans ( " LastModifiedProposals " , $max ), " comm/propal/list.php " , " sortfield=p.tms&sortorder=DESC " , 2 , - 1 , 'propal' );
if ( $num ) {
$i = 0 ;
while ( $i < $num ) {
$obj = $db -> fetch_object ( $resql );
$propalstatic -> id = $obj -> rowid ;
$propalstatic -> ref = $obj -> ref ;
2024-07-15 17:00:25 +02:00
$propalstatic -> status = $obj -> status ;
2024-04-03 15:30:10 +02:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> socname ;
$companystatic -> client = $obj -> client ;
$companystatic -> canvas = $obj -> canvas ;
$companystatic -> email = $obj -> email ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2024-04-03 15:30:10 +02:00
$filename = dol_sanitizeFileName ( $obj -> ref );
$filedir = $conf -> propal -> multidir_output [ $obj -> entity ] . '/' . dol_sanitizeFileName ( $obj -> ref );
$urlsource = $_SERVER [ 'PHP_SELF' ] . '?id=' . $obj -> rowid ;
print '<tr class="oddeven">' ;
print '<td class="nowrap">' ;
print '<table class="nobordernopadding">' ;
print '<tr class="nocellnopadd">' ;
print '<td width="96" class="nobordernopadding nowrap">' . $propalstatic -> getNomUrl ( 1 ) . '</td>' ;
print '<td width="16" class="nobordernopadding nowrap"></td>' ;
print '<td width="16" class="nobordernopadding right">' . $formfile -> getDocumentsLink ( $propalstatic -> element , $filename , $filedir ) . '</td>' ;
print '</tr>' ;
print '</table>' ;
print '</td>' ;
2024-07-15 17:00:25 +02:00
print '<td class="tdoverflowmax100">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2024-04-03 15:30:10 +02:00
$datem = $db -> jdate ( $obj -> datem );
print '<td class="center" title="' . dol_escape_htmltag ( $langs -> trans ( " DateModification " ) . ': ' . dol_print_date ( $datem , 'dayhour' , 'tzuserrel' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzuserrel' );
print '</td>' ;
print '<td class="right">' . $propalstatic -> LibStatut ( $obj -> status , 3 ) . '</td>' ;
print '</tr>' ;
$i ++ ;
}
}
finishSimpleTable ( true );
$db -> free ( $resql );
} else {
dol_print_error ( $db );
}
}
/*
* Latest modified orders
*/
if ( isModEnabled ( 'order' )) {
$commandestatic = new Commande ( $db );
$sql = " SELECT c.rowid, c.entity, c.ref, c.fk_statut as status, c.facture, c.date_cloture as datec, c.tms as datem, " ;
$sql .= " s.nom as name, s.rowid as socid " ;
$sql .= " , s.client " ;
$sql .= " , s.code_client " ;
$sql .= " , s.canvas " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " commande as c, " ;
$sql .= " " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2024-04-03 15:30:10 +02:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
$sql .= " WHERE c.fk_soc = s.rowid " ;
$sql .= " AND c.entity IN ( " . getEntity ( 'commande' ) . " ) " ;
//$sql.= " AND c.fk_statut > 2";
if ( $socid ) {
$sql .= " AND c.fk_soc = " . (( int ) $socid );
}
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2024-04-03 15:30:10 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
}
$sql .= " ORDER BY c.tms DESC " ;
$sql .= $db -> plimit ( $max , 0 );
$resql = $db -> query ( $sql );
if ( $resql ) {
$num = $db -> num_rows ( $resql );
startSimpleTable ( $langs -> trans ( " LastModifiedOrders " , $max ), " commande/list.php " , " sortfield=c.tms&sortorder=DESC " , 2 , - 1 , 'order' );
if ( $num ) {
$i = 0 ;
while ( $i < $num ) {
$obj = $db -> fetch_object ( $resql );
print '<tr class="oddeven">' ;
print '<td width="20%" class="nowrap">' ;
$commandestatic -> id = $obj -> rowid ;
$commandestatic -> ref = $obj -> ref ;
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
$companystatic -> client = $obj -> client ;
$companystatic -> code_client = $obj -> code_client ;
$companystatic -> canvas = $obj -> canvas ;
print '<table class="nobordernopadding"><tr class="nocellnopadd">' ;
print '<td width="96" class="nobordernopadding nowrap">' ;
print $commandestatic -> getNomUrl ( 1 );
print '</td>' ;
print '<td width="16" class="nobordernopadding nowrap">' ;
print ' ' ;
print '</td>' ;
print '<td width="16" class="nobordernopadding hideonsmartphone right">' ;
$filename = dol_sanitizeFileName ( $obj -> ref );
$filedir = $conf -> commande -> multidir_output [ $obj -> entity ] . '/' . dol_sanitizeFileName ( $obj -> ref );
$urlsource = $_SERVER [ 'PHP_SELF' ] . '?id=' . $obj -> rowid ;
print $formfile -> getDocumentsLink ( $commandestatic -> element , $filename , $filedir );
print '</td></tr></table>' ;
print '</td>' ;
print '<td class="nowrap">' ;
print $companystatic -> getNomUrl ( 1 , 'company' , 16 );
print '</td>' ;
$datem = $db -> jdate ( $obj -> datem );
print '<td class="center" title="' . dol_escape_htmltag ( $langs -> trans ( " DateModification " ) . ': ' . dol_print_date ( $datem , 'dayhour' , 'tzuserrel' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzuserrel' );
print '</td>' ;
print '<td class="right">' . $commandestatic -> LibStatut ( $obj -> status , $obj -> facture , 3 ) . '</td>' ;
print '</tr>' ;
$i ++ ;
}
}
finishSimpleTable ( true );
} else {
dol_print_error ( $db );
}
}
2020-09-10 11:04:41 +02:00
/*
* Last suppliers
*/
2023-04-18 16:15:13 +02:00
if (( isModEnabled ( " supplier_order " ) || isModEnabled ( " supplier_invoice " )) && $user -> hasRight ( 'societe' , 'lire' )) {
2020-12-08 15:36:37 +01:00
$sql = " SELECT s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
$sql .= " , s.datec as dc, s.tms as dm " ;
2019-11-13 19:35:02 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE s.entity IN ( " . getEntity ( $companystatic -> element ) . " ) " ;
$sql .= " AND s.fournisseur = " . Societe :: SUPPLIER ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
2022-03-18 11:55:45 +01:00
// Add where from hooks
$parameters = array ( 'socid' => $socid );
$reshook = $hookmanager -> executeHooks ( 'printFieldListWhere' , $parameters , $companystatic ); // Note that $action and $object may have been modified by hook
if ( empty ( $reshook )) {
if ( $socid > 0 ) {
$sql .= " AND s.rowid = " . (( int ) $socid );
}
2021-02-22 13:14:13 +01:00
}
2022-03-18 11:55:45 +01:00
$sql .= $hookmanager -> resPrint ;
2019-11-13 19:35:02 +01:00
$sql .= " ORDER BY s.datec DESC " ;
$sql .= $db -> plimit ( $max , 0 );
2009-05-10 06:20:37 +02:00
2020-09-10 11:04:41 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
$num = $db -> num_rows ( $resql );
2024-04-03 17:57:25 +02:00
startSimpleTable ( $langs -> trans ( " BoxTitleLastModifiedSuppliers " , min ( $max , $num )), " societe/list.php " , " type=f " , 1 , - 1 , 'company' );
2009-05-10 06:20:37 +02:00
2020-09-10 11:04:41 +02:00
if ( $num ) {
$i = 0 ;
while ( $i < $num && $i < $max ) {
$objp = $db -> fetch_object ( $resql );
2020-09-08 11:15:33 +02:00
2020-12-08 15:36:37 +01:00
$companystatic -> id = $objp -> socid ;
2020-09-10 11:04:41 +02:00
$companystatic -> name = $objp -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $objp -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $objp -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $objp -> code_compta_client ;
$companystatic -> code_compta_client = $objp -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $objp -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $objp -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $objp -> code_compta_fournisseur ;
2020-10-16 15:40:52 +02:00
$companystatic -> fournisseur = $objp -> fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> logo = $objp -> logo ;
$companystatic -> email = $objp -> email ;
$companystatic -> entity = $objp -> entity ;
$companystatic -> canvas = $objp -> canvas ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2022-08-27 22:14:56 +02:00
print '<td class="nowraponall tdoverflowmax100">' . $companystatic -> getNomUrl ( 1 , 'supplier' ) . '</td>' ;
2020-10-16 15:40:52 +02:00
print '<td>' ;
$obj = $companystatic ;
$s = '' ;
2021-02-23 18:59:19 +01:00
/* if (( $obj -> client == 2 || $obj -> client == 3 ) && empty ( $conf -> global -> SOCIETE_DISABLE_PROSPECTS )) {
2020-10-16 15:40:52 +02:00
$s .= '<a class="customer-back opacitymedium" title="' . $langs -> trans ( " Prospect " ) . '" href="' . DOL_URL_ROOT . '/comm/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Prospect " ), 0 , 1 ) . '</a>' ;
}
if (( $obj -> client == 1 || $obj -> client == 3 ) && empty ( $conf -> global -> SOCIETE_DISABLE_CUSTOMERS ))
{
$s .= '<a class="customer-back" title="' . $langs -> trans ( " Customer " ) . '" href="' . DOL_URL_ROOT . '/comm/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Customer " ), 0 , 1 ) . '</a>' ;
} */
2023-04-18 16:15:13 +02:00
if (( isModEnabled ( " supplier_order " ) || isModEnabled ( " supplier_invoice " )) && $obj -> fournisseur ) {
2020-10-16 15:40:52 +02:00
$s .= '<a class="vendor-back" title="' . $langs -> trans ( " Supplier " ) . '" href="' . DOL_URL_ROOT . '/fourn/card.php?socid=' . $companystatic -> id . '">' . dol_substr ( $langs -> trans ( " Supplier " ), 0 , 1 ) . '</a>' ;
}
print $s ;
print '</td>' ;
2022-05-17 23:53:36 +02:00
$datem = $db -> jdate ( $objp -> dm );
print '<td class="right tddate" title="' . dol_escape_htmltag ( $langs -> trans ( " DateModification " ) . ': ' . dol_print_date ( $datem , 'dayhour' , 'tzuserrel' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzuserrel' );
print '</td>' ;
2009-05-10 06:20:37 +02:00
print '</tr>' ;
2017-11-12 12:39:23 +01:00
2009-05-10 06:20:37 +02:00
$i ++ ;
}
}
2020-09-10 11:04:41 +02:00
2020-10-16 15:40:52 +02:00
addSummaryTableLine ( 3 , $num );
2020-09-10 11:04:41 +02:00
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
} else {
dol_print_error ( $db );
2009-01-23 01:47:23 +01:00
}
2005-06-21 21:49:42 +02:00
}
2005-10-25 21:40:01 +02:00
2009-04-06 19:49:18 +02:00
/*
* Last actions
*/
2023-06-14 19:54:16 +02:00
/* if ( $user -> hasRight ( 'agenda' , 'myactions' , 'read' )) {
2009-04-06 19:49:18 +02:00
show_array_last_actions_done ( $max );
2021-03-02 03:08:29 +01:00
} */
2009-04-06 19:49:18 +02:00
/*
* Actions to do
*/
2023-06-14 19:54:16 +02:00
/* if ( $user -> hasRight ( 'agenda' , 'myactions' , 'read' )) {
2020-09-21 13:54:26 +02:00
show_array_actions_to_do ( $max );
2021-03-02 03:08:29 +01:00
} */
2009-04-06 19:49:18 +02:00
2004-05-08 20:44:22 +02:00
/*
2020-02-20 00:21:25 +01:00
* Latest contracts
2004-05-08 20:44:22 +02:00
*/
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'contract' ) && $user -> hasRight ( " contrat " , " lire " ) && 0 ) { // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
2020-09-16 10:51:19 +02:00
$staticcontrat = new Contrat ( $db );
2009-01-23 01:47:23 +01:00
2020-12-08 15:36:37 +01:00
$sql = " SELECT s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-09-10 11:04:41 +02:00
$sql .= " , c.statut, c.rowid as contratid, p.ref, c.fin_validite as datefin, c.date_cloture as dateclo " ;
2019-11-13 19:35:02 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " societe as s " ;
$sql .= " , " . MAIN_DB_PREFIX . " contrat as c " ;
$sql .= " , " . MAIN_DB_PREFIX . " product as p " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE c.entity IN ( " . getEntity ( $staticcontrat -> element ) . " ) " ;
$sql .= " AND c.fk_soc = s.rowid " ;
2019-11-13 19:35:02 +01:00
$sql .= " AND c.fk_product = p.rowid " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-04-24 20:18:11 +02:00
$sql .= " AND s.rowid = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2019-11-13 19:35:02 +01:00
$sql .= " ORDER BY c.tms DESC " ;
2020-09-21 13:54:26 +02:00
$sql .= $db -> plimit ( $max + 1 , 0 );
2019-11-13 19:35:02 +01:00
$resql = $db -> query ( $sql );
2020-09-10 11:04:41 +02:00
if ( $resql ) {
2010-08-09 17:42:57 +02:00
$num = $db -> num_rows ( $resql );
2020-09-21 13:54:26 +02:00
startSimpleTable ( $langs -> trans ( " LastContracts " , $max ), " " , " " , 2 );
2020-09-08 11:22:02 +02:00
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
2009-04-06 19:49:18 +02:00
$i = 0 ;
2020-09-10 11:04:41 +02:00
while ( $i < $num ) {
2010-08-09 17:42:57 +02:00
$obj = $db -> fetch_object ( $resql );
2020-09-10 11:04:41 +02:00
2020-12-08 15:36:37 +01:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
$companystatic -> name_alias = $obj -> name_alias ;
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
$companystatic -> email = $obj -> email ;
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
2020-10-16 15:40:52 +02:00
$staticcontrat -> id = $obj -> contratid ;
$staticcontrat -> ref = $obj -> ref ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2022-08-27 22:14:56 +02:00
print '<td class="nowraponall">' . $staticcontrat -> getNomUrl ( 1 ) . '</td>' ;
2023-02-19 13:05:35 +01:00
print '<td class="tdoverflowmax150">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '<td class="right">' . $staticcontrat -> LibStatut ( $obj -> statut , 3 ) . '</td>' ;
print '</tr>' ;
2017-11-12 12:39:23 +01:00
2009-04-06 19:49:18 +02:00
$i ++ ;
}
2009-01-23 01:47:23 +01:00
}
2020-09-10 11:04:41 +02:00
addSummaryTableLine ( 2 , $num );
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2009-02-20 23:53:15 +01:00
dol_print_error ( $db );
2004-07-13 09:20:09 +02:00
}
2003-11-09 16:37:14 +01:00
}
2020-09-10 11:04:41 +02:00
2004-05-08 20:44:22 +02:00
/*
2020-09-16 10:51:19 +02:00
* Opened ( validated ) proposals
2004-05-08 20:44:22 +02:00
*/
2022-12-15 14:46:29 +01:00
if ( isModEnabled ( " propal " ) && $user -> hasRight ( " propal " , " lire " )) {
2021-02-22 13:14:13 +01:00
$sql = " SELECT p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-09-16 10:51:19 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " propal as p " ;
$sql .= " , " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE p.entity IN ( " . getEntity ( $propalstatic -> element ) . " ) " ;
$sql .= " AND p.fk_soc = s.rowid " ;
$sql .= " AND p.fk_statut = " . Propal :: STATUS_VALIDATED ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-04-24 20:18:11 +02:00
$sql .= " AND s.rowid = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2019-11-13 19:35:02 +01:00
$sql .= " ORDER BY p.rowid DESC " ;
2020-09-10 11:04:41 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
2020-09-21 13:54:26 +02:00
$total = $total_ttc = 0 ;
2020-09-10 11:04:41 +02:00
$num = $db -> num_rows ( $resql );
2023-11-27 11:39:32 +01:00
$nbofloop = min ( $num , ( ! getDolGlobalString ( 'MAIN_MAXLIST_OVERLOAD' ) ? 500 : $conf -> global -> MAIN_MAXLIST_OVERLOAD ));
2020-09-10 11:04:41 +02:00
startSimpleTable ( " ProposalsOpened " , " comm/propal/list.php " , " search_status=1 " , 4 , $num );
2017-11-12 12:39:23 +01:00
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
$i = 0 ;
2020-09-21 13:54:26 +02:00
$othernb = 0 ;
2009-01-23 17:44:12 +01:00
2020-09-10 11:04:41 +02:00
while ( $i < $nbofloop ) {
$obj = $db -> fetch_object ( $resql );
2009-01-23 01:47:23 +01:00
2020-09-21 13:54:26 +02:00
if ( $i >= $max ) {
$othernb += 1 ;
$i ++ ;
$total += $obj -> total_ht ;
$total_ttc += $obj -> total_ttc ;
continue ;
}
2019-11-13 19:35:02 +01:00
$propalstatic -> id = $obj -> propalid ;
$propalstatic -> ref = $obj -> ref ;
2020-09-10 11:04:41 +02:00
$propalstatic -> ref_client = $obj -> ref_client ;
$propalstatic -> total_ht = $obj -> total_ht ;
$propalstatic -> total_tva = $obj -> total_tva ;
$propalstatic -> total_ttc = $obj -> total_ttc ;
2020-09-10 11:07:10 +02:00
2020-12-08 15:36:37 +01:00
$companystatic -> id = $obj -> socid ;
2020-09-10 11:04:41 +02:00
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
2020-09-16 14:03:41 +02:00
$filename = dol_sanitizeFileName ( $obj -> ref );
$filedir = $conf -> propal -> multidir_output [ $obj -> entity ] . '/' . dol_sanitizeFileName ( $obj -> ref );
2021-03-16 17:38:12 +01:00
//$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
2020-09-16 14:03:41 +02:00
$warning = ( $db -> jdate ( $obj -> dfv ) < ( $now - $conf -> propal -> cloture -> warning_delay )) ? img_warning ( $langs -> trans ( " Late " )) : '' ;
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2009-01-23 01:47:23 +01:00
2020-09-10 11:04:41 +02:00
print '<td class="nowrap" width="140">' ;
2009-01-23 01:47:23 +01:00
print '<table class="nobordernopadding"><tr class="nocellnopadd">' ;
2022-08-27 22:14:56 +02:00
print '<td class="nobordernopadding nowraponall">' . $propalstatic -> getNomUrl ( 1 ) . '</td>' ;
2020-09-16 14:03:41 +02:00
print '<td width="18" class="nobordernopadding nowrap">' . $warning . '</td>' ;
2024-10-13 18:36:32 +02:00
print '<td width="16" class="nobordernopadding center">' . $formfile -> getDocumentsLink ( $propalstatic -> element , $filename , $filedir ) . '</td>' ;
2020-09-16 14:03:41 +02:00
print '</tr>' ;
print '</table>' ;
2009-01-23 01:47:23 +01:00
print '</td>' ;
2009-01-23 17:44:12 +01:00
2023-02-19 13:05:35 +01:00
print '<td class="tdoverflowmax150">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2022-05-17 23:53:36 +02:00
$datem = $db -> jdate ( $obj -> dp );
print '<td class="center tddate" title="' . dol_escape_htmltag ( $langs -> trans ( " Date " ) . ': ' . dol_print_date ( $datem , 'day' , 'tzserver' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzserver' );
print '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="right tdamount amount">' . price ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '<td align="center" width="14">' . $propalstatic -> LibStatut ( $obj -> fk_statut , 3 ) . '</td>' ;
print '</tr>' ;
2009-01-23 01:47:23 +01:00
$i ++ ;
2020-09-21 13:54:26 +02:00
$total += $obj -> total_ht ;
$total_ttc += $obj -> total_ttc ;
}
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '... (' . $othernb . ')</span>' ;
print '</td>' ;
print " </tr> \n " ;
2009-01-23 01:47:23 +01:00
}
}
2020-09-10 11:04:41 +02:00
2023-11-27 11:39:32 +01:00
addSummaryTableLine ( 5 , $num , $nbofloop , ! getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $total_ttc : $total , " NoProposal " , true );
2020-09-10 11:04:41 +02:00
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2009-02-20 23:53:15 +01:00
dol_print_error ( $db );
2009-01-23 01:47:23 +01:00
}
2003-11-09 16:37:14 +01:00
}
2020-09-10 11:04:41 +02:00
2015-04-18 17:49:48 +02:00
/*
2020-09-16 10:51:19 +02:00
* Opened ( validated ) order
2015-04-18 17:49:48 +02:00
*/
2024-09-18 03:27:25 +02:00
if ( isModEnabled ( 'order' ) && $user -> hasRight ( 'commande' , 'lire' ) && is_object ( $orderstatic )) {
2021-02-20 08:00:27 +01:00
$sql = " SELECT c.rowid as commandeid, c.total_ttc, c.total_ht, c.total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
2024-08-14 16:51:53 +02:00
$sql .= " , s.code_client, s.code_compta as code_compta_client, s.client " ;
2020-12-08 15:36:37 +01:00
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas " ;
2020-09-16 10:51:19 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " commande as c " ;
$sql .= " , " . MAIN_DB_PREFIX . " societe as s " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-02-22 13:14:13 +01:00
$sql .= " , " . MAIN_DB_PREFIX . " societe_commerciaux as sc " ;
}
2020-09-16 10:51:19 +02:00
$sql .= " WHERE c.entity IN ( " . getEntity ( $orderstatic -> element ) . " ) " ;
$sql .= " AND c.fk_soc = s.rowid " ;
$sql .= " AND c.fk_statut IN ( " . Commande :: STATUS_VALIDATED . " , " . Commande :: STATUS_SHIPMENTONPROCESS . " ) " ;
2025-01-13 11:58:16 +01:00
if ( empty ( $user -> socid ) && ! $user -> hasRight ( 'societe' , 'client' , 'voir' )) {
2021-08-23 17:41:11 +02:00
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . (( int ) $user -> id );
2021-02-22 13:14:13 +01:00
}
if ( $socid ) {
2021-04-24 20:18:11 +02:00
$sql .= " AND s.rowid = " . (( int ) $socid );
2021-02-22 13:14:13 +01:00
}
2019-11-13 19:35:02 +01:00
$sql .= " ORDER BY c.rowid DESC " ;
2020-09-10 11:04:41 +02:00
$resql = $db -> query ( $sql );
if ( $resql ) {
2020-09-21 13:54:26 +02:00
$total = $total_ttc = 0 ;
2020-09-10 11:04:41 +02:00
$num = $db -> num_rows ( $resql );
2023-11-27 11:39:32 +01:00
$nbofloop = min ( $num , ( ! getDolGlobalString ( 'MAIN_MAXLIST_OVERLOAD' ) ? 500 : $conf -> global -> MAIN_MAXLIST_OVERLOAD ));
2020-09-16 14:03:41 +02:00
startSimpleTable ( " OrdersOpened " , " commande/list.php " , " search_status= " . Commande :: STATUS_VALIDATED , 4 , $num );
2017-11-12 12:39:23 +01:00
2020-09-10 11:04:41 +02:00
if ( $num > 0 ) {
$i = 0 ;
2020-09-21 13:54:26 +02:00
$othernb = 0 ;
2015-04-18 17:49:48 +02:00
2020-09-10 11:04:41 +02:00
while ( $i < $nbofloop ) {
$obj = $db -> fetch_object ( $resql );
2015-04-18 17:49:48 +02:00
2020-09-21 13:54:26 +02:00
if ( $i >= $max ) {
$othernb += 1 ;
$i ++ ;
$total += $obj -> total_ht ;
$total_ttc += $obj -> total_ttc ;
continue ;
}
2019-11-13 19:35:02 +01:00
$orderstatic -> id = $obj -> commandeid ;
$orderstatic -> ref = $obj -> ref ;
2020-09-10 11:04:41 +02:00
$orderstatic -> ref_client = $obj -> ref_client ;
2021-04-09 14:06:30 +02:00
$orderstatic -> statut = $obj -> fk_statut ;
2020-09-10 11:04:41 +02:00
$orderstatic -> total_ht = $obj -> total_ht ;
$orderstatic -> total_tva = $obj -> total_tva ;
$orderstatic -> total_ttc = $obj -> total_ttc ;
2020-12-08 15:36:37 +01:00
$companystatic -> id = $obj -> socid ;
2020-09-10 11:04:41 +02:00
$companystatic -> name = $obj -> name ;
2020-12-08 15:36:37 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_client = $obj -> code_client ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta = $obj -> code_compta_client ;
$companystatic -> code_compta_client = $obj -> code_compta_client ;
2020-12-08 15:36:37 +01:00
$companystatic -> client = $obj -> client ;
2020-09-10 11:04:41 +02:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
2020-12-08 15:36:37 +01:00
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
$companystatic -> fournisseur = $obj -> fournisseur ;
$companystatic -> logo = $obj -> logo ;
2020-09-10 11:04:41 +02:00
$companystatic -> email = $obj -> email ;
2020-12-08 15:36:37 +01:00
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-09-10 11:04:41 +02:00
2020-09-16 10:51:19 +02:00
$filename = dol_sanitizeFileName ( $obj -> ref );
$filedir = $conf -> commande -> dir_output . '/' . dol_sanitizeFileName ( $obj -> ref );
2021-03-16 17:38:12 +01:00
//$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
2020-09-16 14:03:41 +02:00
//$warning = ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) ? img_warning($langs->trans("Late")) : '';
2020-09-16 10:51:19 +02:00
2020-09-10 11:04:41 +02:00
print '<tr class="oddeven">' ;
2015-04-18 17:49:48 +02:00
2020-09-10 11:04:41 +02:00
print '<td class="nowrap" width="140">' ;
2015-04-18 17:49:48 +02:00
print '<table class="nobordernopadding"><tr class="nocellnopadd">' ;
2022-08-27 22:14:56 +02:00
print '<td class="nobordernopadding nowraponall">' . $orderstatic -> getNomUrl ( 1 ) . '</td>' ;
2020-09-16 14:03:41 +02:00
print '<td width="18" class="nobordernopadding nowrap"></td>' ;
print '<td width="16" align="center" class="nobordernopadding">' . $formfile -> getDocumentsLink ( $orderstatic -> element , $filename , $filedir ) . '</td>' ;
print '</tr>' ;
print '</table>' ;
2015-04-18 17:49:48 +02:00
print '</td>' ;
2023-02-19 13:05:35 +01:00
print '<td class="tdoverflowmax150">' . $companystatic -> getNomUrl ( 1 , 'customer' ) . '</td>' ;
2022-05-17 23:53:36 +02:00
$datem = $db -> jdate ( $obj -> dv );
print '<td class="center tddate" title="' . dol_escape_htmltag ( $langs -> trans ( " DateValue " ) . ': ' . dol_print_date ( $datem , 'day' , 'tzserver' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzserver' );
print '</td>' ;
2023-11-27 11:39:32 +01:00
print '<td class="right tdamount amount">' . price ( getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $obj -> total_ht : $obj -> total_ttc ) . '</td>' ;
2020-09-10 11:04:41 +02:00
print '<td align="center" width="14">' . $orderstatic -> LibStatut ( $obj -> fk_statut , $obj -> billed , 3 ) . '</td>' ;
2020-09-16 10:51:19 +02:00
print '</tr>' ;
2020-09-10 11:04:41 +02:00
2015-04-18 17:49:48 +02:00
$i ++ ;
2020-09-21 13:54:26 +02:00
$total += $obj -> total_ht ;
$total_ttc += $obj -> total_ttc ;
}
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap" colspan="5">' ;
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '... (' . $othernb . ')</span>' ;
print '</td>' ;
print " </tr> \n " ;
2015-04-18 17:49:48 +02:00
}
}
2020-09-10 11:04:41 +02:00
2023-11-27 11:39:32 +01:00
addSummaryTableLine ( 5 , $num , $nbofloop , ! getDolGlobalString ( 'MAIN_DASHBOARD_USE_TOTAL_HT' ) ? $total_ttc : $total , " None " , true );
2020-09-10 11:04:41 +02:00
finishSimpleTable ( true );
2020-09-20 16:11:02 +02:00
2020-09-10 11:04:41 +02:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2015-04-18 17:49:48 +02:00
dol_print_error ( $db );
}
}
2024-06-27 10:41:55 +02:00
print '</div>' ;
2020-09-16 14:03:41 +02:00
print '</div>' ;
print '</div>' ;
2002-04-29 20:01:16 +02:00
2019-06-18 14:07:52 +02:00
$parameters = array ( 'user' => $user );
$reshook = $hookmanager -> executeHooks ( 'dashboardCommercials' , $parameters , $object ); // Note that $action and $object may have been modified by hook
2018-07-29 17:17:29 +02:00
// End of page
2012-02-02 07:49:50 +01:00
llxFooter ();
$db -> close ();