- //Get Account groups/types under this group/type\r
- $result = get_account_types(false, false, $type);\r
- while ($accounttype=db_fetch($result))\r
- {\r
- //Print Type Title if has sub types and not previously printed\r
- if (!$printtitle)\r
- {\r
- start_row("class='inquirybg' style='font-weight:bold'");\r
- label_cell("Group - ".$type ." - ".$typename, "colspan=8");\r
- end_row(); \r
- $printtitle = 1; \r
- }\r
- display_trial_balance($accounttype["id"], $accounttype["name"].' ('.$typename.')');\r
- }\r
-}\r
-\r
-//----------------------------------------------------------------------------------------------------\r
-\r
-gl_inquiry_controls();\r
-\r
-if (isset($_POST['TransFromDate']))\r
-{\r
- $row = get_current_fiscalyear();\r
- if (date1_greater_date2($_POST['TransFromDate'], sql2date($row['end'])))\r
- {\r
- display_error(_("The from date cannot be bigger than the fiscal year end."));\r
- set_focus('TransFromDate');\r
- return;\r
- } \r
-} \r
-div_start('balance_tbl');\r
-if (!isset($_POST['Dimension']))\r
- $_POST['Dimension'] = 0;\r
-if (!isset($_POST['Dimension2']))\r
- $_POST['Dimension2'] = 0;\r
-start_table(TABLESTYLE);\r
-$tableheader = "<tr>\r
- <td rowspan=2 class='tableheader'>" . _("Account") . "</td>\r
- <td rowspan=2 class='tableheader'>" . _("Account Name") . "</td>\r
- <td colspan=2 class='tableheader'>" . _("Brought Forward") . "</td>\r
- <td colspan=2 class='tableheader'>" . _("This Period") . "</td>\r
- <td colspan=2 class='tableheader'>" . _("Balance") . "</td>\r
- </tr><tr>\r
- <td class='tableheader'>" . _("Debit") . "</td>\r
- <td class='tableheader'>" . _("Credit") . "</td>\r
- <td class='tableheader'>" . _("Debit") . "</td>\r
- <td class='tableheader'>" . _("Credit") . "</td>\r
- <td class='tableheader'>" . _("Debit") . "</td>\r
- <td class='tableheader'>" . _("Credit") . "</td>\r
- </tr>";\r
-\r
-echo $tableheader;\r
-\r
-//display_trial_balance();\r
-\r
-$classresult = get_account_classes(false);\r
-while ($class = db_fetch($classresult))\r
-{\r
- start_row("class='inquirybg' style='font-weight:bold'");\r
- label_cell("Class - ".$class['cid'] ." - ".$class['class_name'], "colspan=8");\r
- end_row();\r
-\r
- //Get Account groups/types under this group/type with no parents\r
- $typeresult = get_account_types(false, $class['cid'], -1);\r
- while ($accounttype=db_fetch($typeresult))\r
- {\r
- display_trial_balance($accounttype["id"], $accounttype["name"]);\r
- }\r
-}\r
-\r
- //$prev = get_balance(null, $begin, $_POST['TransFromDate'], false, false);
- //$curr = get_balance(null, $_POST['TransFromDate'], $_POST['TransToDate'], true, true);
- //$tot = get_balance(null, $begin, $_POST['TransToDate'], false, true);
+ //Get Account groups/types under this group/type
+ $result = get_account_types(false, false, $type);
+ while ($accounttype=db_fetch($result))
+ {
+ //Print Type Title if has sub types and not previously printed
+ if (!$printtitle)
+ {
+ start_row("class='inquirybg' style='font-weight:bold'");
+ label_cell(_("Group")." - ".$type ." - ".$typename, "colspan=8");
+ end_row();
+ $printtitle = 1;
+
+ }
+ display_trial_balance($accounttype["id"], $accounttype["name"].' ('.$typename.')');
+ }
+
+ start_row("class='inquirybg' style='font-weight:bold'");
+ label_cell(_("Total") ." - ".$typename, "colspan=2");
+