From 42d43355016c70473fa06851baa60c5ea34e7c96 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 10 Feb 2010 14:27:21 +0000 Subject: [PATCH] Added a selector for decimal values in Balance Sheet and P/L Statement --- CHANGELOG.txt | 4 ++++ reporting/rep706.php | 24 +++++++++++++++--------- reporting/rep707.php | 24 +++++++++++++++--------- reporting/reports_main.php | 6 ++++++ 4 files changed, 40 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 026cd2cc..2f07fd45 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -27,6 +27,10 @@ $ /admin/gl_setup.php /manufacturing/includes/db/work_orders_db.inc /purchasing/includes/db/grn_db.inc /purchasing/includes/db/invoice_db.inc ++ Added a selector for decimal values in Balance Sheet and P/L Statement +$ /reporting/reports_main.php + /reporting/rep706.php + /reporting/rep707.php 09-Feb-2010 Joe Hunt/Chaitanya # [0000202] Global $path_to_root is missing in function handle_submit() in file admin/create_coy.php diff --git a/reporting/rep706.php b/reporting/rep706.php index 281c806b..e5cf4ce6 100644 --- a/reporting/rep706.php +++ b/reporting/rep706.php @@ -133,23 +133,26 @@ function print_balance_sheet() { $dimension = $_POST['PARAM_2']; $dimension2 = $_POST['PARAM_3']; + $decimals = $_POST['PARAM_4']; + $graphics = $_POST['PARAM_5']; + $comments = $_POST['PARAM_6']; + $destination = $_POST['PARAM_7']; + } + else if ($dim == 1) + { + $dimension = $_POST['PARAM_2']; + $decimals = $_POST['PARAM_3']; $graphics = $_POST['PARAM_4']; $comments = $_POST['PARAM_5']; $destination = $_POST['PARAM_6']; } - else if ($dim == 1) + else { - $dimension = $_POST['PARAM_2']; + $decimals = $_POST['PARAM_2']; $graphics = $_POST['PARAM_3']; $comments = $_POST['PARAM_4']; $destination = $_POST['PARAM_5']; } - else - { - $graphics = $_POST['PARAM_2']; - $comments = $_POST['PARAM_3']; - $destination = $_POST['PARAM_4']; - } if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -159,7 +162,10 @@ function print_balance_sheet() include_once($path_to_root . "/reporting/includes/class.graphic.inc"); $pg = new graph(); } - $dec = 0; + if (!$decimals) + $dec = 0; + else + $dec = user_price_dec(); $cols = array(0, 50, 200, 350, 425, 500); //------------0--1---2----3----4----5-- diff --git a/reporting/rep707.php b/reporting/rep707.php index 0fa067a3..14112f24 100644 --- a/reporting/rep707.php +++ b/reporting/rep707.php @@ -156,23 +156,26 @@ function print_profit_and_loss_statement() { $dimension = $_POST['PARAM_3']; $dimension2 = $_POST['PARAM_4']; + $decimals = $_POST['PARAM_5']; + $graphics = $_POST['PARAM_6']; + $comments = $_POST['PARAM_7']; + $destination = $_POST['PARAM_8']; + } + else if ($dim == 1) + { + $dimension = $_POST['PARAM_3']; + $decimals = $_POST['PARAM_4']; $graphics = $_POST['PARAM_5']; $comments = $_POST['PARAM_6']; $destination = $_POST['PARAM_7']; } - else if ($dim == 1) + else { - $dimension = $_POST['PARAM_3']; + $decimals = $_POST['PARAM_3']; $graphics = $_POST['PARAM_4']; $comments = $_POST['PARAM_5']; $destination = $_POST['PARAM_6']; } - else - { - $graphics = $_POST['PARAM_3']; - $comments = $_POST['PARAM_4']; - $destination = $_POST['PARAM_5']; - } if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -182,7 +185,10 @@ function print_profit_and_loss_statement() include_once($path_to_root . "/reporting/includes/class.graphic.inc"); $pg = new graph(); } - $dec = 0; + if (!$decimals) + $dec = 0; + else + $dec = user_price_dec(); $pdec = user_percent_dec(); $cols = array(0, 50, 200, 350, 425, 500); diff --git a/reporting/reports_main.php b/reporting/reports_main.php index d1ba1b36..5bc356a1 100644 --- a/reporting/reports_main.php +++ b/reporting/reports_main.php @@ -256,6 +256,7 @@ if ($dim == 2) _('End Date') => 'DATEENDM', _('Dimension')." 1" => 'DIMENSIONS1', _('Dimension')." 2" => 'DIMENSIONS2', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); @@ -265,6 +266,7 @@ if ($dim == 2) _('Compare to') => 'COMPARE', _('Dimension')." 1" => 'DIMENSIONS1', _('Dimension')." 2" => 'DIMENSIONS2', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); @@ -297,6 +299,7 @@ else if ($dim == 1) array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', _('Dimension') => 'DIMENSIONS1', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); @@ -305,6 +308,7 @@ else if ($dim == 1) _('End Date') => 'DATEENDM', _('Compare to') => 'COMPARE', _('Dimension') => 'DIMENSIONS1', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); @@ -333,6 +337,7 @@ else $reports->addReport(_('General Ledger'),706,_('&Balance Sheet'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); @@ -340,6 +345,7 @@ else array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Compare to') => 'COMPARE', + _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -- 2.30.2