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

This commit is contained in:
Laurent Destailleur 2023-02-17 16:17:06 +01:00
commit cfd9e7ed62
4 changed files with 23 additions and 6 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>
@ -132,7 +132,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

@ -334,6 +334,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'];
}
@ -341,8 +344,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>';
@ -361,6 +367,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;
@ -375,6 +384,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;
@ -389,6 +401,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;
@ -417,8 +432,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

View File

@ -63,6 +63,7 @@ class CMailFile
public $atleastonefile;
public $msg;
public $eol;
public $eol2;

View File

@ -367,7 +367,7 @@ if ($search_login) {
$sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_login);
}
if ($search_montant_ht) {
$sql .= natural_search('sp.total_ht=', $search_montant_ht, 1);
$sql .= natural_search('sp.total_ht', $search_montant_ht, 1);
}
if ($search_montant_vat != '') {
$sql .= natural_search("sp.total_tva", $search_montant_vat, 1);