Debug v17
This commit is contained in:
parent
f7f140f003
commit
f4476b905c
@ -339,7 +339,25 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = strtr($formula, $vars);
|
$result = strtr($formula, $vars);
|
||||||
|
$result = str_replace('--', '+', $result);
|
||||||
|
|
||||||
|
if (preg_match('/[a-z]/i', $result)) {
|
||||||
|
$r = 'Error bad formula: '.$result;
|
||||||
|
$rshort = 'Err';
|
||||||
|
print '<td class="liste_total right"><span class="amount" title="'.dol_escape_htmltag($r).'">'.$rshort.'</span></td>';
|
||||||
|
print '<td class="liste_total right"><span class="amount" title="'.dol_escape_htmltag($r).'">'.$rshort.'</span></td>';
|
||||||
|
// Detail by month
|
||||||
|
foreach ($months as $k => $v) {
|
||||||
|
if (($k + 1) >= $date_startmonth) {
|
||||||
|
print '<td class="liste_total right"><span class="amount" title="'.dol_escape_htmltag($r).'">'.$rshort.'</span></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($months as $k => $v) {
|
||||||
|
if (($k + 1) < $date_startmonth) {
|
||||||
|
print '<td class="liste_total right"><span class="amount" title="'.dol_escape_htmltag($r).'">'.$rshort.'</span></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
//var_dump($result);
|
//var_dump($result);
|
||||||
//$r = $AccCat->calculate($result);
|
//$r = $AccCat->calculate($result);
|
||||||
$r = dol_eval($result, 1, 1, '1');
|
$r = dol_eval($result, 1, 1, '1');
|
||||||
@ -381,6 +399,8 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
$sommes[$code]['M'][$k] += $r;
|
$sommes[$code]['M'][$k] += $r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($months as $k => $v) {
|
foreach ($months as $k => $v) {
|
||||||
if (($k + 1) < $date_startmonth) {
|
if (($k + 1) < $date_startmonth) {
|
||||||
foreach ($sommes as $code => $det) {
|
foreach ($sommes as $code => $det) {
|
||||||
@ -395,6 +415,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
$sommes[$code]['M'][$k] += $r;
|
$sommes[$code]['M'][$k] += $r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user