Final fixes in html layout
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 6 Jun 2008 08:09:27 +0000 (08:09 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 6 Jun 2008 08:09:27 +0000 (08:09 +0000)
CHANGELOG.txt
admin/create_coy.php
gl/gl_deposit.php
gl/gl_payment.php
gl/manage/exchange_rates.php
inventory/inquiry/stock_status.php
inventory/prices.php
inventory/purchasing_data.php
inventory/reorder_level.php
manufacturing/inquiry/where_used_inquiry.php
manufacturing/manage/bom_edit.php

index 4d11e26d4d27908eeebf6f1bd722f947069af798..ada9ee183a81b64d2b26208228405399b367521c 100644 (file)
@@ -19,6 +19,19 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+06-Jun-2008 Joe Hunt
+# Final fixes in html layout
+$ /admin/create_coy.php
+  /gl/gl_deposit.php
+  /gl/gl_payment.php
+  /gl/manage/exchange_rates.php
+  /inventory/prices.php
+  /inventory/purchasing_date.php
+  /inventory/reorder_level.php
+  /inventory/inquiry/stock_status.php
+  /manufacturing/inquiry/where_used_inquiry.php
+  /manufacturing/manage/bom_edit.php
+  
 05-Jun-2008 Joe Hunt
 ! Made an improment to the date picker. Shows the week number as well. Many delivery systems are week number based.
 $ /includes/ui/ui_view.inc
index d2498b017b8849649524c688aed259700341837e..a54ef45f1e08c486d00484f27679c3b27af465ba 100644 (file)
@@ -311,7 +311,7 @@ function display_company_edit($selected_id)
 
        end_table();
        display_note(_("Choose from Database scripts in SQL folder. No Datase is created without a script."), 0, 1);
-       echo "<center><input onclick='javascript:updateCompany()' type='button' style='width:150px' value='". _("Save"). "'>";
+       echo "<center><input onclick='javascript:updateCompany()' type='button' style='width:150px' value='". _("Save"). "'></center>";
 
 
        end_form();
index 3b9a3c621eb925c58dcf0dce99e41076f8c92a2d..3c0fc97ac3f5948b8e1206c73d78380d6db3f481 100644 (file)
@@ -28,7 +28,7 @@ check_db_has_bank_trans_types(_("There are no bank payment types defined in the
 
 //-----------------------------------------------------------------------------------------------
 
-if (isset($_GET['AddedID'])) 
+if (isset($_GET['AddedID']))
 {
        $trans_no = $_GET['AddedID'];
        $trans_type = systypes::bank_deposit();
@@ -51,7 +51,7 @@ function copy_to_py()
        $_SESSION['deposit_items']->transfer_type = $_POST['type'];
        $_SESSION['deposit_items']->increase = $_POST['PayType'];
        if (!isset($_POST['person_id']))
-               $_POST['person_id'] = "";       
+               $_POST['person_id'] = "";
        $_SESSION['deposit_items']->person_id = $_POST['person_id'];
        if (!isset($_POST['PersonDetailID']))
                $_POST['PersonDetailID'] = "";
@@ -88,7 +88,7 @@ function handle_new_order()
        $_POST['date_'] = Today();
        if (!is_date_in_fiscalyear($_POST['date_']))
                $_POST['date_'] = end_fiscalyear();
-       $_SESSION['deposit_items']->tran_date = $_POST['date_'];        
+       $_SESSION['deposit_items']->tran_date = $_POST['date_'];
 }
 
 //-----------------------------------------------------------------------------------------------
@@ -98,20 +98,20 @@ if (isset($_POST['Process']))
 
        $input_error = 0;
 
-       if (!references::is_valid($_POST['ref'])) 
+       if (!references::is_valid($_POST['ref']))
        {
                display_error( _("You must enter a reference."));
                set_focus('ref');
                $input_error = 1;
-       } 
-       elseif (!is_new_reference($_POST['ref'], systypes::bank_deposit())) 
+       }
+       elseif (!is_new_reference($_POST['ref'], systypes::bank_deposit()))
        {
                display_error( _("The entered reference is already in use."));
                set_focus('ref');
                $input_error = 1;
        }
 
-       if (!is_date($_POST['date_'])) 
+       if (!is_date($_POST['date_']))
        {
                display_error(_("The entered date for the deposit is invalid."));
                set_focus('date_');
@@ -160,14 +160,14 @@ function check_item_data()
                return false;
        }
 
-       if ($_POST['code_id'] == $_POST['bank_account']) 
+       if ($_POST['code_id'] == $_POST['bank_account'])
        {
                display_error( _("The source and destination accouts cannot be the same."));
                set_focus('code_id');
                return false;
        }
 
-       if (is_bank_account($_POST['code_id'])) 
+       if (is_bank_account($_POST['code_id']))
        {
                display_error( _("You cannot make a deposit from a bank account. Please use the transfer funds facility for this."));
                set_focus('code_id');
@@ -183,7 +183,7 @@ function handle_update_item()
 {
     if($_POST['UpdateItem'] != "" && check_item_data())
     {
-       $_SESSION['deposit_items']->update_gl_item($_POST['Index'], $_POST['dimension_id'], 
+       $_SESSION['deposit_items']->update_gl_item($_POST['Index'], $_POST['dimension_id'],
                  $_POST['dimension2_id'], -input_num('amount'), $_POST['LineMemo']);
     }
 }
@@ -202,7 +202,7 @@ function handle_new_item()
        if (!check_item_data())
                return;
 
-       $_SESSION['deposit_items']->add_gl_item($_POST['code_id'], $_POST['dimension_id'], 
+       $_SESSION['deposit_items']->add_gl_item($_POST['code_id'], $_POST['dimension_id'],
          $_POST['dimension2_id'], -input_num('amount'), $_POST['LineMemo']);
 }
 
@@ -216,7 +216,7 @@ if (isset($_GET['Delete']))
 
 if (isset($_POST['AddItem']) || isset($_POST['UpdateItem']))
        copy_to_py();
-       
+
 if (isset($_POST['AddItem']))
        handle_new_item();
 
@@ -247,9 +247,13 @@ end_table(1);
 
 if (!isset($_POST['Process']))
 {
-    submit_center_first('Update', _("Update"));
        if ($_SESSION['deposit_items']->count_gl_items() >= 1)
+       {
+       submit_center_first('Update', _("Update"));
            submit_center_last('Process', _("Process Deposit"));
+       }
+       else
+       submit_center('Update', _("Update"));
 }
 
 end_form();
index 12d05480f5dbf4b393e2b70947b296f85fc4879b..0b96feec3c0c27f74e2770d80c8bb419a427d281 100644 (file)
@@ -244,9 +244,13 @@ end_table(1);
 
 if (!isset($_POST['Process']))
 {
-    submit_center_first('Update', _("Update"));
        if ($_SESSION['pay_items']->count_gl_items() >= 1)
+       {
+       submit_center_first('Update', _("Update"));
            submit_center_last('Process', _("Process Payment"));
+       }
+       else
+       submit_center('Update', _("Update"));
 }
 
 end_form();
index 2f0cce3cffc70356bf5516c03c2c3e3886a3b247..6dfe221d9c88c8cecc53edc2139987a887eb1df8 100644 (file)
@@ -191,14 +191,15 @@ if (isset($_GET['delete']))
 
 //---------------------------------------------------------------------------------------------
 
-echo "<center>";
 start_form(false, true);
 
 if (!isset($_POST['curr_abrev']))
        $_POST['curr_abrev'] = get_global_curr_code();
 
+echo "<center>";
 echo _("Select a currency :") . "  ";
 currencies_list('curr_abrev', $_POST['curr_abrev'], true);
+echo "</center>";
 
 // if currency sel has changed, clear the form
 if ($_POST['curr_abrev'] != get_global_curr_code())
index e9ffcf60f7b367338a9585aca92aebe10f0356d0..acaa0c0f493ddffb40a466291e40d99eb6016ccd 100644 (file)
@@ -31,7 +31,7 @@ echo "<center> " . _("Item:"). " ";
 stock_items_list('stock_id', $_POST['stock_id'], false, true);
 echo "<br>";
 
-echo "<hr>";
+echo "<hr></center>";
 
 set_global_stock_item($_POST['stock_id']);
 
@@ -51,8 +51,8 @@ start_table($table_style);
 if ($kitset_or_service == true)
 {
        $th = array(_("Location"), _("Demand"));
-} 
-else 
+}
+else
 {
        $th = array(_("Location"), _("Quantity On Hand"), _("Re-Order Level"),
                _("Demand"), _("Available"), _("On Order"));
@@ -61,7 +61,7 @@ table_header($th);
 $j = 1;
 $k = 0; //row colour counter
 
-while ($myrow = db_fetch($loc_details)) 
+while ($myrow = db_fetch($loc_details))
 {
 
        alt_table_row_color($k);
@@ -79,8 +79,8 @@ while ($myrow = db_fetch($loc_details))
        {
          $demand_row = db_fetch_row($demand_result);
          $demand_qty =  $demand_row[0];
-       } 
-       else 
+       }
+       else
        {
          $demand_qty =0;
        }
@@ -100,8 +100,8 @@ while ($myrow = db_fetch($loc_details))
                {
                $qoo_row = db_fetch_row($qoo_result);
                $qoo =  $qoo_row[0];
-               } 
-               else 
+               }
+               else
                {
                        $qoo = 0;
                }
@@ -114,8 +114,8 @@ while ($myrow = db_fetch($loc_details))
         qty_cell($qoo);
         end_row();
 
-       } 
-       else 
+       }
+       else
        {
        /* It must be a service or kitset part */
                label_cell($myrow["location_name"]);
@@ -126,7 +126,7 @@ while ($myrow = db_fetch($loc_details))
        $j++;
        If ($j == 12)
        {
-               $j = 1; 
+               $j = 1;
                table_header($th);
        }
 }
index 64371bbe82840e02403978b46de087d090b0fd98..81b2e2c7f845cc3695e248f0ba39c7738a9aa889 100644 (file)
@@ -44,10 +44,10 @@ if (!isset($_POST['stock_id']))
 
 echo "<center>" . _("Item:"). "&nbsp;";
 stock_items_list('stock_id', $_POST['stock_id'], false, true);
-echo "<hr>";
+echo "<hr></center>";
 
 // if stock sel has changed, clear the form
-if ($_POST['stock_id'] != get_global_stock_item()) 
+if ($_POST['stock_id'] != get_global_stock_item())
 {
        clear_data();
 }
@@ -64,10 +64,10 @@ function clear_data()
 
 //----------------------------------------------------------------------------------------------------
 
-if (isset($_POST['updatePrice'])) 
+if (isset($_POST['updatePrice']))
 {
 
-       if (!check_num('price', 0)) 
+       if (!check_num('price', 0))
        {
                $input_error = 1;
                display_error( _("The price entered must be numeric."));
@@ -77,18 +77,18 @@ if (isset($_POST['updatePrice']))
        if ($input_error != 1)
        {
 
-               if (isset($_POST['PriceID'])) 
+               if (isset($_POST['PriceID']))
                {
                        //editing an existing price
-                       update_item_price($_POST['PriceID'], $_POST['sales_type_id'], 
+                       update_item_price($_POST['PriceID'], $_POST['sales_type_id'],
                        $_POST['curr_abrev'], input_num('price'));
 
                        $msg = _("This price has been updated.");
-               } 
-               elseif ($input_error !=1) 
+               }
+               elseif ($input_error !=1)
                {
 
-                       add_item_price($_POST['stock_id'], $_POST['sales_type_id'], 
+                       add_item_price($_POST['stock_id'], $_POST['sales_type_id'],
                            $_POST['curr_abrev'], input_num('price'));
 
                        display_note(_("The new price has been added."));
@@ -100,7 +100,7 @@ if (isset($_POST['updatePrice']))
 
 //------------------------------------------------------------------------------------------------------
 
-if (isset($_GET['delete'])) 
+if (isset($_GET['delete']))
 {
 
        //the link to delete a selected record was clicked
@@ -121,7 +121,7 @@ $th = array(_("Currency"), _("Sales Type"), _("Price"), "", "");
 table_header($th);
 $k = 0; //row colour counter
 
-while ($myrow = db_fetch($prices_list)) 
+while ($myrow = db_fetch($prices_list))
 {
 
        alt_table_row_color($k);
@@ -138,7 +138,7 @@ end_table();
 
 //------------------------------------------------------------------------------------------------
 
-if (db_num_rows($prices_list) == 0) 
+if (db_num_rows($prices_list) == 0)
 {
        display_note(_("There are no prices set up for this part."));
 }
index 80a71d1441a012053547d1e0a74c366eb2c76481..0fd952dc5ceaafa026440b981e7e1cdbd28950e1 100644 (file)
@@ -18,7 +18,7 @@ check_db_has_suppliers(_("There are no suppliers defined in the system."));
 if (isset($_GET['supplier_id']))
 {
        $supplier_id = strtoupper($_GET['supplier_id']);
-} 
+}
 elseif (isset($_POST['supplier_id']))
 {
        $supplier_id = strtoupper($_POST['supplier_id']);
@@ -61,7 +61,7 @@ if ((isset($_POST['AddRecord']) || isset($_POST['UpdateRecord'])) && isset($supp
 
                $sql = "INSERT INTO ".TB_PREF."purch_data (supplier_id, stock_id, price, suppliers_uom,
                        conversion_factor, supplier_description) VALUES (";
-               $sql .= "'$supplier_id', '" . $_POST['stock_id'] . "', " . 
+               $sql .= "'$supplier_id', '" . $_POST['stock_id'] . "', " .
                    input_num('price') . ", '" . $_POST['suppliers_uom'] . "', " .
                        input_num('conversion_factor') . ", '" . $_POST['supplier_description'] . "')";
 
@@ -117,18 +117,18 @@ if (!isset($_POST['stock_id']))
 echo "<center>" . _("Item:"). "&nbsp;";
 stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
 
-echo "<hr><center>";
+echo "<hr></center>";
 
 set_global_stock_item($_POST['stock_id']);
 
 $mb_flag = get_mb_flag($_POST['stock_id']);
 
-if ($mb_flag == -1) 
+if ($mb_flag == -1)
 {
        display_error(_("Entered item is not defined. Please re-enter."));
        set_focus('stock_id');
-} 
-else 
+}
+else
 {
 
     $sql = "SELECT ".TB_PREF."purch_data.*,".TB_PREF."suppliers.supp_name,".TB_PREF."suppliers.curr_code
@@ -141,8 +141,8 @@ else
     if (db_num_rows($result) == 0)
     {
        display_note(_("There is no purchasing data set up for the part selected"));
-    } 
-    else 
+    }
+    else
     {
         start_table("$table_style width=60%");
 
@@ -202,16 +202,16 @@ if (isset($_GET['Edit']))
 echo "<br>";
 start_table($table_style2);
 
-if (isset($_GET['Edit'])) 
+if (isset($_GET['Edit']))
 {
        hidden('supplier_id', $supplier_id);
        label_row(_("Supplier:"), $supp_name);
-} 
+}
 else
 {
        supplier_list_row(_("Supplier:"), 'supplier_id', null, false, true);
        $supplier_id = $_POST['supplier_id'];
-}      
+}
 amount_row(_("Price:"), 'price', null,'', get_supplier_currency($supplier_id));
 text_row(_("Suppliers Unit of Measure:"), 'suppliers_uom', null, 50, 51);
 
@@ -219,7 +219,7 @@ if (!isset($_POST['conversion_factor']) || $_POST['conversion_factor'] == "")
 {
        $_POST['conversion_factor'] = exrate_format(1);
 }
-amount_row(_("Conversion Factor (to our UOM):"), 'conversion_factor', 
+amount_row(_("Conversion Factor (to our UOM):"), 'conversion_factor',
   exrate_format($_POST['conversion_factor']), null, null, user_exrate_dec() );
 text_row(_("Supplier's Code or Description:"), 'supplier_description', null, 50, 51);
 
@@ -228,8 +228,8 @@ end_table(1);
 if (isset($_GET['Edit']))
 {
        submit_center('UpdateRecord', _("Update Purchasing Data"));
-} 
-else 
+}
+else
 {
        submit_center('AddRecord', _("Add Purchasing Data"));
 }
index cfe3303cb64b08b3da9f653f90a94f822555fc50..a39d094e4b7e519974f77ab54629a05dceac3726 100644 (file)
@@ -31,7 +31,7 @@ if (!isset($_POST['stock_id']))
 echo "<center>" . _("Item:"). "&nbsp;";
 stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
 
-echo "<hr>";
+echo "<hr></center>";
 
 stock_item_heading($_POST['stock_id']);
 
@@ -47,7 +47,7 @@ $k=0; //row colour counter
 
 $result = get_loc_details($_POST['stock_id']);
 
-while ($myrow = db_fetch($result)) 
+while ($myrow = db_fetch($result))
 {
 
        alt_table_row_color($k);
@@ -60,7 +60,7 @@ while ($myrow = db_fetch($result))
        }
 
        $qoh = get_qoh_on_date($_POST['stock_id'], $myrow["loc_code"]);
-       
+
        label_cell($myrow["location_name"]);
 
        $_POST[$myrow["loc_code"]] = qty_format($myrow["reorder_level"]);
@@ -78,7 +78,7 @@ while ($myrow = db_fetch($result))
 
 end_table(1);
 
-submit('UpdateData', _("Update"));
+submit_center('UpdateData', _("Update"));
 
 end_form();
 end_page();
index c68b42dfe43ecd3fdca0d3f8e08b4e67119b33f5..0bbacaca3afc28c41f9c061cbb25b32c3878deaa 100644 (file)
@@ -18,11 +18,11 @@ if (!isset($_POST['stock_id']))
 
 echo "<center>" . _("Select an item to display its parent item(s).") . "&nbsp;";
 stock_items_list('stock_id', $_POST['stock_id'], false, true);
-echo "<hr><center>";
+echo "<hr></center>";
 
 set_global_stock_item($_POST['stock_id']);
 
-if (isset($_POST['stock_id'])) 
+if (isset($_POST['stock_id']))
 {
     $sql = "SELECT ".TB_PREF."bom.*,".TB_PREF."stock_master.description,".TB_PREF."workcentres.name As WorkCentreName, ".TB_PREF."locations.location_name
                FROM ".TB_PREF."bom, ".TB_PREF."stock_master, ".TB_PREF."workcentres, ".TB_PREF."locations
@@ -32,11 +32,11 @@ if (isset($_POST['stock_id']))
 
     $result = db_query($sql,"No parent items were returned");
 
-       if (db_num_rows($result) == 0) 
+       if (db_num_rows($result) == 0)
        {
                display_note(_("The selected item is not used in any BOMs."));
-       } 
-       else 
+       }
+       else
        {
 
         start_table("$table_style width=80%");
@@ -45,7 +45,7 @@ if (isset($_POST['stock_id']))
         table_header($th);
 
                $k = $j = 0;
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
@@ -57,7 +57,7 @@ if (isset($_POST['stock_id']))
                label_cell($myrow["location_name"]);
                label_cell(qty_format($myrow["quantity"]));
                        end_row();
-                       
+
                $j++;
                If ($j == 12)
                {
index 9399d99bc46405794519ba707d858b5a13b47eb1..03af80598801080679046e81d859e988ee495f77 100644 (file)
@@ -139,8 +139,8 @@ function on_submit($selected_parent, $selected_component=null)
        elseif (!isset($selected_component) && isset($selected_parent))
        {
 
-               /*Selected component is null cos no item selected on first time round 
-               so must be adding a record must be Submitting new entries in the new 
+               /*Selected component is null cos no item selected on first time round
+               so must be adding a record must be Submitting new entries in the new
                component form */
 
                //need to check not recursive bom component of itself!
@@ -158,8 +158,8 @@ function on_submit($selected_parent, $selected_component=null)
                        if (db_num_rows($result) == 0)
                        {
                                $sql = "INSERT INTO ".TB_PREF."bom (parent, component, workcentre_added, loc_code, quantity)
-                                       VALUES ('$selected_parent', '" . $_POST['component'] . "', '" 
-                                       . $_POST['workcentre_added'] . "', '" . $_POST['loc_code'] . "', " 
+                                       VALUES ('$selected_parent', '" . $_POST['component'] . "', '"
+                                       . $_POST['workcentre_added'] . "', '" . $_POST['loc_code'] . "', "
                                        . input_num('quantity') . ")";
 
                                db_query($sql,"check failed");
@@ -200,6 +200,7 @@ start_form(false, true);
 
 echo "<center>" . _("Select a manufacturable item:") . "&nbsp;";
 stock_bom_items_list('stock_id', null, false, true);
+echo "</center>";
 
 end_form();