Minor change to balance sheet/profit and loss drilldown
[fa-stable.git] / gl / inquiry / profit_loss.php
index f7e6ea6958a914ec8bb7d664adf7602227e4deee..89fc80c24166395fe122f67f6741886e9cf9d355 100644 (file)
@@ -114,8 +114,13 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co
                        amount_cell(Achieve(($code_per_balance + $per_balance_total), ($code_acc_balance + $acc_balance_total)));
                        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/profit_loss.php?TransFromDate=" 
                                . $from . "&TransToDate=" . $to . "&Compare=" . $compare
                                . "&AccGrp=" . $type ."'>" . $typename ."</a>";