Removed editable rate field in tax_group_items.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 20 Sep 2009 10:15:14 +0000 (10:15 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 20 Sep 2009 10:15:14 +0000 (10:15 +0000)
A start_form and end_form was missing
Design improvement in rep704

CHANGELOG.txt
reporting/rep704.php
taxes/tax_groups.php

index e74b7747f2ef7816d2fa7e028aeda9df9ba7dd9a..6fba00ee66fb0f9c3ba9d9c7ba8b83efdb02062d 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+20-Sep-2009 Joe Hunt
+! Removed editable rate field in tax_group_items.
+# A start_form and end_form was missing
+$ /taxes/tax_groups.php
+
 20-Sep-2009 Janusz Dobrowolski
 + Optional demo data checkbox on install page.
 $ /install/index.php
index f69d43547c8bc7982178fde55ec932a0cdbe80ea..8986237d2ebc4f18cb32594b1f46bd413e005a9c 100644 (file)
@@ -66,7 +66,7 @@ function print_GL_transactions()
        $rep = new FrontReport(_('GL Account Transactions'), "GLAccountTransactions", user_pagesize());
        $dec = user_price_dec();
 
-       $cols = array(0, 70, 90, 140, 210, 280, 340, 400, 450, 510, 570);
+       $cols = array(0, 80, 100, 150, 210, 280, 340, 400, 450, 510, 570);
        //------------0--1---2---3----4----5----6----7----8----9----10-------
        //-----------------------dim1-dim2-----------------------------------
        //-----------------------dim1----------------------------------------
index 7a5aabd1d04c5ab4f1ade112d5643f3e589cb7b1..8e879cd4e97a504a2dd7b4ce95a97604dcaec972 100644 (file)
@@ -40,6 +40,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
                display_error(_("The tax group name cannot be empty."));
                set_focus('name');
        } 
+       /* Editable rate has been removed 090920 Joe Hunt
        else 
        {
                // make sure any entered rates are valid
@@ -56,7 +57,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
                }
        }
        }
-
+       */
        if ($input_error != 1) 
        {
 
@@ -70,7 +71,9 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
                                $_POST['tax_type_id' . $i] != ANY_NUMERIC) 
                        {
                        $taxes[] = $_POST['tax_type_id' . $i];
-                       $rates[] = input_num('rate' . $i);
+                               $rates[] = get_tax_type_default_rate($_POST['tax_type_id' . $i]);
+                               //Editable rate has been removed 090920 Joe Hunt
+                       //$rates[] = input_num('rate' . $i);
                }
        }
 
@@ -173,8 +176,9 @@ while ($myrow = db_fetch($result))
 
 inactive_control_row($th);
 end_table(1);
+end_form(); // was missing
 //-----------------------------------------------------------------------------------
-
+start_form(); // was missing
 start_table($table_style2);
 
 if ($selected_id != -1) 
@@ -208,7 +212,9 @@ end_table();
 display_note(_("Select the taxes that are included in this group."), 1);
 
 start_table($table_style2);
-$th = array(_("Tax"), _("Default Rate (%)"), _("Rate (%)"));
+//$th = array(_("Tax"), _("Default Rate (%)"), _("Rate (%)"));
+//Editable rate has been removed 090920 Joe Hunt
+$th = array(_("Tax"), _("Rate (%)"));
 table_header($th);
 for ($i = 0; $i < 5; $i++) 
 {
@@ -219,14 +225,14 @@ for ($i = 0; $i < 5; $i++)
 
        if ($_POST['tax_type_id' . $i] != 0 && $_POST['tax_type_id' . $i] != ALL_NUMERIC) 
        {
-
                $default_rate = get_tax_type_default_rate($_POST['tax_type_id' . $i]);
                label_cell(percent_format($default_rate), "nowrap align=right");
 
-               if (!isset($_POST['rate' . $i]) || $_POST['rate' . $i] == "")
-                       $_POST['rate' . $i] = percent_format($default_rate);
-               small_amount_cells(null, 'rate' . $i, $_POST['rate' . $i], null, null, 
-                 user_percent_dec());
+               //Editable rate has been removed 090920 Joe Hunt
+               //if (!isset($_POST['rate' . $i]) || $_POST['rate' . $i] == "")
+               //      $_POST['rate' . $i] = percent_format($default_rate);
+               //small_amount_cells(null, 'rate' . $i, $_POST['rate' . $i], null, null, 
+               //  user_percent_dec()); 
        }
        end_row();
 }