Added a selector for decimal values in Balance Sheet and P/L Statement
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 10 Feb 2010 14:27:21 +0000 (14:27 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 10 Feb 2010 14:27:21 +0000 (14:27 +0000)
CHANGELOG.txt
reporting/rep706.php
reporting/rep707.php
reporting/reports_main.php

index 026cd2cc9116fbf689d2e6e5b1b233d9df9362ad..2f07fd457eb865c740291b81d60c2c6451369297 100644 (file)
@@ -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 
index 281c806b0fe424e6c2b19e103e4aa71c824c746a..e5cf4ce6bc03a159cf85baac84a8e1f8dd9d3ab7 100644 (file)
@@ -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--
index 0fa067a3993b667f7050bb1a7ad24cbb7233480c..14112f24bd5674f1e1ad7e9567397a6671d62901 100644 (file)
@@ -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);
index d1ba1b3686effd2f261a12fc48f9d7c2bbd03bec..5bc356a1ccee7f8c38dbea29d33c068c99ddf5d0 100644 (file)
@@ -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'));