forked from Wavyzz/dolibarr
Fix warning
This commit is contained in:
@@ -63,7 +63,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) {
|
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key])) {
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
// we keep position for the first line
|
// we keep position for the first line
|
||||||
$totalarray['totalizable'][$key]['pos'] = $totalarray['nbfield'];
|
$totalarray['totalizable'][$key]['pos'] = $totalarray['nbfield'];
|
||||||
@@ -75,7 +75,7 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
|||||||
$totalarray['totalizable'][$key]['total'] += $obj->$tmpkey;
|
$totalarray['totalizable'][$key]['total'] += $obj->$tmpkey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// key 'totalizable' if in extrafields same as 'isameasure' into ->$fields
|
// The key 'totalizable' on extrafields, is the same as 'isameasure' into ->fields
|
||||||
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) && $extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key] == 1) {
|
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) && $extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key] == 1) {
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = $extrafieldsobjectprefix.$tmpkey;
|
$totalarray['pos'][$totalarray['nbfield']] = $extrafieldsobjectprefix.$tmpkey;
|
||||||
@@ -83,6 +83,10 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
|||||||
if (!isset($totalarray['val'])) {
|
if (!isset($totalarray['val'])) {
|
||||||
$totalarray['val'] = array();
|
$totalarray['val'] = array();
|
||||||
}
|
}
|
||||||
|
if (!isset($totalarray['val'][$extrafieldsobjectprefix.$tmpkey])) {
|
||||||
|
$totalarray['val'][$extrafieldsobjectprefix.$tmpkey] = 0;
|
||||||
|
}
|
||||||
|
if (isset($obj->$tmpkey) && is_numeric($obj->$tmpkey)) {
|
||||||
if (!isset($totalarray['val'][$extrafieldsobjectprefix.$tmpkey])) {
|
if (!isset($totalarray['val'][$extrafieldsobjectprefix.$tmpkey])) {
|
||||||
$totalarray['val'][$extrafieldsobjectprefix.$tmpkey] = 0;
|
$totalarray['val'][$extrafieldsobjectprefix.$tmpkey] = 0;
|
||||||
}
|
}
|
||||||
@@ -91,4 +95,5 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user