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

This commit is contained in:
Laurent Destailleur 2023-02-17 16:15:58 +01:00
commit 481edd95fd
2 changed files with 21 additions and 5 deletions

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2023 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
@ -131,7 +131,6 @@ $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown
// Security check
if (!empty($user->socid)) {
$socid = $user->socid;
$object->id = $user->socid;
}
restrictedArea($user, 'propal', $object->id);

View File

@ -333,6 +333,9 @@ if ($modecompta == 'CREANCES-DETTES') {
// Previous Fiscal year (N-1)
foreach ($sommes as $code => $det) {
if (is_null($det['NP'])) {
$det['NP'] = 0;
}
$vars[$code] = $det['NP'];
}
@ -340,8 +343,11 @@ if ($modecompta == 'CREANCES-DETTES') {
//var_dump($result);
//$r = $AccCat->calculate($result);
$r = dol_eval($result, 1, 1, '1');
//var_dump($r);
if (is_nan($r)) {
$r = 0;
}
print '<td class="liste_total right"><span class="amount">'.price($r).'</span></td>';
@ -360,6 +366,9 @@ if ($modecompta == 'CREANCES-DETTES') {
//$r = $AccCat->calculate($result);
$r = dol_eval($result, 1, 1, 1);
if (is_nan($r)) {
$r = 0;
}
print '<td class="liste_total right"><span class="amount">'.price($r).'</span></td>';
$sommes[$code]['N'] += $r;
@ -374,6 +383,9 @@ if ($modecompta == 'CREANCES-DETTES') {
//$r = $AccCat->calculate($result);
$r = dol_eval($result, 1, 1, 1);
if (is_nan($r)) {
$r = 0;
}
print '<td class="liste_total right"><span class="amount">'.price($r).'</span></td>';
$sommes[$code]['M'][$k] += $r;
@ -388,6 +400,9 @@ if ($modecompta == 'CREANCES-DETTES') {
//$r = $AccCat->calculate($result);
$r = dol_eval($result, 1, 1, 1);
if (is_nan($r)) {
$r = 0;
}
print '<td class="liste_total right"><span class="amount">'.price($r).'</span></td>';
$sommes[$code]['M'][$k] += $r;
@ -416,8 +431,10 @@ if ($modecompta == 'CREANCES-DETTES') {
$arrayofaccountforfilter = array();
foreach ($cpts as $i => $cpt) { // Loop on each account.
$arrayofaccountforfilter[] = $cpt['account_number'];
foreach ($cpts as $i => $cpt) {// Loop on each account.
if (!empty($cpt['account_number'])) {
$arrayofaccountforfilter[] = $cpt['account_number'];
}
}
// N-1