Added a selector for decimal values in Balance Sheet and P/L Statement
[fa-stable.git] / reporting / rep706.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--