31function subtotals_completesubstitutionarray_lines(&$substitutionarray, $langs,
$object, $line)
33 if (defined(
'SUBTOTALS_SPECIAL_CODE') && property_exists(
$object,
'ALLOWED_TYPES') && (in_array(
$object->element, $object::$ALLOWED_TYPES))) {
34 $substitutionarray[
'is_subtotals_line'] = ($line->special_code == constant(
'SUBTOTALS_SPECIAL_CODE'));
35 $substitutionarray[
'is_not_subtotals_line'] = !$substitutionarray[
'is_subtotals_line'];
36 $substitutionarray[
'is_subtotals_title'] = (($line->special_code == constant(
'SUBTOTALS_SPECIAL_CODE')) && $line->qty > 0);
37 $substitutionarray[
'is_subtotals_subtotal'] = (($line->special_code == constant(
'SUBTOTALS_SPECIAL_CODE')) && $line->qty < 0);
39 $subtotal_total_value =
$object->getSubtotalLineAmountValue($line, $usemulticurrency);
40 $substitutionarray[
'subtotals_total'] = ($subtotal_total_value == 0) ?
"" :
price($subtotal_total_value);
41 $substitutionarray[
'subtotals_level'] = abs($line->qty);
43 $substitutionarray[
'is_subtotals_line'] =
false;
44 $substitutionarray[
'is_not_subtotals_line'] =
true;
45 $substitutionarray[
'is_subtotals_title'] =
false;
46 $substitutionarray[
'is_subtotals_subtotal'] =
false;
47 $substitutionarray[
'subtotals_total'] = 0;
48 $substitutionarray[
'subtotals_level'] = 0;
if(! $sortfield) if(! $sortorder) $object
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
isModEnabled($module)
Is Dolibarr module enabled.