include_once($path_to_root . "/includes/session.inc");
+include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/admin/db/fiscalyears_db.inc");
-include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/gl/includes/gl_db.inc");
end_row();
end_table(1);
- if ($pbal != 0)
+ if (($pbal = round2($pbal, user_price_dec())) != 0)
display_warning(_("The Opening Balance is not in balance, probably due to a non closed Previous Fiscalyear."));
div_end();
}
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
+include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/date_functions.inc");
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/gl/includes/gl_db.inc");
$rep->NewLine();
$rep->Line($rep->row);
- if ($pbal != 0.0)
+ if (($pbal = round2($pbal, $dec)) != 0.0)
{
- $rep->NewLine(2);
- $rep->Font();
+ $rep->NewLine(2);
+ $rep->Font();
$rep->TextCol(0, 8, _("The Opening Balance is not in balance, probably due to a non closed Previous Fiscalyear."));
}
$rep->End();
-- Dumping data for table `0_fiscal_year`
--
-INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 0);
-INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 0);
+INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 1);
+INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 1);
INSERT INTO `0_fiscal_year` VALUES(3, '2010-01-01', '2010-12-31', 0);
--
INSERT INTO `0_gl_trans` VALUES(81, 11, 3, '2009-06-21', '4010', '', 50, 2, 0, 2, '3');
INSERT INTO `0_gl_trans` VALUES(82, 11, 3, '2009-06-21', '1200', '', -52.5, 0, 0, 2, '3');
INSERT INTO `0_gl_trans` VALUES(83, 11, 3, '2009-06-21', '2150', '', 2.5, 0, 0, 2, '3');
+INSERT INTO `0_gl_trans` VALUES ('84', '0', '20', '2009-12-31', '3590', 'Closing Year', '-91.19', '0', '0', NULL, NULL);
+INSERT INTO `0_gl_trans` VALUES ('85', '0', '20', '2009-12-31', '9990', 'Closing Year', '91.19', '0', '0', NULL, NULL);
-- --------------------------------------------------------