From 1558112e554f91f9ba21bb9da5161ec401893fd6 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 5 Nov 2024 15:10:27 +0100 Subject: [PATCH] Fix phan (#31690) * Fix phan * Fix phan * Fix phan * Fix copyright * Fix phan * Fix phan --------- Co-authored-by: Laurent Destailleur --- htdocs/compta/resultat/projects.php | 70 ++++++++++++++++++----------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/htdocs/compta/resultat/projects.php b/htdocs/compta/resultat/projects.php index cd1086a0fc1..d001c8610bb 100644 --- a/htdocs/compta/resultat/projects.php +++ b/htdocs/compta/resultat/projects.php @@ -1,16 +1,16 @@ - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Dourseanud - * Copyright (C) 2014-2106 Ferran Marcet - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2018 Frédéric France - * Copyright (C) 2020 Maxime DEMAREST - * Copyright (C) 2021 Alexandre Spangaro - * Copyright (C) 2024 Yoan Mollard +/* Copyright (C) 2002-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2014-2016 Ferran Marcet + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Maxime DEMAREST + * Copyright (C) 2021-2024 Alexandre Spangaro + * Copyright (C) 2024 Yoan Mollard * * 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 @@ -51,6 +51,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; * @var Translate $langs * @var User $user */ + // Load translation files required by the page $langs->loadLangs(array('compta', 'bills', 'donation', 'salaries', 'accountancy', 'loan')); @@ -62,6 +63,8 @@ $date_endday = GETPOSTINT('date_endday'); $date_endyear = GETPOSTINT('date_endyear'); $showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ? GETPOST('showaccountdetail', 'aZ09') : 'yes'; +$search_project_ref = GETPOST('search_project_ref', 'alpha'); + $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); @@ -146,7 +149,8 @@ $nbofyear = ($year_end - $year_start) + 1; // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = getDolGlobalString('ACCOUNTING_MODE'); if (isModEnabled('accounting')) { - $modecompta = 'BOOKKEEPING'; + // $modecompta = 'BOOKKEEPING'; + $modecompta = 'CREANCES-DETTES'; } if (GETPOST("modecompta", 'alpha')) { $modecompta = GETPOST("modecompta", 'alpha'); @@ -182,11 +186,11 @@ $exportlink = ''; $total_ht = 0; $total_ttc = 0; -$builddate = ''; -$name = ''; -$period = ''; +$name = $langs->trans("ReportInOut").', '.$langs->trans("ByProjects"); +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); +$builddate = dol_now(); -// Affiche en-tete de rapport +// Display report header if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByProjects"); $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -211,10 +215,12 @@ if ($modecompta == "CREANCES-DETTES") { // Define $calcmode line $calcmode = ''; +/* if (isModEnabled('accounting')) { $calcmode .= ''; $calcmode .= '
'; } +*/ $calcmode .= '