12function subtotals_completesubstitutionarray_lines(&$substitutionarray, $langs,
$object, $line)
17 if (defined(
'SUBTOTALS_SPECIAL_CODE')) {
18 $substitutionarray[
'is_subtotals_line'] = ($line->special_code == SUBTOTALS_SPECIAL_CODE);
19 $substitutionarray[
'is_not_subtotals_line'] = !$substitutionarray[
'is_subtotals_line'];
20 $substitutionarray[
'is_subtotals_title'] = (($line->special_code == SUBTOTALS_SPECIAL_CODE) && $line->qty > 0);
21 $substitutionarray[
'is_subtotals_subtotal'] = (($line->special_code == SUBTOTALS_SPECIAL_CODE) && $line->qty < 0);
23 if (isModEnabled(
'multicurrency') &&
$object->multicurrency_code !=
$conf->currency) {
24 $subtotal_total =
$object->getSubtotalLineMulticurrencyAmount($line);
26 $subtotal_total =
$object->getSubtotalLineAmount($line);
28 $substitutionarray[
'subtotals_total'] = ($subtotal_total == 0) ?
"" : $subtotal_total;
29 $substitutionarray[
'subtotals_level'] = abs($line->qty);
31 $substitutionarray[
'is_subtotals_line'] =
false;
32 $substitutionarray[
'is_not_subtotals_line'] =
true;
33 $substitutionarray[
'is_subtotals_title'] =
false;
34 $substitutionarray[
'is_subtotals_subtotal'] =
false;
35 $substitutionarray[
'subtotals_total'] = 0;
36 $substitutionarray[
'subtotals_level'] = 0;
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...