Wrong default function parameters in display_type. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Fri, 29 Mar 2024 08:08:25 +0000 (09:08 +0100)
committerJoe <joe.hunt.consulting@gmail.com>
Fri, 29 Mar 2024 08:08:25 +0000 (09:08 +0100)
gl/inquiry/profit_loss.php

index 801fb6aa0495efcd60cfc504e82d5ab3703d723a..91a2c2751dc5921435c2aa6cb0ac3f6722f37831 100644 (file)
@@ -55,9 +55,9 @@ if (isset($_GET["AccGrp"]))
 //----------------------------------------------------------------------------------------------------
 
 function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $convert,
-       $dimension=0, $dimension2=0, $drilldown, $path_to_root)
+       $dimension, $dimension2, $drilldown)
 {
-       global $levelptr, $k;
+       global $path_to_root, $levelptr, $k;
                
        $code_per_balance = 0;
        $code_acc_balance = 0;
@@ -106,7 +106,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co
        while ($accounttype=db_fetch($result))
        {       
                $totals_arr = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, 
-                       $compare, $convert, $dimension, $dimension2, $drilldown, $path_to_root);
+                       $compare, $convert, $dimension, $dimension2, $drilldown);
                $per_balance_total += $totals_arr[0];
                $acc_balance_total += $totals_arr[1];
        }
@@ -261,8 +261,8 @@ function display_profit_and_loss($compare)
                        $k = 0; // row color
                        while ($accounttype=db_fetch($typeresult))
                        {
-                               $TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, 
-                                       $dimension, $dimension2, $drilldown, $path_to_root);
+                               $TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, 
+                                       $compare, $convert, $dimension, $dimension2, $drilldown);
                                $class_per_total += $TypeTotal[0];
                                $class_acc_total += $TypeTotal[1];      
 
@@ -317,8 +317,8 @@ function display_profit_and_loss($compare)
                table_section_title($_POST["AccGrp"] . " " . get_account_type_name($_POST["AccGrp"]),4);        
                echo $tableheader;
                
-               $classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, 
-                       $dimension, $dimension2, $drilldown, $path_to_root);
+               $classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, 
+                       $compare, $convert, $dimension, $dimension2, $drilldown);
                
        }