Merged changes form main trunk (2.2.8, 2.2.9)
[fa-stable.git] / gl / inquiry / balance_sheet.php
index c08183d74d5a47d915d628087795c1b60ce03af9..3ee0ee50350cd8f91655026547d75ad48bda5ecb 100644 (file)
@@ -97,7 +97,12 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path
                        amount_cell(($acctstotal + $typestotal) * $convert);
                        end_row();
                }
-               elseif ($drilldown && $type != $_POST["AccGrp"])
+               //START Patch#1 : Display  only direct child types
+               $acctype1 = get_account_type($type);
+               $parent1 = $acctype1["parent"];
+               if ($drilldown && $parent1 == $_POST["AccGrp"])
+               //END Patch#2           
+               //elseif ($drilldown && $type != $_POST["AccGrp"])
                {
                        $url = "<a href='$path_to_root/gl/inquiry/balance_sheet.php?TransFromDate=" 
                                . $from . "&TransToDate=" . $to 
@@ -114,7 +119,7 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path
        
 function inquiry_controls()
 {
-    start_table("class='tablestyle_noborder'");
+    start_table(TABLESTYLE_NOBORDER);
        date_cells(_("As at:"), 'TransToDate');
        submit_cells('Show',_("Show"),'','', 'default');
     end_table();
@@ -125,7 +130,7 @@ function inquiry_controls()
 
 function display_balance_sheet()
 {
-       global $comp_path, $path_to_root, $table_style;
+       global $path_to_root;
        
        $from = begin_fiscalyear();
        $to = $_POST['TransToDate'];
@@ -140,7 +145,7 @@ function display_balance_sheet()
 
        div_start('balance_tbl');
        
-       start_table("width=30% $table_style");                  
+       start_table(TABLESTYLE, "width=30%");                   
                
        if (!$drilldown) //Root Level
        {