2008-04-19 19:26:41 +02:00
< ? php
2021-10-30 21:17:15 +02:00
/* Copyright ( C ) 2001 - 2004 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2004 - 2020 Laurent Destailleur < eldy @ users . sourceforge . net >
* Copyright ( C ) 2005 - 2010 Regis Houssin < regis . houssin @ inodbox . com >
* Copyright ( C ) 2012 - 2016 Juanjo Menent < jmenent @ 2 byte . es >
* Copyright ( C ) 2015 - 2021 Alexandre Spangaro < aspangaro @ open - dsi . fr >
* Copyright ( C ) 2015 Marcos García < marcosgdf @ gmail . com >
* Copyright ( C ) 2016 Josep Lluís Amador < joseplluis @ lliuretic . cat >
2023-06-27 21:31:36 +02:00
* Copyright ( C ) 2021 - 2023 Gauthier VERDOL < gauthier . verdol @ atm - consulting . fr >
2021-10-30 21:17:15 +02:00
* Copyright ( C ) 2021 Noé Cendrier < noe . cendrier @ altairis . fr >
2025-02-08 14:06:14 +01:00
* Copyright ( C ) 2023 - 2024 Frédéric France < frederic . france @ free . fr >
* Copyright ( C ) 2024 - 2025 MDW < mdeweerd @ users . noreply . github . com >
2008-04-19 19:26:41 +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
2008-04-19 19:26:41 +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 />.
2008-04-19 19:26:41 +02:00
*/
/**
2008-09-10 22:49:21 +02:00
* \file htdocs / projet / element . php
2016-10-17 20:10:53 +02:00
* \ingroup projet
2010-12-18 12:29:42 +01:00
* \brief Page of project referrers
2008-09-10 22:49:21 +02:00
*/
2008-04-19 19:26:41 +02:00
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2012-08-22 23:24:21 +02:00
require '../main.inc.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php' ;
2015-06-03 21:01:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php' ;
2013-06-17 14:25:33 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php' ;
2014-10-29 20:21:24 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php' ;
2015-02-24 18:20:19 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php' ;
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'agenda' )) {
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php' ;
2021-09-21 11:22:59 +02:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'bank' )) {
2023-08-09 13:14:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/paymentvarious.class.php' ;
2021-02-26 18:49:22 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'category' )) {
2023-08-09 13:14:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php' ;
2021-02-26 18:49:22 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'order' )) {
2021-02-26 18:49:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php' ;
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'contract' )) {
2021-02-26 18:49:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php' ;
}
2022-08-31 21:55:55 +02:00
if ( isModEnabled ( 'deplacement' )) {
2021-02-26 18:49:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/compta/deplacement/class/deplacement.class.php' ;
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'don' )) {
require_once DOL_DOCUMENT_ROOT . '/don/class/don.class.php' ;
}
2024-03-12 11:07:18 +01:00
if ( isModEnabled ( 'shipping' )) {
2023-08-09 13:14:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php' ;
}
2022-08-31 21:55:55 +02:00
if ( isModEnabled ( 'expensereport' )) {
2021-02-26 18:49:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php' ;
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'invoice' )) {
2023-08-09 13:14:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture-rec.class.php' ;
2021-02-26 18:49:22 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' )) {
2023-08-09 13:14:50 +02:00
require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'loan' )) {
2021-02-26 18:49:22 +01:00
require_once DOL_DOCUMENT_ROOT . '/loan/class/loan.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/loan/class/loanschedule.class.php' ;
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'mrp' )) {
require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'propal' )) {
require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'salaries' )) {
2021-03-01 11:12:03 +01:00
require_once DOL_DOCUMENT_ROOT . '/salaries/class/salary.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'stock' )) {
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'supplier_invoice' )) {
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php' ;
}
if ( isModEnabled ( 'supplier_order' )) {
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php' ;
2021-02-26 18:49:22 +01:00
}
2023-08-09 13:14:50 +02:00
if ( isModEnabled ( 'supplier_proposal' )) {
require_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php' ;
}
if ( isModEnabled ( 'tax' )) {
require_once DOL_DOCUMENT_ROOT . '/compta/sociales/class/chargesociales.class.php' ;
}
2023-09-27 10:52:39 +02:00
if ( isModEnabled ( 'stocktransfer' )) {
require_once DOL_DOCUMENT_ROOT . '/product/stock/stocktransfer/class/stocktransfer.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/product/stock/stocktransfer/class/stocktransferline.class.php' ;
}
2023-08-09 13:14:50 +02:00
2024-11-04 23:53:20 +01:00
/**
* @ var Conf $conf
* @ var DoliDB $db
* @ var HookManager $hookmanager
2024-11-06 19:39:46 +01:00
* @ var Societe $mysoc
2024-11-04 23:53:20 +01:00
* @ var Translate $langs
* @ var User $user
*/
2008-04-19 19:26:41 +02:00
2018-05-26 21:11:25 +02:00
// Load translation files required by the page
$langs -> loadLangs ( array ( 'projects' , 'companies' , 'suppliers' , 'compta' ));
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'invoice' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " bills " );
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'order' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " orders " );
}
2022-08-23 20:01:34 +02:00
if ( isModEnabled ( " propal " )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " propal " );
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " interventions " );
}
2022-08-31 21:55:55 +02:00
if ( isModEnabled ( 'deplacement' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " trips " );
}
2022-08-31 21:55:55 +02:00
if ( isModEnabled ( 'expensereport' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " trips " );
}
2022-09-25 06:18:41 +02:00
if ( isModEnabled ( 'don' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " donations " );
}
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'loan' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " loan " );
}
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'salaries' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " salaries " );
}
2022-09-25 22:57:35 +02:00
if ( isModEnabled ( 'mrp' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( " mrp " );
}
2022-08-31 22:38:53 +02:00
if ( isModEnabled ( 'eventorganization' )) {
2021-03-11 19:09:42 +01:00
$langs -> load ( " eventorganization " );
}
2020-03-06 11:21:34 +01:00
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
$id = GETPOSTINT ( 'id' );
2020-03-06 11:21:34 +01:00
$ref = GETPOST ( 'ref' , 'alpha' );
2020-09-16 19:39:50 +02:00
$action = GETPOST ( 'action' , 'aZ09' );
2024-01-14 12:10:09 +01:00
$datesrfc = GETPOST ( 'datesrfc' ); // deprecated
$dateerfc = GETPOST ( 'dateerfc' ); // deprecated
2025-02-08 14:06:14 +01:00
$dates = dol_mktime ( 0 , 0 , 0 , GETPOSTINT ( 'datesmonth' ), GETPOSTINT ( 'datesday' ), GETPOSTINT ( 'datesyear' ));
$datee = dol_mktime ( 23 , 59 , 59 , GETPOSTINT ( 'dateemonth' ), GETPOSTINT ( 'dateeday' ), GETPOSTINT ( 'dateeyear' ));
2024-01-14 12:10:09 +01:00
if ( empty ( $dates ) && ! empty ( $datesrfc )) { // deprecated
2021-02-26 18:49:22 +01:00
$dates = dol_stringtotime ( $datesrfc );
}
2024-01-14 12:10:09 +01:00
if ( empty ( $datee ) && ! empty ( $dateerfc )) { // deprecated
2021-02-26 18:49:22 +01:00
$datee = dol_stringtotime ( $dateerfc );
}
2023-11-27 11:56:32 +01:00
if ( ! GETPOSTISSET ( 'datesrfc' ) && ! GETPOSTISSET ( 'datesday' ) && getDolGlobalString ( 'PROJECT_LINKED_ELEMENT_DEFAULT_FILTER_YEAR' )) {
2020-03-06 11:21:34 +01:00
$new = dol_now ();
$tmp = dol_getdate ( $new );
2014-10-29 20:21:24 +01:00
//$datee=$now
//$dates=dol_time_plus_duree($datee, -1, 'y');
2020-03-06 11:21:34 +01:00
$dates = dol_get_first_day ( $tmp [ 'year' ], 1 );
2014-10-29 20:21:24 +01:00
}
2021-02-26 18:49:22 +01:00
if ( $id == '' && $ref == '' ) {
2019-10-29 16:40:47 +01:00
setEventMessage ( $langs -> trans ( 'ErrorBadParameters' ), 'errors' );
header ( 'Location: list.php' );
exit ();
2010-05-23 22:01:10 +02:00
}
2008-04-19 19:26:41 +02:00
2024-10-13 17:17:37 +02:00
if ( $dates === '' ) {
$dates = null ;
}
if ( $datee === '' ) {
$datee = null ;
}
2021-10-31 15:14:15 +01:00
$mine = GETPOST ( 'mode' ) == 'mine' ? 1 : 0 ;
2010-05-29 01:26:08 +02:00
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
2010-05-30 14:21:32 +02:00
2015-03-02 17:54:35 +01:00
$object = new Project ( $db );
2024-06-30 21:02:50 +02:00
include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php' ; // Must be 'include', not 'include_once'
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_ALLOW_COMMENT_ON_PROJECT' ) && method_exists ( $object , 'fetchComments' ) && empty ( $object -> comments )) {
2021-02-26 18:49:22 +01:00
$object -> fetchComments ();
}
2012-05-23 14:34:44 +02:00
2010-05-30 14:21:32 +02:00
// Security check
2020-03-06 11:21:34 +01:00
$socid = $object -> socid ;
2008-04-19 19:26:41 +02:00
2016-06-13 16:25:27 +02:00
$hookmanager -> initHooks ( array ( 'projectOverview' ));
2024-08-20 23:32:43 +02:00
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignment.
$result = restrictedArea ( $user , 'projet' , $object -> id , 'projet&project' );
2024-10-06 13:03:43 +02:00
$total_duration = 0 ;
$total_ttc_by_line = 0 ;
$total_ht_by_line = 0 ;
$expensereport = null ;
$othermessage = '' ;
$tmpprojtime = array ();
$nbAttendees = 0 ;
2018-02-01 19:15:50 +01:00
2024-09-01 13:48:58 +02:00
/*
* Actions
*/
// None
2008-04-19 19:26:41 +02:00
/*
2009-08-12 14:59:14 +02:00
* View
*/
2008-04-19 19:26:41 +02:00
2021-04-19 18:13:06 +02:00
$title = $langs -> trans ( 'ProjectReferers' ) . ' - ' . $object -> ref . ' ' . $object -> name ;
2024-03-22 00:37:56 +01:00
if ( getDolGlobalString ( 'MAIN_HTML_TITLE' ) && preg_match ( '/projectnameonly/' , getDolGlobalString ( 'MAIN_HTML_TITLE' )) && $object -> name ) {
2021-04-19 18:13:06 +02:00
$title = $object -> ref . ' ' . $object -> name . ' - ' . $langs -> trans ( 'ProjectReferers' );
2021-02-26 18:49:22 +01:00
}
2021-04-19 18:13:06 +02:00
$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos|DE:Modul_Projekte' ;
2024-07-13 18:10:40 +02:00
llxHeader ( '' , $title , $help_url , '' , 0 , 0 , '' , '' , '' , 'mod-project page-card_element' );
2008-04-19 19:26:41 +02:00
2009-01-12 21:26:06 +01:00
$form = new Form ( $db );
2019-11-13 19:37:08 +01:00
$formproject = new FormProjets ( $db );
2015-02-24 18:20:19 +01:00
$formfile = new FormFile ( $db );
2009-01-12 21:26:06 +01:00
2019-11-13 19:37:08 +01:00
$userstatic = new User ( $db );
2010-01-26 14:28:25 +01:00
2010-02-04 11:40:18 +01:00
// To verify role of users
2015-03-02 17:54:35 +01:00
$userAccess = $object -> restrictedProjectArea ( $user );
2010-02-04 11:40:18 +01:00
2019-11-13 19:37:08 +01:00
$head = project_prepare_head ( $object );
2020-10-22 22:50:03 +02:00
print dol_get_fiche_head ( $head , 'element' , $langs -> trans ( " Project " ), - 1 , ( $object -> public ? 'projectpub' : 'project' ));
2008-04-19 19:26:41 +02:00
2016-10-17 20:10:53 +02:00
// Project card
2008-04-19 19:26:41 +02:00
2023-09-06 14:56:51 +02:00
if ( ! empty ( $_SESSION [ 'pageforbacktolist' ]) && ! empty ( $_SESSION [ 'pageforbacktolist' ][ 'project' ])) {
$tmpurl = $_SESSION [ 'pageforbacktolist' ][ 'project' ];
2024-03-19 22:15:29 +01:00
$tmpurl = preg_replace ( '/__SOCID__/' , ( string ) $object -> socid , $tmpurl );
2023-09-06 14:56:51 +02:00
$linkback = '<a href="' . $tmpurl . ( preg_match ( '/\?/' , $tmpurl ) ? '&' : '?' ) . 'restore_lastsearch_values=1">' . $langs -> trans ( " BackToList " ) . '</a>' ;
} else {
$linkback = '<a href="' . DOL_URL_ROOT . '/projet/list.php?restore_lastsearch_values=1">' . $langs -> trans ( " BackToList " ) . '</a>' ;
}
2012-07-28 21:49:47 +02:00
2019-11-13 19:37:08 +01:00
$morehtmlref = '<div class="refidno">' ;
2016-10-17 20:10:53 +02:00
// Title
2019-11-13 19:37:08 +01:00
$morehtmlref .= $object -> title ;
2016-10-17 20:10:53 +02:00
// Thirdparty
2021-10-24 09:59:30 +02:00
if ( ! empty ( $object -> thirdparty -> id ) && $object -> thirdparty -> id > 0 ) {
2022-10-21 15:08:54 +02:00
$morehtmlref .= '<br>' . $object -> thirdparty -> getNomUrl ( 1 , 'project' );
2016-10-17 20:10:53 +02:00
}
2019-11-13 19:37:08 +01:00
$morehtmlref .= '</div>' ;
2016-10-17 20:10:53 +02:00
// Define a complementary filter for search of next/prev ref.
2023-10-15 18:39:13 +02:00
if ( ! $user -> hasRight ( 'projet' , 'all' , 'lire' )) {
2020-10-31 14:32:18 +01:00
$objectsListId = $object -> getProjectsAuthorizedForUser ( $user , 0 , 0 );
2024-12-10 11:54:33 +01:00
$object -> next_prev_filter = " te.rowid:IN: " . $db -> sanitize ( count ( $objectsListId ) ? implode ( ',' , array_keys ( $objectsListId )) : '0' );
2016-10-17 20:10:53 +02:00
}
dol_banner_tab ( $object , 'ref' , $linkback , 1 , 'ref' , 'ref' , $morehtmlref );
print '<div class="fichecenter">' ;
print '<div class="fichehalfleft">' ;
print '<div class="underbanner clearboth"></div>' ;
2019-09-01 01:40:51 +02:00
print '<table class="border tableforfield centpercent">' ;
// Usage
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_USE_OPPORTUNITIES' ) || ! getDolGlobalString ( 'PROJECT_HIDE_TASKS' ) || isModEnabled ( 'eventorganization' )) {
2021-03-18 11:07:48 +01:00
print '<tr><td class="tdtop">' ;
print $langs -> trans ( " Usage " );
print '</td>' ;
print '<td>' ;
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_USE_OPPORTUNITIES' )) {
2021-03-18 11:07:48 +01:00
print '<input type="checkbox" disabled name="usage_opportunity"' . ( GETPOSTISSET ( 'usage_opportunity' ) ? ( GETPOST ( 'usage_opportunity' , 'alpha' ) != '' ? ' checked="checked"' : '' ) : ( $object -> usage_opportunity ? ' checked="checked"' : '' )) . '"> ' ;
$htmltext = $langs -> trans ( " ProjectFollowOpportunity " );
print $form -> textwithpicto ( $langs -> trans ( " ProjectFollowOpportunity " ), $htmltext );
print '<br>' ;
}
2023-11-27 11:56:32 +01:00
if ( ! getDolGlobalString ( 'PROJECT_HIDE_TASKS' )) {
2021-03-18 11:07:48 +01:00
print '<input type="checkbox" disabled name="usage_task"' . ( GETPOSTISSET ( 'usage_task' ) ? ( GETPOST ( 'usage_task' , 'alpha' ) != '' ? ' checked="checked"' : '' ) : ( $object -> usage_task ? ' checked="checked"' : '' )) . '"> ' ;
$htmltext = $langs -> trans ( " ProjectFollowTasks " );
print $form -> textwithpicto ( $langs -> trans ( " ProjectFollowTasks " ), $htmltext );
print '<br>' ;
}
2023-11-27 11:56:32 +01:00
if ( ! getDolGlobalString ( 'PROJECT_HIDE_TASKS' ) && getDolGlobalString ( 'PROJECT_BILL_TIME_SPENT' )) {
2021-03-18 11:07:48 +01:00
print '<input type="checkbox" disabled name="usage_bill_time"' . ( GETPOSTISSET ( 'usage_bill_time' ) ? ( GETPOST ( 'usage_bill_time' , 'alpha' ) != '' ? ' checked="checked"' : '' ) : ( $object -> usage_bill_time ? ' checked="checked"' : '' )) . '"> ' ;
$htmltext = $langs -> trans ( " ProjectBillTimeDescription " );
print $form -> textwithpicto ( $langs -> trans ( " BillTime " ), $htmltext );
print '<br>' ;
}
2022-08-31 22:38:53 +02:00
if ( isModEnabled ( 'eventorganization' )) {
2021-03-20 12:42:46 +01:00
print '<input type="checkbox" disabled name="usage_organize_event"' . ( GETPOSTISSET ( 'usage_organize_event' ) ? ( GETPOST ( 'usage_organize_event' , 'alpha' ) != '' ? ' checked="checked"' : '' ) : ( $object -> usage_organize_event ? ' checked="checked"' : '' )) . '"> ' ;
$htmltext = $langs -> trans ( " EventOrganizationDescriptionLong " );
print $form -> textwithpicto ( $langs -> trans ( " ManageOrganizeEvent " ), $htmltext );
}
2021-03-18 11:07:48 +01:00
print '</td></tr>' ;
2021-03-11 19:09:42 +01:00
}
2016-10-17 20:10:53 +02:00
2025-01-29 14:15:08 +01:00
if ( getDolGlobalString ( 'PROJECT_USE_OPPORTUNITIES' ) && ! empty ( $object -> usage_opportunity )) {
2020-10-31 14:32:18 +01:00
// Opportunity status
print '<tr><td>' . $langs -> trans ( " OpportunityStatus " ) . '</td><td>' ;
$code = dol_getIdFromCode ( $db , $object -> opp_status , 'c_lead_status' , 'rowid' , 'code' );
2021-02-26 18:49:22 +01:00
if ( $code ) {
print $langs -> trans ( " OppStatus " . $code );
}
2020-10-31 14:32:18 +01:00
print '</td></tr>' ;
// Opportunity percent
print '<tr><td>' . $langs -> trans ( " OpportunityProbability " ) . '</td><td>' ;
2023-01-31 21:17:06 +01:00
if ( ! is_null ( $object -> opp_percent ) && strcmp ( $object -> opp_percent , '' )) {
2024-03-08 21:30:04 +01:00
print price ( $object -> opp_percent , 0 , $langs , 1 , 0 ) . ' %' ;
2021-02-26 18:49:22 +01:00
}
2020-10-31 14:32:18 +01:00
print '</td></tr>' ;
// Opportunity Amount
print '<tr><td>' . $langs -> trans ( " OpportunityAmount " ) . '</td><td>' ;
2023-01-31 21:17:06 +01:00
if ( ! is_null ( $object -> opp_amount ) && strcmp ( $object -> opp_amount , '' )) {
2024-03-08 21:30:04 +01:00
print '<span class="amount">' . price ( $object -> opp_amount , 0 , $langs , 1 , 0 , 0 , $conf -> currency ) . '</span>' ;
2022-05-16 18:54:50 +02:00
if ( strcmp ( $object -> opp_percent , '' )) {
2024-06-08 16:59:40 +02:00
print ' <span title="' . dol_escape_htmltag ( $langs -> trans ( 'OpportunityWeightedAmount' )) . '"><span class="opacitymedium">' . $langs -> trans ( " OpportunityWeightedAmountShort " ) . '</span>: <span class="amount">' . price ( $object -> opp_amount * $object -> opp_percent / 100 , 0 , $langs , 1 , 0 , - 1 , $conf -> currency ) . '</span></span>' ;
2022-05-16 18:54:50 +02:00
}
2021-02-26 18:49:22 +01:00
}
2020-10-31 14:32:18 +01:00
print '</td></tr>' ;
2016-06-20 10:54:02 +02:00
}
2015-06-30 01:34:17 +02:00
2022-10-21 13:19:21 +02:00
// Budget
print '<tr><td>' . $langs -> trans ( " Budget " ) . '</td><td>' ;
2023-01-31 21:17:06 +01:00
if ( ! is_null ( $object -> budget_amount ) && strcmp ( $object -> budget_amount , '' )) {
2024-03-08 21:30:04 +01:00
print '<span class="amount">' . price ( $object -> budget_amount , 0 , $langs , 1 , 0 , 0 , $conf -> currency ) . '</span>' ;
2022-10-21 13:19:21 +02:00
}
print '</td></tr>' ;
// Date start - end project
print '<tr><td>' . $langs -> trans ( " Dates " ) . '</td><td>' ;
2019-01-27 11:55:16 +01:00
$start = dol_print_date ( $object -> date_start , 'day' );
2023-12-04 13:49:31 +01:00
print ( $start ? $start : '?' );
2019-01-27 11:55:16 +01:00
$end = dol_print_date ( $object -> date_end , 'day' );
2017-04-05 14:48:24 +02:00
print ' - ' ;
2023-12-04 13:49:31 +01:00
print ( $end ? $end : '?' );
2021-02-26 18:49:22 +01:00
if ( $object -> hasDelay ()) {
print img_warning ( " Late " );
}
2016-10-17 20:10:53 +02:00
print '</td></tr>' ;
2025-01-29 14:08:48 +01:00
// Visibility
print '<tr><td class="titlefield">' . $langs -> trans ( " Visibility " ) . '</td><td>' ;
if ( $object -> public ) {
print img_picto ( $langs -> trans ( 'SharedProject' ), 'world' , 'class="paddingrightonly"' );
print $langs -> trans ( 'SharedProject' );
} else {
print img_picto ( $langs -> trans ( 'PrivateProject' ), 'private' , 'class="paddingrightonly"' );
print $langs -> trans ( 'PrivateProject' );
}
print '</td></tr>' ;
2016-10-17 20:10:53 +02:00
// Other attributes
$cols = 2 ;
2019-11-13 19:37:08 +01:00
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php' ;
2016-10-17 20:10:53 +02:00
print '</table>' ;
print '</div>' ;
print '<div class="fichehalfright">' ;
print '<div class="underbanner clearboth"></div>' ;
2021-10-23 14:49:35 +02:00
print '<table class="border tableforfield centpercent">' ;
2016-10-17 20:10:53 +02:00
// Categories
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'category' )) {
2020-10-31 14:32:18 +01:00
print '<tr><td class="valignmiddle">' . $langs -> trans ( " Categories " ) . '</td><td>' ;
print $form -> showCategories ( $object -> id , Categorie :: TYPE_PROJECT , 1 );
print " </td></tr> " ;
2016-10-17 20:10:53 +02:00
}
2025-01-29 14:08:48 +01:00
// Description
print '<tr><td class="titlefield' . ( $object -> description ? ' noborderbottom' : '' ) . '" colspan="2">' . $langs -> trans ( " Description " ) . '</td></tr>' ;
if ( $object -> description ) {
print '<tr><td class="nottitleforfield" colspan="2">' ;
print '<div class="longmessagecut">' ;
print dolPrintHTML ( $object -> description );
print '</div>' ;
print '</td></tr>' ;
}
2008-04-19 19:26:41 +02:00
print '</table>' ;
2016-10-17 20:10:53 +02:00
print '</div>' ;
print '</div>' ;
print '<div class="clearboth"></div>' ;
2020-10-27 18:19:31 +01:00
print dol_get_fiche_end ();
2008-04-19 19:26:41 +02:00
2017-05-18 12:12:36 +02:00
print '<br>' ;
2008-04-19 19:26:41 +02:00
/*
2024-01-11 10:07:06 +01:00
* Referrer types
2008-04-19 19:26:41 +02:00
*/
2010-01-04 22:45:59 +01:00
2019-11-13 19:37:08 +01:00
$listofreferent = array (
2024-03-19 22:15:29 +01:00
'entrepot' => array (
'name' => " Warehouse " ,
'title' => " ListWarehouseAssociatedProject " ,
'class' => 'Entrepot' ,
'table' => 'entrepot' ,
'datefieldname' => 'date_entrepot' ,
'urlnew' => DOL_URL_ROOT . '/product/stock/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'entrepot' ,
'buttonnew' => 'AddWarehouse' ,
'project_field' => 'fk_project' ,
'testnew' => $user -> hasRight ( 'stock' , 'creer' ),
'test' => isModEnabled ( 'stock' ) && $user -> hasRight ( 'stock' , 'lire' ) && getDolGlobalString ( 'WAREHOUSE_ASK_WAREHOUSE_DURING_PROJECT' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'propal' => array (
'name' => " Proposals " ,
'title' => " ListProposalsAssociatedProject " ,
'class' => 'Propal' ,
'table' => 'propal' ,
'datefieldname' => 'datep' ,
'urlnew' => DOL_URL_ROOT . '/comm/propal/card.php?action=create&origin=project&originid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'propal' ,
'buttonnew' => 'AddProp' ,
'testnew' => $user -> hasRight ( 'propal' , 'creer' ),
'test' => isModEnabled ( 'propal' ) && $user -> hasRight ( 'propal' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'order' => array (
'name' => " CustomersOrders " ,
'title' => " ListOrdersAssociatedProject " ,
'class' => 'Commande' ,
'table' => 'commande' ,
'datefieldname' => 'date_commande' ,
'urlnew' => DOL_URL_ROOT . '/commande/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'orders' ,
'buttonnew' => 'CreateOrder' ,
'testnew' => $user -> hasRight ( 'commande' , 'creer' ),
'test' => isModEnabled ( 'order' ) && $user -> hasRight ( 'commande' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'invoice' => array (
'name' => " CustomersInvoices " ,
'title' => " ListInvoicesAssociatedProject " ,
'class' => 'Facture' ,
'margin' => 'add' ,
'table' => 'facture' ,
'datefieldname' => 'datef' ,
'urlnew' => DOL_URL_ROOT . '/compta/facture/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'bills' ,
'buttonnew' => 'CreateBill' ,
'testnew' => $user -> hasRight ( 'facture' , 'creer' ),
'test' => isModEnabled ( 'invoice' ) && $user -> hasRight ( 'facture' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'invoice_predefined' => array (
'name' => " PredefinedInvoices " ,
'title' => " ListPredefinedInvoicesAssociatedProject " ,
'class' => 'FactureRec' ,
'table' => 'facture_rec' ,
'datefieldname' => 'datec' ,
'urlnew' => DOL_URL_ROOT . '/compta/facture/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'bills' ,
'buttonnew' => 'CreateBill' ,
'testnew' => $user -> hasRight ( 'facture' , 'creer' ),
'test' => isModEnabled ( 'invoice' ) && $user -> hasRight ( 'facture' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'proposal_supplier' => array (
'name' => " SupplierProposals " ,
'title' => " ListSupplierProposalsAssociatedProject " ,
'class' => 'SupplierProposal' ,
'table' => 'supplier_proposal' ,
'datefieldname' => 'date_valid' ,
'urlnew' => DOL_URL_ROOT . '/supplier_proposal/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ), // No socid parameter here, the socid is often the customer and we create a supplier object
'lang' => 'supplier_proposal' ,
'buttonnew' => 'AddSupplierProposal' ,
'testnew' => $user -> hasRight ( 'supplier_proposal' , 'creer' ),
'test' => isModEnabled ( 'supplier_proposal' ) && $user -> hasRight ( 'supplier_proposal' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'order_supplier' => array (
'name' => " SuppliersOrders " ,
'title' => " ListSupplierOrdersAssociatedProject " ,
'class' => 'CommandeFournisseur' ,
'table' => 'commande_fournisseur' ,
'datefieldname' => 'date_commande' ,
'urlnew' => DOL_URL_ROOT . '/fourn/commande/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ), // No socid parameter here, the socid is often the customer and we create a supplier object
'lang' => 'suppliers' ,
'buttonnew' => 'AddSupplierOrder' ,
'testnew' => $user -> hasRight ( 'fournisseur' , 'commande' , 'creer' ) || $user -> hasRight ( 'supplier_order' , 'creer' ),
'test' => isModEnabled ( 'supplier_order' ) && $user -> hasRight ( 'fournisseur' , 'commande' , 'lire' ) || $user -> hasRight ( 'supplier_order' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'invoice_supplier' => array (
'name' => " BillsSuppliers " ,
'title' => " ListSupplierInvoicesAssociatedProject " ,
'class' => 'FactureFournisseur' ,
'margin' => 'minus' ,
'table' => 'facture_fourn' ,
'datefieldname' => 'datef' ,
'urlnew' => DOL_URL_ROOT . '/fourn/facture/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ), // No socid parameter here, the socid is often the customer and we create a supplier object
'lang' => 'suppliers' ,
'buttonnew' => 'AddSupplierInvoice' ,
'testnew' => $user -> hasRight ( 'fournisseur' , 'facture' , 'creer' ) || $user -> hasRight ( 'supplier_invoice' , 'creer' ),
'test' => isModEnabled ( 'supplier_invoice' ) && $user -> hasRight ( 'fournisseur' , 'facture' , 'lire' ) || $user -> hasRight ( 'supplier_invoice' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'contract' => array (
'name' => " Contracts " ,
'title' => " ListContractAssociatedProject " ,
'class' => 'Contrat' ,
'table' => 'contrat' ,
'datefieldname' => 'date_contrat' ,
'urlnew' => DOL_URL_ROOT . '/contrat/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'contracts' ,
'buttonnew' => 'AddContract' ,
'testnew' => $user -> hasRight ( 'contrat' , 'creer' ),
'test' => isModEnabled ( 'contract' ) && $user -> hasRight ( 'contrat' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'intervention' => array (
'name' => " Interventions " ,
'title' => " ListFichinterAssociatedProject " ,
'class' => 'Fichinter' ,
'table' => 'fichinter' ,
'datefieldname' => 'date_valid' ,
'disableamount' => 0 ,
'margin' => '' ,
'urlnew' => DOL_URL_ROOT . '/fichinter/card.php?action=create&origin=project&originid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'interventions' ,
'buttonnew' => 'AddIntervention' ,
'testnew' => $user -> hasRight ( 'ficheinter' , 'creer' ),
'test' => isModEnabled ( 'intervention' ) && $user -> hasRight ( 'ficheinter' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'shipping' => array (
'name' => " Shippings " ,
'title' => " ListShippingAssociatedProject " ,
'class' => 'Expedition' ,
'table' => 'expedition' ,
'datefieldname' => 'date_valid' ,
'urlnew' => DOL_URL_ROOT . '/expedition/card.php?action=create&origin=project&originid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'sendings' ,
'buttonnew' => 'CreateShipment' ,
'testnew' => 0 ,
'test' => isModEnabled ( 'shipping' ) && $user -> hasRight ( 'expedition' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'mrp' => array (
'name' => " MO " ,
'title' => " ListMOAssociatedProject " ,
'class' => 'Mo' ,
'table' => 'mrp_mo' ,
'datefieldname' => 'date_valid' ,
'urlnew' => DOL_URL_ROOT . '/mrp/mo_card.php?action=create&origin=project&originid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'mrp' ,
'buttonnew' => 'CreateMO' ,
'testnew' => $user -> hasRight ( 'mrp' , 'write' ),
'project_field' => 'fk_project' ,
'nototal' => 1 ,
'test' => isModEnabled ( 'mrp' ) && $user -> hasRight ( 'mrp' , 'read' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'trip' => array (
'name' => " TripsAndExpenses " ,
'title' => " ListExpenseReportsAssociatedProject " ,
'class' => 'Deplacement' ,
'table' => 'deplacement' ,
'datefieldname' => 'dated' ,
'margin' => 'minus' ,
'disableamount' => 1 ,
'urlnew' => DOL_URL_ROOT . '/deplacement/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'trips' ,
'buttonnew' => 'AddTrip' ,
'testnew' => $user -> hasRight ( 'deplacement' , 'creer' ),
'test' => isModEnabled ( 'deplacement' ) && $user -> hasRight ( 'deplacement' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'expensereport' => array (
'name' => " ExpenseReports " ,
'title' => " ListExpenseReportsAssociatedProject " ,
'class' => 'ExpenseReportLine' ,
'table' => 'expensereport_det' ,
'datefieldname' => 'date' ,
'margin' => 'minus' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/expensereport/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'trips' ,
'buttonnew' => 'AddTrip' ,
'testnew' => $user -> hasRight ( 'expensereport' , 'creer' ),
'test' => isModEnabled ( 'expensereport' ) && $user -> hasRight ( 'expensereport' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'donation' => array (
'name' => " Donation " ,
'title' => " ListDonationsAssociatedProject " ,
'class' => 'Don' ,
'margin' => 'add' ,
'table' => 'don' ,
'datefieldname' => 'datedon' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/don/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'donations' ,
'buttonnew' => 'AddDonation' ,
'testnew' => $user -> hasRight ( 'don' , 'creer' ),
'test' => isModEnabled ( 'don' ) && $user -> hasRight ( 'don' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'loan' => array (
'name' => " Loan " ,
'title' => " ListLoanAssociatedProject " ,
'class' => 'Loan' ,
'margin' => 'add' ,
'table' => 'loan' ,
'datefieldname' => 'datestart' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/loan/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'loan' ,
'buttonnew' => 'AddLoan' ,
'testnew' => $user -> hasRight ( 'loan' , 'write' ),
'test' => isModEnabled ( 'loan' ) && $user -> hasRight ( 'loan' , 'read' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'chargesociales' => array (
'name' => " SocialContribution " ,
'title' => " ListSocialContributionAssociatedProject " ,
'class' => 'ChargeSociales' ,
'margin' => 'minus' ,
'table' => 'chargesociales' ,
'datefieldname' => 'date_ech' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'compta' ,
'buttonnew' => 'AddSocialContribution' ,
'testnew' => $user -> hasRight ( 'tax' , 'charges' , 'lire' ),
'test' => isModEnabled ( 'tax' ) && $user -> hasRight ( 'tax' , 'charges' , 'lire' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'project_task' => array (
'name' => " TaskTimeSpent " ,
'title' => " ListTaskTimeUserProject " ,
'class' => 'Task' ,
'margin' => 'minus' ,
'table' => 'projet_task' ,
'datefieldname' => 'element_date' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/projet/tasks/time.php?withproject=1&action=createtime&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'buttonnew' => 'AddTimeSpent' ,
'testnew' => $user -> hasRight ( 'project' , 'creer' ),
'test' => isModEnabled ( 'project' ) && $user -> hasRight ( 'projet' , 'lire' ) && ! getDolGlobalString ( 'PROJECT_HIDE_TASKS' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'stock_mouvement' => array (
'name' => " MouvementStockAssociated " ,
'title' => " ListMouvementStockProject " ,
'class' => 'StockTransfer' ,
'table' => 'stocktransfer_stocktransfer' ,
'datefieldname' => 'datem' ,
'margin' => 'minus' ,
'project_field' => 'fk_project' ,
'disableamount' => 0 ,
'test' => isModEnabled ( 'stock' ) && $user -> hasRight ( 'stock' , 'mouvement' , 'lire' ) && getDolGlobalString ( 'STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'salaries' => array (
'name' => " Salaries " ,
'title' => " ListSalariesAssociatedProject " ,
'class' => 'Salary' ,
'table' => 'salary' ,
'datefieldname' => 'datesp' ,
'margin' => 'minus' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/salaries/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'salaries' ,
'buttonnew' => 'AddSalary' ,
'testnew' => $user -> hasRight ( 'salaries' , 'write' ),
'test' => isModEnabled ( 'salaries' ) && $user -> hasRight ( 'salaries' , 'read' )
2023-06-27 21:31:36 +02:00
),
2024-03-19 22:15:29 +01:00
'variouspayment' => array (
'name' => " VariousPayments " ,
'title' => " ListVariousPaymentsAssociatedProject " ,
'class' => 'PaymentVarious' ,
'table' => 'payment_various' ,
'datefieldname' => 'datev' ,
'margin' => 'minus' ,
'disableamount' => 0 ,
'urlnew' => DOL_URL_ROOT . '/compta/bank/various_payment/card.php?action=create&projectid=' . $id . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'banks' ,
'buttonnew' => 'AddVariousPayment' ,
'testnew' => $user -> hasRight ( 'banque' , 'modifier' ),
'test' => isModEnabled ( " bank " ) && $user -> hasRight ( 'banque' , 'lire' ) && ! getDolGlobalString ( 'BANK_USE_OLD_VARIOUS_PAYMENT' )
2023-06-27 21:31:36 +02:00
),
2023-06-08 10:35:06 +02:00
/* No need for this , available on dedicated tab " Agenda/Events "
'agenda' => array (
'name' => " Agenda " ,
'title' => " ListActionsAssociatedProject " ,
'class' => 'ActionComm' ,
'table' => 'actioncomm' ,
'datefieldname' => 'datep' ,
'disableamount' => 1 ,
'urlnew' => DOL_URL_ROOT . '/comm/action/card.php?action=create&projectid=' . $id . '&socid=' . $socid . '&backtopage=' . urlencode ( $_SERVER [ 'PHP_SELF' ] . '?id=' . $id ),
'lang' => 'agenda' ,
'buttonnew' => 'AddEvent' ,
'testnew' => $user -> rights -> agenda -> myactions -> create ,
'test' => isModEnabled ( 'agenda' ) && $user -> hasRight ( 'agenda' , 'myactions' , 'read' )),
*/
2008-04-19 19:26:41 +02:00
);
2020-06-08 17:00:58 +02:00
// Change rules for profit/benefit calculation
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_ELEMENTS_FOR_PLUS_MARGIN' )) {
2020-05-21 02:02:54 +02:00
foreach ( $listofreferent as $key => $element ) {
2020-05-05 20:51:29 +02:00
if ( $listofreferent [ $key ][ 'margin' ] == 'add' ) {
unset ( $listofreferent [ $key ][ 'margin' ]);
}
}
2023-12-13 15:20:53 +01:00
$newelementforplusmargin = explode ( ',' , getDolGlobalString ( 'PROJECT_ELEMENTS_FOR_PLUS_MARGIN' ));
2020-05-21 02:02:54 +02:00
foreach ( $newelementforplusmargin as $value ) {
2020-10-31 14:32:18 +01:00
$listofreferent [ trim ( $value )][ 'margin' ] = 'add' ;
2020-05-05 20:51:29 +02:00
}
}
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_ELEMENTS_FOR_MINUS_MARGIN' )) {
2020-05-21 02:02:54 +02:00
foreach ( $listofreferent as $key => $element ) {
2020-06-23 15:52:17 +02:00
if ( $listofreferent [ $key ][ 'margin' ] == 'minus' ) {
2020-05-05 20:51:29 +02:00
unset ( $listofreferent [ $key ][ 'margin' ]);
}
}
2023-12-13 15:20:53 +01:00
$newelementforminusmargin = explode ( ',' , getDolGlobalString ( 'PROJECT_ELEMENTS_FOR_MINUS_MARGIN' ));
2020-06-24 09:59:08 +02:00
foreach ( $newelementforminusmargin as $value ) {
2020-10-31 14:32:18 +01:00
$listofreferent [ trim ( $value )][ 'margin' ] = 'minus' ;
2020-05-05 20:51:29 +02:00
}
}
2024-03-19 22:15:29 +01:00
$parameters = array ( 'listofreferent' => $listofreferent );
2018-02-01 19:15:50 +01:00
$resHook = $hookmanager -> executeHooks ( 'completeListOfReferent' , $parameters , $object , $action );
2016-06-13 16:25:27 +02:00
2020-03-06 11:21:34 +01:00
if ( ! empty ( $hookmanager -> resArray )) {
2016-06-13 16:25:27 +02:00
$listofreferent = array_merge ( $listofreferent , $hookmanager -> resArray );
2024-07-01 12:56:24 +02:00
} elseif ( $resHook > 0 && ! empty ( $hookmanager -> resPrint )) {
$listofreferent = $hookmanager -> resPrint ;
2016-06-13 16:25:27 +02:00
}
2021-02-26 18:49:22 +01:00
if ( $action == " addelement " ) {
2013-04-29 11:54:29 +02:00
$tablename = GETPOST ( " tablename " );
2025-02-10 21:20:09 +01:00
$elementselectid = GETPOSTINT ( " elementselect " );
2020-03-06 11:21:34 +01:00
$result = $object -> update_element ( $tablename , $elementselectid );
2021-02-26 18:49:22 +01:00
if ( $result < 0 ) {
2015-12-17 14:14:44 +01:00
setEventMessages ( $object -> error , $object -> errors , 'errors' );
2013-06-13 18:11:23 +02:00
}
2021-02-26 18:49:22 +01:00
} elseif ( $action == " unlink " ) {
2019-09-27 12:36:15 +02:00
$tablename = GETPOST ( " tablename " , " aZ09 " );
2020-10-31 14:32:18 +01:00
$projectField = GETPOSTISSET ( 'projectfield' ) ? GETPOST ( 'projectfield' , 'aZ09' ) : 'fk_projet' ;
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
$elementselectid = GETPOSTINT ( " elementselect " );
2014-10-29 20:21:24 +01:00
2019-09-23 17:36:18 +02:00
$result = $object -> remove_element ( $tablename , $elementselectid , $projectField );
2021-02-26 18:49:22 +01:00
if ( $result < 0 ) {
2015-12-17 14:14:44 +01:00
setEventMessages ( $object -> error , $object -> errors , 'errors' );
2014-09-20 10:14:26 +02:00
}
2013-04-29 11:54:29 +02:00
}
2015-06-03 21:01:50 +02:00
$elementuser = new User ( $db );
2015-06-22 11:55:21 +02:00
2019-11-13 19:37:08 +01:00
$showdatefilter = 0 ;
2015-06-22 11:55:21 +02:00
// Show the filter on date on top of element list
2021-02-26 18:49:22 +01:00
if ( ! $showdatefilter ) {
2016-04-23 17:35:33 +02:00
print '<div class="center centpercent">' ;
2020-10-31 14:32:18 +01:00
print '<form action="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '" method="POST">' ;
print '<input type="hidden" name="token" value="' . newToken () . '">' ;
2023-01-31 21:17:06 +01:00
print '<input type="hidden" name="tablename" value="' . ( empty ( $tablename ) ? '' : $tablename ) . '">' ;
2015-06-22 11:55:21 +02:00
print '<input type="hidden" name="action" value="view">' ;
2020-10-13 10:51:51 +02:00
print '<div class="inline-block">' ;
2025-02-10 21:20:09 +01:00
print $form -> selectDate (( int ) $dates , 'dates' , 0 , 0 , 1 , '' , 1 , 0 , 0 , '' , '' , '' , '' , 1 , '' , $langs -> trans ( " From " ));
2020-10-13 10:51:51 +02:00
print '</div>' ;
print '<div class="inline-block">' ;
2025-02-10 21:20:09 +01:00
print $form -> selectDate (( int ) $datee , 'datee' , 0 , 0 , 1 , '' , 1 , 0 , 0 , '' , '' , '' , '' , 1 , '' , $langs -> trans ( " to " ));
2020-10-13 10:51:51 +02:00
print '</div>' ;
print '<div class="inline-block">' ;
2022-05-16 18:54:50 +02:00
print '<input type="submit" name="refresh" value="' . $langs -> trans ( " Refresh " ) . '" class="button small">' ;
2020-10-13 10:51:51 +02:00
print '</div>' ;
2015-06-22 11:55:21 +02:00
print '</form>' ;
2016-04-23 17:35:33 +02:00
print '</div>' ;
2016-08-10 11:34:10 +02:00
2015-06-22 11:55:21 +02:00
$showdatefilter ++ ;
}
// Show balance for whole project
2018-10-01 08:22:23 +02:00
$langs -> loadLangs ( array ( " suppliers " , " bills " , " orders " , " proposals " , " margins " ));
2022-09-25 06:05:35 +02:00
if ( isModEnabled ( 'stock' )) {
2021-02-26 18:49:22 +01:00
$langs -> load ( 'stocks' );
}
2015-06-22 11:55:21 +02:00
2016-04-09 22:54:13 +02:00
print load_fiche_titre ( $langs -> trans ( " Profit " ), '' , 'title_accountancy' );
2015-06-22 11:55:21 +02:00
2019-11-05 21:24:41 +01:00
print '<table class="noborder centpercent">' ;
2015-06-22 11:55:21 +02:00
print '<tr class="liste_titre">' ;
2020-06-08 17:00:58 +02:00
print '<td class="left" width="200">' ;
$tooltiponprofit = $langs -> trans ( " ProfitIsCalculatedWith " ) . " <br> \n " ;
$tooltiponprofitplus = $tooltiponprofitminus = '' ;
2021-02-26 18:49:22 +01:00
foreach ( $listofreferent as $key => $value ) {
2023-05-12 14:51:22 +02:00
if ( ! empty ( $value [ 'lang' ])) {
$langs -> load ( $value [ 'lang' ]);
}
2020-06-08 17:00:58 +02:00
$name = $langs -> trans ( $value [ 'name' ]);
$qualified = $value [ 'test' ];
2023-06-27 11:14:06 +02:00
$margin = empty ( $value [ 'margin' ]) ? '' : $value [ 'margin' ];
2021-02-26 18:49:22 +01:00
if ( $qualified && isset ( $margin )) { // If this element must be included into profit calculation ($margin is 'minus' or 'add')
2023-06-27 11:14:06 +02:00
if ( $margin === 'add' ) {
2020-10-31 14:32:18 +01:00
$tooltiponprofitplus .= ' > ' . $name . " (+)<br> \n " ;
2020-06-08 17:00:58 +02:00
}
2023-06-27 11:14:06 +02:00
if ( $margin === 'minus' ) {
2020-10-31 14:32:18 +01:00
$tooltiponprofitminus .= ' > ' . $name . " (-)<br> \n " ;
2020-06-08 17:00:58 +02:00
}
}
}
$tooltiponprofit .= $tooltiponprofitplus ;
$tooltiponprofit .= $tooltiponprofitminus ;
print $form -> textwithpicto ( $langs -> trans ( " Element " ), $tooltiponprofit );
print '</td>' ;
2019-02-23 22:24:26 +01:00
print '<td class="right" width="100">' . $langs -> trans ( " Number " ) . '</td>' ;
print '<td class="right" width="100">' . $langs -> trans ( " AmountHT " ) . '</td>' ;
print '<td class="right" width="100">' . $langs -> trans ( " AmountTTC " ) . '</td>' ;
2015-06-22 11:55:21 +02:00
print '</tr>' ;
2020-06-23 16:05:00 +02:00
$total_revenue_ht = 0 ;
2020-12-16 16:25:30 +01:00
$balance_ht = 0 ;
$balance_ttc = 0 ;
2020-06-23 16:05:00 +02:00
2023-02-15 17:57:19 +01:00
// Loop on each element type (proposal, sale order, invoices, ...)
2021-02-26 18:49:22 +01:00
foreach ( $listofreferent as $key => $value ) {
2020-12-16 16:25:30 +01:00
$parameters = array (
2024-03-19 22:15:29 +01:00
'total_revenue_ht' => & $total_revenue_ht ,
'balance_ht' => & $balance_ht ,
'balance_ttc' => & $balance_ttc ,
2020-12-16 16:25:30 +01:00
'key' => $key ,
2024-03-19 22:15:29 +01:00
'value' => & $value ,
2020-12-16 16:25:30 +01:00
'dates' => $dates ,
'datee' => $datee
);
$reshook = $hookmanager -> executeHooks ( 'printOverviewProfit' , $parameters , $object , $action ); // Note that $action and $object may have been modified by hook
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
2020-12-17 14:01:42 +01:00
} elseif ( $reshook > 0 ) {
2020-12-16 16:25:30 +01:00
print $hookmanager -> resPrint ;
continue ;
}
2020-03-06 11:21:34 +01:00
$name = $langs -> trans ( $value [ 'name' ]);
$title = $value [ 'title' ];
$classname = $value [ 'class' ];
$tablename = $value [ 'table' ];
$datefieldname = $value [ 'datefieldname' ];
$qualified = $value [ 'test' ];
2023-01-31 21:17:06 +01:00
$margin = empty ( $value [ 'margin' ]) ? 0 : $value [ 'margin' ];
$project_field = empty ( $value [ 'project_field' ]) ? '' : $value [ 'project_field' ];
2020-12-17 14:01:42 +01:00
if ( $qualified && isset ( $margin )) { // If this element must be included into profit calculation ($margin is 'minus' or 'add')
2015-06-22 11:55:21 +02:00
$element = new $classname ( $db );
2020-03-06 14:52:29 +01:00
$elementarray = $object -> get_element_list ( $key , $tablename , $datefieldname , $dates , $datee , ! empty ( $project_field ) ? $project_field : 'fk_projet' );
2016-11-16 09:38:13 +01:00
2020-12-17 14:01:42 +01:00
if ( is_array ( $elementarray ) && count ( $elementarray ) > 0 ) {
2015-06-22 11:55:21 +02:00
$total_ht = 0 ;
$total_ttc = 0 ;
2023-02-15 17:57:19 +01:00
// Loop on each object for the current element type
2020-03-06 11:21:34 +01:00
$num = count ( $elementarray );
2020-12-17 14:01:42 +01:00
for ( $i = 0 ; $i < $num ; $i ++ ) {
2020-03-06 11:21:34 +01:00
$tmp = explode ( '_' , $elementarray [ $i ]);
2025-02-10 21:20:09 +01:00
$idofelement = ( int ) $tmp [ 0 ];
$idofelementuser = ! empty ( $tmp [ 1 ]) ? ( int ) $tmp [ 1 ] : 0 ;
2015-06-22 11:55:21 +02:00
$element -> fetch ( $idofelement );
2021-02-26 18:49:22 +01:00
if ( $idofelementuser ) {
$elementuser -> fetch ( $idofelementuser );
}
2015-06-22 11:55:21 +02:00
2019-03-18 10:16:08 +01:00
// Define if record must be used for total or not
2020-03-06 11:21:34 +01:00
$qualifiedfortotal = true ;
2020-12-17 14:01:42 +01:00
if ( $key == 'invoice' ) {
2021-02-26 18:49:22 +01:00
if ( ! empty ( $element -> close_code ) && $element -> close_code == 'replaced' ) {
$qualifiedfortotal = false ; // Replacement invoice, do not include into total
}
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'FACTURE_DEPOSITS_ARE_JUST_PAYMENTS' ) && $element -> type == Facture :: TYPE_DEPOSIT ) {
2021-02-26 18:49:22 +01:00
$qualifiedfortotal = false ; // If hidden option to use deposits as payment (deprecated, not recommended to use this), deposits are not included
}
2019-03-18 09:08:53 +01:00
}
2020-12-17 14:01:42 +01:00
if ( $key == 'propal' ) {
2021-02-26 18:49:22 +01:00
if ( $element -> status != Propal :: STATUS_SIGNED && $element -> status != Propal :: STATUS_BILLED ) {
$qualifiedfortotal = false ; // Only signed proposal must not be included in total
}
2019-03-18 09:08:53 +01:00
}
2021-02-26 18:49:22 +01:00
if ( $tablename != 'expensereport_det' && method_exists ( $element , 'fetch_thirdparty' )) {
$element -> fetch_thirdparty ();
}
2019-03-18 09:08:53 +01:00
// Define $total_ht_by_line
2021-10-30 21:17:15 +02:00
if ( $tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force ChargeSociales|PaymentVarious|Salary $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> amount ;
} elseif ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Fichinter $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> getAmount ();
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> price * abs ( $element -> qty );
} elseif ( $tablename == 'projet_task' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Task $element' ;
$tmp = $element -> getSumOfAmount ( $idofelementuser ? $elementuser : '' , ( string ) $dates , ( string ) $datee );
2023-07-07 16:16:55 +02:00
$total_ht_by_line = price2num ( $tmp [ 'amount' ], 'MT' );
2020-05-21 15:05:19 +02:00
} elseif ( $key == 'loan' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Loan $element' ;
2020-10-31 14:32:18 +01:00
if (( empty ( $dates ) && empty ( $datee )) || ( intval ( $dates ) <= $element -> datestart && intval ( $datee ) >= $element -> dateend )) {
// Get total loan
$total_ht_by_line = - $element -> capital ;
} else {
// Get loan schedule according to date filter
$total_ht_by_line = 0 ;
$loanScheduleStatic = new LoanSchedule ( $element -> db );
$loanScheduleStatic -> fetchAll ( $element -> id );
if ( ! empty ( $loanScheduleStatic -> lines )) {
foreach ( $loanScheduleStatic -> lines as $loanSchedule ) {
/**
2025-02-08 14:06:14 +01:00
* @ var LoanSchedule $loanSchedule
2020-10-31 14:32:18 +01:00
*/
if (( $loanSchedule -> datep >= $dates && $loanSchedule -> datep <= $datee ) // dates filter is defined
|| ! empty ( $dates ) && empty ( $datee ) && $loanSchedule -> datep >= $dates && $loanSchedule -> datep <= dol_now ()
|| empty ( $dates ) && ! empty ( $datee ) && $loanSchedule -> datep <= $datee
2024-03-19 22:15:29 +01:00
) {
2023-12-04 13:49:31 +01:00
$total_ht_by_line -= $loanSchedule -> amount_capital ;
2020-10-31 14:32:18 +01:00
}
}
}
}
2021-02-26 18:49:22 +01:00
} else {
$total_ht_by_line = $element -> total_ht ;
}
2015-06-22 11:55:21 +02:00
2019-03-18 09:08:53 +01:00
// Define $total_ttc_by_line
2021-10-30 21:17:15 +02:00
if ( $tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force ChargeSociales|PaymentVarious|Salary $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> amount ;
} elseif ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Fichinter $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> getAmount ();
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> price * abs ( $element -> qty );
} elseif ( $tablename == 'projet_task' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Task $element' ;
2015-06-22 11:55:21 +02:00
$defaultvat = get_default_tva ( $mysoc , $mysoc );
2023-10-18 21:05:21 +02:00
$reg = array ();
if ( preg_replace ( '/^(\d+\.)\s\(.*\)/' , $defaultvat , $reg )) {
2024-09-29 21:52:31 +02:00
// @phan-suppress-next-line PhanTypeInvalidDimOffset
2023-10-18 21:05:21 +02:00
$defaultvat = $reg [ 1 ];
}
$total_ttc_by_line = price2num ( $total_ht_by_line * ( 1 + (( float ) $defaultvat / 100 )), 'MT' );
2020-12-17 14:01:42 +01:00
} elseif ( $key == 'loan' ) {
2023-02-15 17:57:19 +01:00
$total_ttc_by_line = $total_ht_by_line ; // For loan there is actually no taxe managed in Dolibarr
2021-02-26 18:49:22 +01:00
} else {
$total_ttc_by_line = $element -> total_ttc ;
}
2015-06-22 11:55:21 +02:00
2024-11-22 13:25:25 +01:00
// Change sign of $total_ht_by_line and $total_ttc_by_line for various payments
2020-12-17 14:01:42 +01:00
if ( $tablename == 'payment_various' ) {
2020-12-17 14:05:04 +01:00
if ( $element -> sens == 1 ) {
2020-10-31 14:32:18 +01:00
$total_ht_by_line = - $total_ht_by_line ;
$total_ttc_by_line = - $total_ttc_by_line ;
}
2019-03-18 10:16:08 +01:00
}
2024-11-22 13:25:25 +01:00
// Change sign of $total_ht_by_line and $total_ttc_by_line for supplier proposal and supplier order
if ( $tablename == 'commande_fournisseur' || $tablename == 'supplier_proposal' ) {
$total_ht_by_line = - $total_ht_by_line ;
$total_ttc_by_line = - $total_ttc_by_line ;
}
2019-03-18 09:08:53 +01:00
// Add total if we have to
2021-10-25 22:07:31 +02:00
if ( $qualifiedfortotal ) {
2024-08-07 02:53:45 +02:00
$total_ht += $total_ht_by_line ;
$total_ttc += $total_ttc_by_line ;
2019-03-18 09:08:53 +01:00
}
2015-06-22 11:55:21 +02:00
}
2017-10-06 15:48:48 +02:00
// Each element with at least one line is output
2015-06-22 11:55:21 +02:00
// Calculate margin
2023-02-15 17:57:19 +01:00
if ( $margin ) {
if ( $margin === 'add' ) {
2020-06-23 16:05:00 +02:00
$total_revenue_ht += $total_ht ;
}
2023-02-15 17:57:19 +01:00
if ( $margin === " minus " ) { // Revert sign
2017-10-06 15:48:48 +02:00
$total_ht = - $total_ht ;
$total_ttc = - $total_ttc ;
}
2019-03-18 10:16:08 +01:00
$balance_ht += $total_ht ;
$balance_ttc += $total_ttc ;
2015-06-22 11:55:21 +02:00
}
2017-04-14 11:22:48 +02:00
print '<tr class="oddeven">' ;
2015-06-22 11:55:21 +02:00
// Module
2019-01-21 10:04:43 +01:00
print '<td class="left">' . $name . '</td>' ;
2015-06-22 11:55:21 +02:00
// Nb
2019-02-23 22:24:26 +01:00
print '<td class="right">' . $i . '</td>' ;
2015-06-22 11:55:21 +02:00
// Amount HT
2019-02-23 22:24:26 +01:00
print '<td class="right">' ;
2023-02-15 18:23:02 +01:00
if ( $key == 'intervention' && ! $margin ) {
2021-02-26 18:49:22 +01:00
print '<span class="opacitymedium">' . $form -> textwithpicto ( $langs -> trans ( " NA " ), $langs -> trans ( " AmountOfInteventionNotIncludedByDefault " )) . '</span>' ;
} else {
if ( $key == 'propal' ) {
print '<span class="opacitymedium">' . $form -> textwithpicto ( '' , $langs -> trans ( " SignedOnly " )) . '</span>' ;
}
2023-02-15 17:57:19 +01:00
print price ( $total_ht );
2020-06-24 12:58:10 +02:00
}
2017-10-06 15:48:48 +02:00
print '</td>' ;
2015-06-22 11:55:21 +02:00
// Amount TTC
2019-02-23 22:24:26 +01:00
print '<td class="right">' ;
2023-02-15 18:23:02 +01:00
if ( $key == 'intervention' && ! $margin ) {
2021-02-26 18:49:22 +01:00
print '<span class="opacitymedium">' . $form -> textwithpicto ( $langs -> trans ( " NA " ), $langs -> trans ( " AmountOfInteventionNotIncludedByDefault " )) . '</span>' ;
} else {
if ( $key == 'propal' ) {
print '<span class="opacitymedium">' . $form -> textwithpicto ( '' , $langs -> trans ( " SignedOnly " )) . '</span>' ;
}
2023-02-15 17:57:19 +01:00
print price ( $total_ttc );
2020-06-24 12:58:10 +02:00
}
2017-10-06 15:48:48 +02:00
print '</td>' ;
2015-06-22 11:55:21 +02:00
print '</tr>' ;
}
}
}
// and the final balance
print '<tr class="liste_total">' ;
2020-06-23 16:05:00 +02:00
print '<td class="right" colspan="2">' . $langs -> trans ( " Profit " ) . '</td>' ;
print '<td class="right">' . price ( price2num ( $balance_ht , 'MT' )) . '</td>' ;
print '<td class="right">' . price ( price2num ( $balance_ttc , 'MT' )) . '</td>' ;
2015-06-22 11:55:21 +02:00
print '</tr>' ;
2024-03-27 19:06:06 +01:00
// and the cost per attendee
if ( $object -> usage_organize_event ) {
require_once DOL_DOCUMENT_ROOT . '/eventorganization/class/conferenceorboothattendee.class.php' ;
$conforboothattendee = new ConferenceOrBoothAttendee ( $db );
$result = $conforboothattendee -> fetchAll ( '' , '' , 0 , 0 , '(t.fk_project:=:' . (( int ) $object -> id ) . ') AND (t.status:=:' . ConferenceOrBoothAttendee :: STATUS_VALIDATED . ')' );
if ( ! is_array ( $result ) && $result < 0 ) {
setEventMessages ( $conforboothattendee -> error , $conforboothattendee -> errors , 'errors' );
} else {
$nbAttendees = count ( $result );
}
if ( $nbAttendees >= 2 ) {
$costperattendee_ht = $balance_ht / $nbAttendees ;
$costperattendee_ttc = $balance_ttc / $nbAttendees ;
print '<tr class="liste_total">' ;
print '<td class="right" colspan="2">' . $langs -> trans ( " ProfitPerValidatedAttendee " ) . '</td>' ;
print '<td class="right">' . price ( price2num ( $costperattendee_ht , 'MT' )) . '</td>' ;
print '<td class="right">' . price ( price2num ( $costperattendee_ttc , 'MT' )) . '</td>' ;
print '</tr>' ;
}
}
2020-06-23 16:05:00 +02:00
// and the margin (profit / revenues)
if ( $total_revenue_ht ) {
print '<tr class="liste_total">' ;
print '<td class="right" colspan="2">' . $langs -> trans ( " Margin " ) . '</td>' ;
2020-06-23 16:08:31 +02:00
print '<td class="right">' . round ( 100 * $balance_ht / $total_revenue_ht , 1 ) . '%</td>' ;
2020-06-23 16:05:00 +02:00
print '<td class="right"></td>' ;
print '</tr>' ;
}
2015-06-22 11:55:21 +02:00
print " </table> " ;
print '<br><br>' ;
print '<br>' ;
2020-03-06 14:52:29 +01:00
2023-12-04 18:44:17 +01:00
$total_time = 0 ;
2015-06-22 11:55:21 +02:00
// Detail
2021-02-26 18:49:22 +01:00
foreach ( $listofreferent as $key => $value ) {
2020-12-16 16:25:30 +01:00
$parameters = array (
'key' => $key ,
2024-03-19 22:15:29 +01:00
'value' => & $value ,
2020-12-16 16:25:30 +01:00
'dates' => $dates ,
'datee' => $datee
);
$reshook = $hookmanager -> executeHooks ( 'printOverviewDetail' , $parameters , $object , $action ); // Note that $action and $object may have been modified by hook
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
2020-12-17 14:01:42 +01:00
} elseif ( $reshook > 0 ) {
2020-12-16 16:25:30 +01:00
print $hookmanager -> resPrint ;
continue ;
}
2019-11-13 19:37:08 +01:00
$title = $value [ 'title' ];
$classname = $value [ 'class' ];
$tablename = $value [ 'table' ];
$datefieldname = $value [ 'datefieldname' ];
$qualified = $value [ 'test' ];
2023-01-31 21:17:06 +01:00
$urlnew = empty ( $value [ 'urlnew' ]) ? '' : $value [ 'urlnew' ];
$buttonnew = empty ( $value [ 'buttonnew' ]) ? '' : $value [ 'buttonnew' ];
$testnew = empty ( $value [ 'testnew' ]) ? '' : $value [ 'testnew' ];
$project_field = empty ( $value [ 'project_field' ]) ? '' : $value [ 'project_field' ];
2023-04-27 18:00:53 +02:00
$nototal = empty ( $value [ 'nototal' ]) ? 0 : 1 ;
2016-08-10 11:34:10 +02:00
2018-08-27 10:17:18 +02:00
$exclude_select_element = array ( 'payment_various' );
2021-02-26 18:49:22 +01:00
if ( ! empty ( $value [ 'exclude_select_element' ])) {
$exclude_select_element [] = $value [ 'exclude_select_element' ];
}
2018-08-27 10:17:18 +02:00
2025-02-10 21:20:09 +01:00
if ( $qualified && $tablename !== null ) {
2015-06-03 21:01:50 +02:00
// If we want the project task array to have details of users
//if ($key == 'project_task') $key = 'project_task_time';
2016-08-10 11:34:10 +02:00
2015-02-02 21:12:43 +01:00
$element = new $classname ( $db );
2020-03-06 11:21:34 +01:00
$addform = '' ;
2015-06-30 01:34:17 +02:00
2020-03-06 11:21:34 +01:00
$idtofilterthirdparty = 0 ;
2016-12-22 16:52:03 +01:00
$array_of_element_linkable_with_different_thirdparty = array ( 'facture_fourn' , 'commande_fournisseur' );
2021-02-26 18:49:22 +01:00
if ( ! in_array ( $tablename , $array_of_element_linkable_with_different_thirdparty )) {
2023-06-08 10:35:06 +02:00
$idtofilterthirdparty = empty ( $object -> thirdparty -> id ) ? 0 : $object -> thirdparty -> id ;
2023-11-27 11:56:32 +01:00
if ( getDolGlobalString ( 'PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS' )) {
2023-10-15 18:39:13 +02:00
$idtofilterthirdparty .= ',' . getDolGlobalString ( 'PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS' );
2021-02-26 18:49:22 +01:00
}
2016-12-22 16:52:03 +01:00
}
2015-06-30 01:34:17 +02:00
2021-11-18 21:26:35 +01:00
$elementarray = $object -> get_element_list ( $key , $tablename , $datefieldname , $dates , $datee , ! empty ( $project_field ) ? $project_field : 'fk_projet' );
2023-11-27 11:56:32 +01:00
if ( ! getDolGlobalString ( 'PROJECT_LINK_ON_OVERWIEW_DISABLED' ) && $idtofilterthirdparty && ! in_array ( $tablename , $exclude_select_element )) {
2022-01-01 18:15:22 +01:00
$selectList = $formproject -> select_element ( $tablename , $idtofilterthirdparty , 'minwidth300 minwidth75imp' , - 2 , empty ( $project_field ) ? 'fk_projet' : $project_field , $langs -> trans ( " SelectElement " ));
2024-10-13 17:17:37 +02:00
if (( int ) $selectList < 0 ) { // cast to int because ''<0 is true.
2019-01-27 11:55:16 +01:00
setEventMessages ( $formproject -> error , $formproject -> errors , 'errors' );
2021-02-26 18:49:22 +01:00
} elseif ( $selectList ) {
2015-11-25 18:58:47 +01:00
// Define form with the combo list of elements to link
2020-10-31 14:32:18 +01:00
$addform .= '<div class="inline-block valignmiddle">' ;
$addform .= '<form action="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '" method="post">' ;
$addform .= '<input type="hidden" name="token" value="' . newToken () . '">' ;
$addform .= '<input type="hidden" name="tablename" value="' . $tablename . '">' ;
2020-03-06 11:25:02 +01:00
$addform .= '<input type="hidden" name="action" value="addelement">' ;
$addform .= '<input type="hidden" name="datesrfc" value="' . dol_print_date ( $dates , 'dayhourrfc' ) . '">' ;
$addform .= '<input type="hidden" name="dateerfc" value="' . dol_print_date ( $datee , 'dayhourrfc' ) . '">' ;
2022-01-01 18:15:22 +01:00
$addform .= '<table><tr>' ;
//$addform .= '<td><span class="hideonsmartphone opacitymedium">'.$langs->trans("SelectElement").'</span></td>';
2020-03-06 11:25:02 +01:00
$addform .= '<td>' . $selectList . '</td>' ;
2022-01-01 18:15:22 +01:00
$addform .= '<td><input type="submit" class="button button-linkto smallpaddingimp" value="' . dol_escape_htmltag ( $langs -> trans ( " LinkToElementShort " )) . '"></td>' ;
2020-03-06 11:25:02 +01:00
$addform .= '</tr></table>' ;
$addform .= '</form>' ;
$addform .= '</div>' ;
2015-11-25 18:58:47 +01:00
}
2013-04-29 11:54:29 +02:00
}
2023-11-27 11:56:32 +01:00
if ( ! getDolGlobalString ( 'PROJECT_CREATE_ON_OVERVIEW_DISABLED' ) && $urlnew ) {
2020-03-06 11:21:34 +01:00
$addform .= '<div class="inline-block valignmiddle">' ;
2021-02-26 18:49:22 +01:00
if ( $testnew ) {
2022-01-01 18:15:22 +01:00
$addform .= '<a class="buttonxxx marginleftonly" href="' . $urlnew . '" title="' . dol_escape_htmltag ( $langs -> trans ( $buttonnew )) . '"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>' ;
2023-11-27 11:56:32 +01:00
} elseif ( ! getDolGlobalString ( 'MAIN_BUTTON_HIDE_UNAUTHORIZED' )) {
2022-01-01 18:15:22 +01:00
$addform .= '<span title="' . dol_escape_htmltag ( $langs -> trans ( $buttonnew )) . '"><a class="buttonxxx marginleftonly buttonRefused" disabled="disabled" href="#"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a></span>' ;
2017-03-13 20:17:31 +01:00
}
2020-10-31 14:32:18 +01:00
$addform .= '<div>' ;
2016-04-04 15:20:21 +02:00
}
2022-03-25 15:35:49 +01:00
if ( is_array ( $elementarray ) && count ( $elementarray ) > 0 && $key == " order_supplier " ) {
2021-11-18 21:26:35 +01:00
$addform = ' < div class = " inline-block valignmiddle " >< a id = " btnShow " class = " buttonxxx marginleftonly " href = " # " onClick = " return false; " >
< span id = " textBtnShow " class = " valignmiddle text-plus-circle hideonsmartphone " > '.$langs->trans("CanceledShown").' </ span >< span id = " minus-circle " class = " fa fa-eye valignmiddle paddingleft " ></ span >
2021-10-23 23:12:23 +02:00
</ a >
< script >
$ ( " #btnShow " ) . on ( " click " , function () {
2021-11-18 21:26:35 +01:00
console . log ( " We click to show or hide the canceled lines " );
var attr = $ ( this ) . attr ( " data-canceledarehidden " );
if ( typeof attr !== " undefined " && attr !== false ) {
console . log ( " Show canceled " );
$ ( " .tr_canceled " ) . show ();
2022-03-25 15:35:49 +01:00
$ ( " #textBtnShow " ) . text ( " '.dol_escape_js( $langs->transnoentitiesnoconv ( " CanceledShown " )).' " );
2021-11-18 21:26:35 +01:00
$ ( " #btnShow " ) . removeAttr ( " data-canceledarehidden " );
2021-10-23 23:12:23 +02:00
$ ( " #minus-circle " ) . removeClass ( " fa-eye-slash " ) . addClass ( " fa-eye " );
2021-11-18 21:26:35 +01:00
} else {
console . log ( " Hide canceled " );
$ ( " .tr_canceled " ) . hide ();
2022-03-25 15:35:49 +01:00
$ ( " #textBtnShow " ) . text ( " '.dol_escape_js( $langs->transnoentitiesnoconv ( " CanceledHidden " )).' " );
2021-11-18 21:26:35 +01:00
$ ( " #btnShow " ) . attr ( " data-canceledarehidden " , 1 );
$ ( " #minus-circle " ) . removeClass ( " fa-eye " ) . addClass ( " fa-eye-slash " );
2021-10-23 23:12:23 +02:00
}
});
2021-11-18 21:26:35 +01:00
</ script ></ div > ' . $addform ;
2021-10-23 23:12:23 +02:00
}
2016-08-10 11:34:10 +02:00
2015-09-24 18:33:48 +02:00
print load_fiche_titre ( $langs -> trans ( $title ), $addform , '' );
2015-06-22 11:55:21 +02:00
2016-09-23 10:32:19 +02:00
print " \n " . '<!-- Table for tablename = ' . $tablename . ' -->' . " \n " ;
2020-07-06 10:59:23 +02:00
print '<div class="div-table-responsive">' ;
2019-11-05 21:24:41 +01:00
print '<table class="noborder centpercent">' ;
2014-08-21 23:43:11 +02:00
2008-04-19 19:26:41 +02:00
print '<tr class="liste_titre">' ;
2017-09-21 11:54:37 +02:00
// Remove link column
2015-02-21 15:18:05 +01:00
print '<td style="width: 24px"></td>' ;
2020-03-06 14:52:29 +01:00
// Ref
print '<td' . (( $tablename != 'actioncomm' && $tablename != 'projet_task' ) ? ' style="width: 200px"' : '' ) . '>' . $langs -> trans ( " Ref " ) . '</td>' ;
2024-04-09 20:19:38 +02:00
// Product and qty on stock_movement
if ( 'MouvementStock' == $classname ) {
print '<td style="width: 200px">' . $langs -> trans ( " Product " ) . '</td>' ;
print '<td style="width: 50px">' . $langs -> trans ( " Qty " ) . '</td>' ;
}
2020-03-06 14:52:29 +01:00
// Date
print '<td' . (( $tablename != 'actioncomm' && $tablename != 'projet_task' ) ? ' style="width: 200px"' : '' ) . ' class="center">' ;
2021-02-26 18:49:22 +01:00
if ( in_array ( $tablename , array ( 'projet_task' ))) {
print $langs -> trans ( " TimeSpent " );
}
if ( ! in_array ( $tablename , array ( 'projet_task' ))) {
print $langs -> trans ( " Date " );
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
// Thirdparty or user
print '<td>' ;
2021-02-26 18:49:22 +01:00
if ( in_array ( $tablename , array ( 'projet_task' )) && $key == 'project_task' ) {
print '' ; // if $key == 'project_task', we don't want details per user
} elseif ( in_array ( $tablename , array ( 'payment_various' ))) {
2024-07-23 19:29:43 +02:00
print $langs -> trans ( " Label " ); // complementary info about the payment
2021-10-30 21:17:15 +02:00
} elseif ( in_array ( $tablename , array ( 'expensereport_det' , 'don' , 'projet_task' , 'stock_mouvement' , 'salary' ))) {
2021-02-26 18:49:22 +01:00
print $langs -> trans ( " User " );
} else {
print $langs -> trans ( " ThirdParty " );
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
2020-10-31 14:32:18 +01:00
// Duration of intervention
2021-02-26 18:49:22 +01:00
if ( $tablename == 'fichinter' ) {
2020-03-06 14:52:29 +01:00
print '<td>' ;
print $langs -> trans ( " TotalDuration " );
$total_duration = 0 ;
print '</td>' ;
}
// Amount HT
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("AmountHT").'</td>';
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("Amount").'</td>';
2021-02-26 18:49:22 +01:00
if ( $key == 'loan' ) {
print '<td class="right" width="120">' . $langs -> trans ( " LoanCapital " ) . '</td>' ;
} elseif ( empty ( $value [ 'disableamount' ])) {
print '<td class="right" width="120">' . $langs -> trans ( " AmountHT " ) . '</td>' ;
} else {
print '<td width="120"></td>' ;
}
2020-03-06 14:52:29 +01:00
// Amount TTC
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("AmountTTC").'</td>';
2021-02-26 18:49:22 +01:00
if ( $key == 'loan' ) {
print '<td class="right" width="120">' . $langs -> trans ( " RemainderToPay " ) . '</td>' ;
} elseif ( empty ( $value [ 'disableamount' ])) {
print '<td class="right" width="120">' . $langs -> trans ( " AmountTTC " ) . '</td>' ;
} else {
print '<td width="120"></td>' ;
}
2020-03-06 14:52:29 +01:00
// Status
2021-02-26 18:49:22 +01:00
if ( in_array ( $tablename , array ( 'projet_task' ))) {
print '<td class="right" width="200">' . $langs -> trans ( " ProgressDeclared " ) . '</td>' ;
} else {
print '<td class="right" width="200">' . $langs -> trans ( " Status " ) . '</td>' ;
}
2008-04-19 19:34:24 +02:00
print '</tr>' ;
2015-06-03 21:01:50 +02:00
2021-02-26 18:49:22 +01:00
if ( is_array ( $elementarray ) && count ( $elementarray ) > 0 ) {
2011-04-15 01:24:34 +02:00
$total_ht = 0 ;
$total_ttc = 0 ;
2015-01-22 21:31:00 +01:00
$total_ht_by_third = 0 ;
$total_ttc_by_third = 0 ;
2015-02-02 21:12:43 +01:00
$saved_third_id = 0 ;
$breakline = '' ;
2021-02-26 18:49:22 +01:00
if ( canApplySubtotalOn ( $tablename )) {
2019-10-20 11:59:21 +02:00
// Sort
$elementarray = sortElementsByClientName ( $elementarray );
2015-01-22 21:31:00 +01:00
}
2019-11-13 19:37:08 +01:00
$num = count ( $elementarray );
2024-12-03 08:39:34 +01:00
$total_time = 0 ;
2021-02-26 18:49:22 +01:00
for ( $i = 0 ; $i < $num ; $i ++ ) {
2019-11-13 19:37:08 +01:00
$tmp = explode ( '_' , $elementarray [ $i ]);
2025-02-10 21:20:09 +01:00
$idofelement = ( int ) $tmp [ 0 ];
$idofelementuser = isset ( $tmp [ 1 ]) ? ( int ) $tmp [ 1 ] : 0 ;
2020-03-06 11:45:35 +01:00
2015-06-03 21:01:50 +02:00
$element -> fetch ( $idofelement );
2021-02-26 18:49:22 +01:00
if ( $idofelementuser ) {
$elementuser -> fetch ( $idofelementuser );
}
2015-02-21 15:18:05 +01:00
2016-11-08 11:23:40 +01:00
// Special cases
2021-02-26 18:49:22 +01:00
if ( $tablename != 'expensereport_det' ) {
if ( method_exists ( $element , 'fetch_thirdparty' )) {
$element -> fetch_thirdparty ();
}
2020-05-21 15:05:19 +02:00
} else {
2019-11-13 19:37:08 +01:00
$expensereport = new ExpenseReport ( $db );
2015-02-21 15:18:05 +01:00
$expensereport -> fetch ( $element -> fk_expensereport );
}
2020-03-06 11:45:35 +01:00
2019-03-18 10:16:08 +01:00
//print 'xxx'.$tablename.'yyy'.$classname;
2020-03-06 11:45:35 +01:00
2021-02-26 18:49:22 +01:00
if ( $breakline && $saved_third_id != $element -> thirdparty -> id ) {
2015-02-02 21:12:43 +01:00
print $breakline ;
2020-03-06 11:45:35 +01:00
2015-02-02 21:12:43 +01:00
$saved_third_id = $element -> thirdparty -> id ;
$breakline = '' ;
2020-03-06 11:45:35 +01:00
2019-11-13 19:37:08 +01:00
$total_ht_by_third = 0 ;
$total_ttc_by_third = 0 ;
2023-06-08 10:35:06 +02:00
}
2023-06-07 20:53:46 +02:00
2023-06-08 10:35:06 +02:00
$saved_third_id = empty ( $element -> thirdparty -> id ) ? 0 : $element -> thirdparty -> id ;
2020-03-06 11:45:35 +01:00
2019-11-13 19:37:08 +01:00
$qualifiedfortotal = true ;
2021-02-26 18:49:22 +01:00
if ( $key == 'invoice' ) {
if ( ! empty ( $element -> close_code ) && $element -> close_code == 'replaced' ) {
$qualifiedfortotal = false ; // Replacement invoice, do not include into total
}
2021-11-18 21:26:35 +01:00
} elseif ( $key == 'order_supplier' && $element -> status == 7 ) {
2021-10-23 23:12:23 +02:00
$qualifiedfortotal = false ; // It makes no sense to include canceled orders in the total
}
2021-11-18 21:26:35 +01:00
if ( $key == " order_supplier " && $element -> status == 7 ) {
print '<tr class="oddeven tr_canceled" style=display:none>' ;
2021-10-23 23:12:23 +02:00
} else {
print '<tr class="oddeven" >' ;
2014-06-24 15:37:10 +02:00
}
2020-03-06 11:45:35 +01:00
2020-03-06 14:52:29 +01:00
// Remove link
print '<td style="width: 24px">' ;
2021-02-26 18:49:22 +01:00
if ( $tablename != 'projet_task' && $tablename != 'stock_mouvement' ) {
2024-01-12 17:55:52 +01:00
if ( ! getDolGlobalString ( 'PROJECT_DISABLE_UNLINK_FROM_OVERVIEW' ) || $user -> admin ) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by default, so this test true
2020-03-06 14:52:29 +01:00
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element -> id . ( $project_field ? '&projectfield=' . $project_field : '' ) . '" class="reposition">' ;
print img_picto ( $langs -> trans ( 'Unlink' ), 'unlink' );
print '</a>' ;
}
}
print " </td> \n " ;
2014-08-21 23:43:11 +02:00
2010-01-05 00:33:23 +01:00
// Ref
2024-11-26 09:42:32 +01:00
print '<td class="left nowraponall">' ;
2021-02-26 18:49:22 +01:00
if ( $tablename == 'expensereport_det' ) {
2020-03-06 14:52:29 +01:00
print $expensereport -> getNomUrl ( 1 );
2020-05-21 15:05:19 +02:00
} else {
2024-11-28 13:59:07 +01:00
print '<table><tr><td style="border-bottom: none;">' ;
2018-08-01 07:46:17 +02:00
// Show ref with link
2021-02-26 18:49:22 +01:00
if ( $element instanceof Task ) {
2020-03-06 14:52:29 +01:00
print $element -> getNomUrl ( 1 , 'withproject' , 'time' );
print ' - ' . dol_trunc ( $element -> label , 48 );
2020-05-21 15:05:19 +02:00
} elseif ( $key == 'loan' ) {
2020-10-31 14:32:18 +01:00
print $element -> getNomUrl ( 1 );
print ' - ' . dol_trunc ( $element -> label , 48 );
2021-02-26 18:49:22 +01:00
} else {
print $element -> getNomUrl ( 1 );
}
2016-11-16 09:38:13 +01:00
2015-02-24 18:20:19 +01:00
$element_doc = $element -> element ;
2019-11-13 19:37:08 +01:00
$filename = dol_sanitizeFileName ( $element -> ref );
2023-06-08 10:35:06 +02:00
if ( ! empty ( $conf -> $element_doc )) {
$confelementdoc = $conf -> $element_doc ;
$filedir = $confelementdoc -> multidir_output [ $element -> entity ] . '/' . dol_sanitizeFileName ( $element -> ref );
} else {
$filedir = '' ;
}
2015-03-02 02:14:18 +01:00
2016-11-08 11:23:40 +01:00
if ( $element_doc === 'order_supplier' ) {
2019-11-13 19:37:08 +01:00
$element_doc = 'commande_fournisseur' ;
2018-10-29 12:30:36 +01:00
$filedir = $conf -> fournisseur -> commande -> multidir_output [ $element -> entity ] . '/' . dol_sanitizeFileName ( $element -> ref );
2020-05-21 15:05:19 +02:00
} elseif ( $element_doc === 'invoice_supplier' ) {
2019-11-13 19:37:08 +01:00
$element_doc = 'facture_fournisseur' ;
2024-07-13 18:13:32 +02:00
$filename = get_exdir ( $element -> id , 2 , 0 , 0 , $element , 'invoice_supplier' ) . dol_sanitizeFileName ( $element -> ref );
$filedir = $conf -> fournisseur -> facture -> multidir_output [ $element -> entity ] . '/' . $filename ;
2015-02-24 18:20:19 +01:00
}
2015-03-02 02:14:18 +01:00
2023-06-08 10:35:06 +02:00
print '<div class="inline-block valignmiddle">' ;
if ( $filedir ) {
print $formfile -> getDocumentsLink ( $element_doc , $filename , $filedir );
}
print '</div>' ;
2016-11-16 09:38:13 +01:00
2024-11-28 13:59:07 +01:00
print '</td>' ;
print '<td class="tdoverflowmax250" style="border-bottom: none;">' ;
2016-11-08 11:23:40 +01:00
// Show supplier ref
2021-02-26 18:49:22 +01:00
if ( ! empty ( $element -> ref_supplier )) {
print ' - ' . $element -> ref_supplier ;
}
2016-11-08 11:23:40 +01:00
// Show customer ref
2021-02-26 18:49:22 +01:00
if ( ! empty ( $element -> ref_customer )) {
print ' - ' . $element -> ref_customer ;
}
2023-04-20 19:55:31 +02:00
// Compatibility propale
2023-04-20 20:23:40 +02:00
if ( empty ( $element -> ref_customer ) && ! empty ( $element -> ref_client )) {
2023-04-20 19:55:31 +02:00
print ' - ' . $element -> ref_client ;
}
2024-11-28 13:59:07 +01:00
print '</td></tr></table>' ;
2015-03-02 02:14:18 +01:00
}
2020-03-06 14:52:29 +01:00
print " </td> \n " ;
2024-04-09 20:19:38 +02:00
// Product and qty on stock movement
if ( 'MouvementStock' == $classname ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2024-04-09 20:19:38 +02:00
$mvsProd = new Product ( $element -> db );
$mvsProd -> fetch ( $element -> product_id );
print '<td>' . $mvsProd -> getNomUrl ( 1 ) . '</td>' ;
print '<td>' . $element -> qty . '</td>' ;
}
2017-01-02 12:17:27 +01:00
// Date or TimeSpent
2023-12-04 13:49:31 +01:00
$date = '' ;
2025-02-10 21:20:09 +01:00
$total_time_by_line = 0 ;
2021-02-26 18:49:22 +01:00
if ( $tablename == 'expensereport_det' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force ExpenseReportLine $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> date ; // No draft status on lines
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> datem ;
2021-10-30 21:17:15 +02:00
} elseif ( $tablename == 'salary' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Salary $element' ;
2021-10-30 21:17:15 +02:00
$date = $element -> datesp ;
2021-02-26 18:49:22 +01:00
} elseif ( $tablename == 'payment_various' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force PaymentVarious $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> datev ;
} elseif ( $tablename == 'chargesociales' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force ChargeSociales $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> date_ech ;
} elseif ( ! empty ( $element -> status ) || ! empty ( $element -> statut ) || ! empty ( $element -> fk_status )) {
if ( $tablename == 'don' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Don $element' ;
$date = $element -> date ;
2021-02-26 18:49:22 +01:00
}
if ( $tablename == 'commande_fournisseur' || $tablename == 'supplier_order' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force CommandeFournisseur $element' ;
2020-10-31 14:32:18 +01:00
$date = ( $element -> date_commande ? $element -> date_commande : $element -> date_valid );
2021-02-26 18:49:22 +01:00
} elseif ( $tablename == 'supplier_proposal' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force SupplierProposal $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> date_validation ; // There is no other date for this
} elseif ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Fichinter $element' ;
2021-02-26 18:49:22 +01:00
$date = $element -> datev ; // There is no other date for this
} elseif ( $tablename == 'projet_task' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Task $element' ;
2021-02-26 18:49:22 +01:00
$date = '' ; // We show no date. Showing date of beginning of task make user think it is date of time consumed
} else {
2020-10-31 14:32:18 +01:00
$date = $element -> date ; // invoice, ...
2021-02-26 18:49:22 +01:00
if ( empty ( $date )) {
$date = $element -> date_contrat ;
}
if ( empty ( $date )) {
$date = $element -> datev ;
}
2020-10-31 14:32:18 +01:00
if ( empty ( $date ) && ! empty ( $datefieldname )) {
2025-02-10 21:20:09 +01:00
// @phan-suppress-next-line PhanUndeclaredProperty
2020-10-31 14:32:18 +01:00
$date = $element -> $datefieldname ;
}
}
2020-05-21 15:05:19 +02:00
} elseif ( $key == 'loan' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Loan $element' ;
2020-10-31 14:32:18 +01:00
$date = $element -> datestart ;
2016-09-22 18:47:31 +02:00
}
2020-02-02 06:36:06 +01:00
2020-03-06 14:52:29 +01:00
print '<td class="center">' ;
2021-02-26 18:49:22 +01:00
if ( $tablename == 'actioncomm' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force ActionComm $element' ;
2020-10-31 14:32:18 +01:00
print dol_print_date ( $element -> datep , 'dayhour' );
2021-02-26 18:49:22 +01:00
if ( $element -> datef && $element -> datef > $element -> datep ) {
print " - " . dol_print_date ( $element -> datef , 'dayhour' );
}
} elseif ( in_array ( $tablename , array ( 'projet_task' ))) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Task $element' ;
$tmpprojtime = $element -> getSumOfAmount ( $idofelementuser ? $elementuser : '' , ( string ) $dates , ( string ) $datee ); // $element is a task. $elementuser may be empty
2020-10-31 14:32:18 +01:00
print '<a href="' . DOL_URL_ROOT . '/projet/tasks/time.php?id=' . $idofelement . '&withproject=1">' ;
print convertSecondToTime ( $tmpprojtime [ 'nbseconds' ], 'allhourmin' );
print '</a>' ;
$total_time_by_line = $tmpprojtime [ 'nbseconds' ];
2021-02-26 18:49:22 +01:00
} else {
print dol_print_date ( $date , 'day' );
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
2010-01-05 00:33:23 +01:00
2015-02-21 15:18:05 +01:00
// Third party or user
2024-03-27 17:58:35 +01:00
print '<td class="tdoverflowmax150">' ;
2020-10-31 14:32:18 +01:00
if ( is_object ( $element -> thirdparty )) {
print $element -> thirdparty -> getNomUrl ( 1 , '' , 48 );
} elseif ( $tablename == 'expensereport_det' ) {
$tmpuser = new User ( $db );
$tmpuser -> fetch ( $expensereport -> fk_user_author );
print $tmpuser -> getNomUrl ( 1 , '' , 48 );
2021-10-30 21:17:15 +02:00
} elseif ( $tablename == 'salary' ) {
2019-11-13 19:37:08 +01:00
$tmpuser = new User ( $db );
2018-08-01 07:46:17 +02:00
$tmpuser -> fetch ( $element -> fk_user );
2020-03-06 14:52:29 +01:00
print $tmpuser -> getNomUrl ( 1 , '' , 48 );
2021-02-26 18:49:22 +01:00
} elseif ( $tablename == 'don' || $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Don|MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
if ( $element -> fk_user_author > 0 ) {
2020-10-31 14:32:18 +01:00
$tmpuser2 = new User ( $db );
$tmpuser2 -> fetch ( $element -> fk_user_author );
print $tmpuser2 -> getNomUrl ( 1 , '' , 48 );
}
2023-03-08 11:00:58 +01:00
} elseif ( $tablename == 'projet_task' && $key == 'element_time' ) { // if $key == 'project_task', we don't want details per user
2020-10-31 14:32:18 +01:00
print $elementuser -> getNomUrl ( 1 );
2024-07-23 19:29:43 +02:00
} elseif ( $tablename == 'payment_various' ) { // payment label
2025-02-10 21:20:09 +01:00
'@phan-var-force PaymentVarious $element' ;
2024-07-23 19:29:43 +02:00
print $element -> label ;
2018-07-31 07:45:03 +02:00
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
// Add duration and store it in counter for fichinter
2021-02-26 18:49:22 +01:00
if ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force FichInter $element' ;
2020-03-06 14:52:29 +01:00
print '<td>' ;
print convertSecondToTime ( $element -> duration , 'all' , $conf -> global -> MAIN_DURATION_OF_WORKDAY );
$total_duration += $element -> duration ;
print '</td>' ;
2020-01-28 19:33:01 +01:00
}
2020-01-28 19:28:09 +01:00
2020-10-31 14:32:18 +01:00
// Amount without tax
2019-11-13 19:37:08 +01:00
$warning = '' ;
2021-02-26 18:49:22 +01:00
if ( empty ( $value [ 'disableamount' ])) {
2020-10-31 14:32:18 +01:00
$total_ht_by_line = null ;
$othermessage = '' ;
2021-10-30 21:17:15 +02:00
if ( $tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Don|ChargeSociales|PaymentVarious|Salary $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> amount ;
} elseif ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force FichInter $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> getAmount ();
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> price * abs ( $element -> qty );
} elseif ( in_array ( $tablename , array ( 'projet_task' ))) {
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'salaries' )) {
2020-10-31 14:32:18 +01:00
// TODO Permission to read daily rate to show value
$total_ht_by_line = price2num ( $tmpprojtime [ 'amount' ], 'MT' );
2021-02-26 18:49:22 +01:00
if ( $tmpprojtime [ 'nblinesnull' ] > 0 ) {
2020-10-31 14:32:18 +01:00
$langs -> load ( " errors " );
$warning = $langs -> trans ( " WarningSomeLinesWithNullHourlyRate " , $conf -> currency );
}
} else {
$othermessage = $form -> textwithpicto ( $langs -> trans ( " NotAvailable " ), $langs -> trans ( " ModuleSalaryToDefineHourlyRateMustBeEnabled " ));
}
2021-02-26 18:49:22 +01:00
} elseif ( $key == 'loan' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Loan $element' ;
2021-02-26 18:49:22 +01:00
$total_ht_by_line = $element -> capital ;
} else {
2019-11-13 19:37:08 +01:00
$total_ht_by_line = $element -> total_ht ;
2015-04-02 06:36:32 +02:00
}
2019-03-18 10:16:08 +01:00
// Change sign of $total_ht_by_line and $total_ttc_by_line for some cases
2021-02-26 18:49:22 +01:00
if ( $tablename == 'payment_various' ) {
if ( $element -> sens == 0 ) {
2020-10-31 14:32:18 +01:00
$total_ht_by_line = - $total_ht_by_line ;
}
2019-03-18 10:16:08 +01:00
}
2020-03-06 14:52:29 +01:00
print '<td class="right">' ;
2021-02-26 18:49:22 +01:00
if ( $othermessage ) {
2024-06-29 13:56:21 +02:00
print '<span class="opacitymedium">' . $othermessage . '</span>' ;
2021-02-26 18:49:22 +01:00
}
if ( isset ( $total_ht_by_line )) {
if ( ! $qualifiedfortotal ) {
print '<strike>' ;
}
2022-01-01 18:15:22 +01:00
print '<span class="amount">' . price ( $total_ht_by_line ) . '</span>' ;
2021-02-26 18:49:22 +01:00
if ( ! $qualifiedfortotal ) {
print '</strike>' ;
}
}
if ( $warning ) {
print ' ' . img_warning ( $warning );
2016-12-03 15:54:06 +01:00
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
2021-02-26 18:49:22 +01:00
} else {
print '<td></td>' ;
}
2010-01-05 00:33:23 +01:00
2020-10-31 14:32:18 +01:00
// Amount inc tax
2021-02-26 18:49:22 +01:00
if ( empty ( $value [ 'disableamount' ])) {
2020-10-31 14:32:18 +01:00
$total_ttc_by_line = null ;
2021-10-30 21:17:15 +02:00
if ( $tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Don|ChargeSociales|PaymentVarious $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> amount ;
} elseif ( $tablename == 'fichinter' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Fichinter $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> getAmount ();
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> price * abs ( $element -> qty );
} elseif ( $tablename == 'projet_task' ) {
2023-06-27 21:31:36 +02:00
if ( isModEnabled ( 'salaries' )) {
2020-10-31 14:32:18 +01:00
// TODO Permission to read daily rate
$defaultvat = get_default_tva ( $mysoc , $mysoc );
$total_ttc_by_line = price2num ( $total_ht_by_line * ( 1 + ( $defaultvat / 100 )), 'MT' );
} else {
$othermessage = $form -> textwithpicto ( $langs -> trans ( " NotAvailable " ), $langs -> trans ( " ModuleSalaryToDefineHourlyRateMustBeEnabled " ));
}
2021-02-26 18:49:22 +01:00
} elseif ( $key == 'loan' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force Loan $element' ;
2021-02-26 18:49:22 +01:00
$total_ttc_by_line = $element -> capital - $element -> getSumPayment ();
} else {
2019-11-13 19:37:08 +01:00
$total_ttc_by_line = $element -> total_ttc ;
2015-04-02 06:36:32 +02:00
}
2019-03-18 10:16:08 +01:00
// Change sign of $total_ht_by_line and $total_ttc_by_line for some cases
2021-02-26 18:49:22 +01:00
if ( $tablename == 'payment_various' ) {
if ( $element -> sens == 0 ) {
2020-10-31 14:32:18 +01:00
$total_ttc_by_line = - $total_ttc_by_line ;
}
2019-03-18 10:16:08 +01:00
}
2020-03-06 14:52:29 +01:00
print '<td class="right">' ;
2021-02-26 18:49:22 +01:00
if ( $othermessage ) {
print $othermessage ;
}
if ( isset ( $total_ttc_by_line )) {
if ( ! $qualifiedfortotal ) {
print '<strike>' ;
}
2022-01-01 18:15:22 +01:00
print '<span class="amount">' . price ( $total_ttc_by_line ) . '</span>' ;
2021-02-26 18:49:22 +01:00
if ( ! $qualifiedfortotal ) {
print '</strike>' ;
}
}
if ( $warning ) {
print ' ' . img_warning ( $warning );
2016-12-03 15:54:06 +01:00
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
2021-02-26 18:49:22 +01:00
} else {
print '<td></td>' ;
}
2012-02-04 18:34:52 +01:00
2010-01-05 00:33:23 +01:00
// Status
2020-03-06 14:52:29 +01:00
print '<td class="right">' ;
2021-02-26 18:49:22 +01:00
if ( $tablename == 'expensereport_det' ) {
2020-03-06 14:52:29 +01:00
print $expensereport -> getLibStatut ( 5 );
2021-02-26 18:49:22 +01:00
} elseif ( $element instanceof CommonInvoice ) {
2015-04-12 20:59:58 +02:00
//This applies for Facture and FactureFournisseur
2020-03-06 14:52:29 +01:00
print $element -> getLibStatut ( 5 , $element -> getSommePaiement ());
2021-02-26 18:49:22 +01:00
} elseif ( $element instanceof Task ) {
if ( $element -> progress != '' ) {
2020-03-06 14:52:29 +01:00
print $element -> progress . ' %' ;
2015-06-03 21:01:50 +02:00
}
2021-02-26 18:49:22 +01:00
} elseif ( $tablename == 'stock_mouvement' ) {
2025-02-10 21:20:09 +01:00
'@phan-var-force MouvementStock $element' ;
2020-03-06 14:52:29 +01:00
print $element -> getLibStatut ( 3 );
2020-05-21 15:05:19 +02:00
} else {
2020-03-06 14:52:29 +01:00
print $element -> getLibStatut ( 5 );
2015-04-12 20:59:58 +02:00
}
2020-03-06 14:52:29 +01:00
print '</td>' ;
print '</tr>' ;
2008-04-19 19:26:41 +02:00
2021-02-26 18:49:22 +01:00
if ( $qualifiedfortotal ) {
2024-08-07 02:53:45 +02:00
$total_ht += $total_ht_by_line ;
$total_ttc += $total_ttc_by_line ;
2015-01-22 21:31:00 +01:00
2015-04-02 06:36:32 +02:00
$total_ht_by_third += $total_ht_by_line ;
$total_ttc_by_third += $total_ttc_by_line ;
2017-07-29 00:28:41 +02:00
2023-12-04 13:49:31 +01:00
if ( ! isset ( $total_time )) {
$total_time = $total_time_by_line ;
} else {
$total_time += $total_time_by_line ;
}
2015-01-22 21:31:00 +01:00
}
2021-02-26 18:49:22 +01:00
if ( canApplySubtotalOn ( $tablename )) {
2020-03-06 14:52:29 +01:00
$breakline = '<tr class="liste_total liste_sub_total">' ;
$breakline .= '<td colspan="2">' ;
$breakline .= '</td>' ;
$breakline .= '<td>' ;
$breakline .= '</td>' ;
$breakline .= '<td class="right">' ;
$breakline .= $langs -> trans ( 'SubTotal' ) . ' : ' ;
2021-02-26 18:49:22 +01:00
if ( is_object ( $element -> thirdparty )) {
$breakline .= $element -> thirdparty -> getNomUrl ( 0 , '' , 48 );
}
2020-03-06 14:52:29 +01:00
$breakline .= '</td>' ;
$breakline .= '<td class="right">' . price ( $total_ht_by_third ) . '</td>' ;
$breakline .= '<td class="right">' . price ( $total_ttc_by_third ) . '</td>' ;
$breakline .= '<td></td>' ;
$breakline .= '</tr>' ;
2014-06-24 15:37:10 +02:00
}
2015-02-02 21:33:09 +01:00
2020-03-06 14:52:29 +01:00
//var_dump($element->thirdparty->name.' - '.$saved_third_id.' - '.$element->thirdparty->id);
2020-03-05 14:16:56 +01:00
}
2021-02-26 18:49:22 +01:00
if ( $breakline ) {
print $breakline ;
}
2015-02-02 21:12:43 +01:00
2016-12-03 15:54:06 +01:00
// Total
2023-04-27 18:00:53 +02:00
if ( empty ( $nototal )) {
$colspan = 4 ;
if ( in_array ( $tablename , array ( 'projet_task' ))) {
$colspan = 2 ;
}
2022-01-01 18:15:22 +01:00
2023-04-27 18:00:53 +02:00
print '<tr class="liste_total"><td colspan="' . $colspan . '">' . $langs -> trans ( " Number " ) . ': ' . $i . '</td>' ;
if ( in_array ( $tablename , array ( 'projet_task' ))) {
print '<td class="center">' ;
2025-02-10 21:20:09 +01:00
print convertSecondToTime (( int ) $total_time , 'allhourmin' );
2023-04-27 18:00:53 +02:00
print '</td>' ;
print '<td>' ;
print '</td>' ;
2021-02-26 18:49:22 +01:00
}
2023-04-27 18:00:53 +02:00
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>';
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>';
2023-06-08 10:35:06 +02:00
// If fichinter add the total_duration
2023-04-27 18:00:53 +02:00
if ( $tablename == 'fichinter' ) {
print '<td class="left">' . convertSecondToTime ( $total_duration , 'all' , $conf -> global -> MAIN_DURATION_OF_WORKDAY ) . '</td>' ;
}
print '<td class="right">' ;
if ( empty ( $value [ 'disableamount' ])) {
if ( $key == 'loan' ) {
print $langs -> trans ( " Total " ) . ' ' . $langs -> trans ( " LoanCapital " ) . ' : ' . price ( $total_ttc );
2023-06-27 21:31:36 +02:00
} elseif ( $tablename != 'projet_task' || isModEnabled ( 'salaries' )) {
2023-04-27 18:00:53 +02:00
print '' . $langs -> trans ( " TotalHT " ) . ' : ' . price ( $total_ht );
}
2021-02-26 18:49:22 +01:00
}
2023-04-27 18:00:53 +02:00
print '</td>' ;
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
//elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100"></td>';
print '<td class="right">' ;
if ( empty ( $value [ 'disableamount' ])) {
if ( $key == 'loan' ) {
print $langs -> trans ( " Total " ) . ' ' . $langs -> trans ( " RemainderToPay " ) . ' : ' . price ( $total_ttc );
2023-06-27 21:31:36 +02:00
} elseif ( $tablename != 'projet_task' || isModEnabled ( 'salaries' )) {
2023-04-27 18:00:53 +02:00
print $langs -> trans ( " TotalTTC " ) . ' : ' . price ( $total_ttc );
}
}
print '</td>' ;
print '<td> </td>' ;
print '</tr>' ;
2016-12-03 15:54:06 +01:00
}
2020-05-21 15:05:19 +02:00
} else {
2021-02-26 18:49:22 +01:00
if ( ! is_array ( $elementarray )) { // error
2022-01-01 18:15:22 +01:00
print '<tr><td>' . $elementarray . '</td></tr>' ;
} else {
$colspan = 7 ;
if ( $tablename == 'fichinter' ) {
$colspan ++ ;
}
print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs -> trans ( " None " ) . '</td></tr>' ;
2018-03-13 15:29:52 +01:00
}
2014-10-29 20:21:24 +01:00
}
2009-08-12 14:59:14 +02:00
print " </table> " ;
2020-07-06 10:59:23 +02:00
print '</div>' ;
2015-06-30 01:34:17 +02:00
print " <br> \n " ;
2008-04-19 19:26:41 +02:00
}
}
2015-06-29 16:57:32 +02:00
// Enhance with select2
2021-02-26 18:49:22 +01:00
if ( $conf -> use_javascript_ajax ) {
2019-11-13 19:37:08 +01:00
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php' ;
2015-06-29 16:57:32 +02:00
$comboenhancement = ajax_combobox ( '.elementselect' );
print $comboenhancement ;
}
2018-08-15 12:48:13 +02:00
// End of page
2011-08-27 16:24:16 +02:00
llxFooter ();
2012-02-04 18:34:52 +01:00
$db -> close ();
2015-01-22 21:31:00 +01:00
/**
* Return if we should do a group by customer with sub - total
*
* @ param string $tablename Name of table
* @ return boolean True to tell to make a group by sub - total
*/
function canApplySubtotalOn ( $tablename )
{
global $conf ;
2023-11-27 11:56:32 +01:00
if ( ! getDolGlobalString ( 'PROJECT_ADD_SUBTOTAL_LINES' )) {
2021-02-26 18:49:22 +01:00
return false ;
}
2015-01-22 21:31:00 +01:00
return in_array ( $tablename , array ( 'facture_fourn' , 'commande_fournisseur' ));
}
/**
2015-01-23 02:11:10 +01:00
* sortElementsByClientName
2015-01-22 21:31:00 +01:00
*
2025-02-10 21:20:09 +01:00
* @ param array < int , string > $elementarray Element array
* @ return array < int , string > Element array sorted
2015-01-22 21:31:00 +01:00
*/
2015-01-23 02:11:10 +01:00
function sortElementsByClientName ( $elementarray )
{
global $db , $classname ;
2024-10-06 13:03:43 +02:00
'@phan-var-force string $classname' ;
2015-01-22 21:31:00 +01:00
2015-01-23 02:11:10 +01:00
$element = new $classname ( $db );
2024-10-06 13:03:43 +02:00
'@phan-var-force CommonObject $element' ;
2015-01-22 21:31:00 +01:00
2015-01-23 02:11:10 +01:00
$clientname = array ();
2021-02-26 18:49:22 +01:00
foreach ( $elementarray as $key => $id ) { // id = id of object
if ( empty ( $clientname [ $id ])) {
2015-02-02 21:12:43 +01:00
$element -> fetch ( $id );
2015-01-23 02:11:10 +01:00
$element -> fetch_thirdparty ();
2015-02-02 21:12:43 +01:00
2015-01-23 02:11:10 +01:00
$clientname [ $id ] = $element -> thirdparty -> name ;
}
}
2015-01-22 21:31:00 +01:00
2015-02-02 21:12:43 +01:00
//var_dump($clientname);
2019-11-13 19:37:08 +01:00
asort ( $clientname ); // sort on name
2015-01-23 02:11:10 +01:00
$elementarray = array ();
2021-02-26 18:49:22 +01:00
foreach ( $clientname as $id => $name ) {
2015-01-23 02:11:10 +01:00
$elementarray [] = $id ;
}
2015-01-22 21:31:00 +01:00
2015-01-23 02:11:10 +01:00
return $elementarray ;
2023-07-09 13:48:34 +02:00
}