A lot of annoying layout bugs taken. Mostly from views and inquiries.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 31 May 2008 10:45:25 +0000 (10:45 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 31 May 2008 10:45:25 +0000 (10:45 +0000)
12 files changed:
CHANGELOG.txt
gl/view/gl_deposit_view.php
gl/view/gl_payment_view.php
includes/ui/ui_controls.inc
includes/ui/ui_lists.inc
includes/ui/ui_view.inc
manufacturing/includes/manufacturing_ui.inc
manufacturing/view/wo_issue_view.php
manufacturing/view/work_order_view.php
manufacturing/work_order_add_finished.php
sales/inquiry/customer_allocation_inquiry.php
sales/inquiry/customer_inquiry.php

index 6be84cd0800b735e682c5586aac375c7955c4859..65d575cf0ac7b014dc3047c59b57b747850ce9c5 100644 (file)
@@ -19,6 +19,20 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+31-May-2008 Joe Hunt
+# A lot of annoying layout bugs taken. Mostly from views and inquiries. A couple of files are critical, ui_view and ui_lists!
+$ /gl/view/gl_deposit_view.php
+  /gl/view/gl_payment_view.php
+  /includes/ui/ui_controls.inc
+  /includes/ui/ui_lists.inc
+  /includes/ui/ui_view.inc
+  /manufacturing/work_order_add_finished.php
+  /manufacturing/includes/manufacturing_ui.inc
+  /manufacturing/view/work_order_view.php
+  /manufacturing/view/wo_issue_view.php
+  /sales/inquiry/customer_allocation_inquiry.php
+  /sales/inquiry/customer_inquiry.php
+
 30-May-2008 Joe Hunt
 # Fixed bug in 2 files regarding stock movements. Moved from Invoice to Delivery.
 $ /inventory/inquiry/stock_movements.php
index fd9b746227907f520e1a2a50c0b8bf49ccf83185..c7837a3682aca1718d41f31852e279bf23eb3739 100644 (file)
@@ -29,7 +29,7 @@ $company_currency = get_company_currency();
 
 $show_currencies = false;
 
-if ($to_trans['bank_curr_code'] != $company_currency) 
+if ($to_trans['bank_curr_code'] != $company_currency)
 {
        $show_currencies = true;
 }
@@ -75,9 +75,9 @@ $items = get_gl_trans(systypes::bank_deposit(), $trans_no);
 
 if (db_num_rows($items) == 0)
 {
-       echo "<br>" . _("There are no items for this deposit.");
-} 
-else 
+       display_note(_("There are no items for this deposit."))";
+}
+else
 {
 
        display_heading2(_("Items for this Deposit"));
@@ -87,15 +87,15 @@ else
     start_table("$table_style width=80%");
     $th = array(_("Account Code"), _("Account Description"),
        _("Amount"), _("Memo"));
-    table_header($th); 
+    table_header($th);
 
     $k = 0; //row colour counter
        $total_amount = 0;
 
-    while ($item = db_fetch($items)) 
+    while ($item = db_fetch($items))
     {
 
-               if ($item["account"] != $to_trans["account_code"]) 
+               if ($item["account"] != $to_trans["account_code"])
                {
                alt_table_row_color($k);
 
index 0d7c51e789cd936d96561a2f6e5020c5609df5ef..f52dc67221420c954d9908a9644d7efa4a05a023 100644 (file)
@@ -29,7 +29,7 @@ $company_currency = get_company_currency();
 
 $show_currencies = false;
 
-if ($from_trans['bank_curr_code'] != $company_currency) 
+if ($from_trans['bank_curr_code'] != $company_currency)
 {
        $show_currencies = true;
 }
@@ -73,9 +73,9 @@ $items = get_gl_trans(systypes::bank_payment(), $trans_no);
 
 if (db_num_rows($items)==0)
 {
-       echo "<br>" . _("There are no items for this payment.");
-} 
-else 
+       display_note(_("There are no items for this payment."));
+}
+else
 {
 
        display_heading2(_("Items for this Payment"));
@@ -91,10 +91,10 @@ else
     $k = 0; //row colour counter
        $totalAmount = 0;
 
-    while ($item = db_fetch($items)) 
+    while ($item = db_fetch($items))
     {
 
-               if ($item["account"] != $from_trans["account_code"]) 
+               if ($item["account"] != $from_trans["account_code"])
                {
                alt_table_row_color($k);
 
index 9d52934fad5fdf9e7fa6ece110d05efb4b446b12..20d191f464a52c018bdb22605d97232fcf5c4241 100644 (file)
@@ -63,7 +63,8 @@ function hyperlink_back($center=true)
 {
        if ($center)
                echo "<center>";
-       echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
+       //echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
+       echo "<p><a href='javascript:goBack();'>"._("Back")."</a></p>\n";
        if ($center)
                echo "</center>";
        echo "<br>";
index 8e424542bb2b6e15b8997303bff5102728c8a4f5..1c08e25cf399a2b80933eb88fcc2f1c335d58105 100644 (file)
@@ -77,6 +77,7 @@ function supplier_list($name, $selected_id, $all_option=false, $submit_on_change
                if ($selected_id == "")
                {
                        $selected_id = $all_items;
+                       $_POST[$name] = $selected_id;
                }
        }
 
@@ -187,6 +188,7 @@ function customer_list($name, $selected_id, $all_option=false, $submit_on_change
                if ($selected_id == "")
                {
                        $selected_id =  $all_items;
+                       $_POST[$name] = $selected_id;
                }
        }
        while ($customer_row = db_fetch_row($customer_result))
@@ -669,6 +671,7 @@ function stock_items_list($name, $selected_id, $all_option=false, $submit_on_cha
                if ($selected_id == "")
                {
                        $selected_id = $all_items;
+                       $_POST[$name] = $selected_id;
                }
        }
 
@@ -953,6 +956,7 @@ function stock_purchasable_items_list($name, &$selected_id, $all_option=false, $
                if ($selected_id == "")
                {
                        $selected_id = $all_items;
+                       $_POST[$name] = $selected_id;
                }
        }
 
index ee24d8edd9a5c0b297529330e05cb186b9d7e19d..3e6d3c4eeb05d2c8c2e18729b1b2c1a6684419df 100644 (file)
@@ -595,7 +595,7 @@ function get_js_date_picker()
 #CCIframe { display: none; left: 0px; position: absolute; top: 0px; height: 250px; width: 250px; z-index: 99;}
 #CC { position:absolute; background-color:#FFF; margin:0; padding:0; display:none; z-index: 100;}
 #CC table { font-family: arial, verdana, helvetica, sans-serif;font-size: 8pt; border-left: 1px solid #336; border-right: 1px solid #336;}
-#CC th { font-weight: normal;}
+#CC th { font-weight: normal; text-align: center;}
 #CC th a { font-weight: normal; text-decoration: none; color: #FFF; padding: 1px;}
 #CC td { text-align: center;}
 #CC .header { background-color: #336;}
index b903d2c8f500fb85254c9cf460a04a8bb68abb25..eb14c8a11c64dcd3309d2e873845beda9fcc7769 100644 (file)
@@ -13,8 +13,8 @@ function display_bom($item_check)
     if (db_num_rows($result) == 0)
     {
        display_note(_("The bill of material for this item is empty."), 0, 1);
-    } 
-    else 
+    }
+    else
     {
 
         start_table($table_style);
@@ -28,7 +28,7 @@ function display_bom($item_check)
 
         $total_cost = 0;
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
@@ -68,8 +68,8 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null)
     if (db_num_rows($result) == 0)
     {
        display_note(_("There are no Requirements for this Order."), 1, 0);
-    } 
-    else 
+    }
+    else
     {
 
         start_table("$table_style width=80%");
@@ -84,7 +84,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null)
                if ($date == null)
                        $date = Today();
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        $qoh = 0;
@@ -96,13 +96,13 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null)
                        if ($show_qoh)
                                $qoh = get_qoh_on_date($myrow["stock_id"], $myrow["loc_code"], $date);
 
-                       if ($show_qoh && ($myrow["units_req"] * $quantity > $qoh) && 
-                               !sys_prefs::allow_negative_stock()) 
+                       if ($show_qoh && ($myrow["units_req"] * $quantity > $qoh) &&
+                               !sys_prefs::allow_negative_stock())
                        {
                                // oops, we don't have enough of one of the component items
                                start_row("class='stockmankobg'");
                                $has_marked = true;
-                       } 
+                       }
                        else
                                alt_table_row_color($k);
 
@@ -142,8 +142,8 @@ function display_wo_productions($woid)
     if (db_num_rows($result) == 0)
     {
        display_note(_("There are no Productions for this Order."), 1, 1);
-    } 
-    else 
+    }
+    else
     {
         start_table($table_style);
         $th = array(_("#"), _("Reference"), _("Date"), _("Quantity"));
@@ -153,7 +153,7 @@ function display_wo_productions($woid)
         $k = 0; //row colour counter
                $total_qty = 0;
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
@@ -167,7 +167,7 @@ function display_wo_productions($woid)
                        end_row();
                }//end of while
 
-               label_row(_("Total"), number_format2($total_qty,user_qty_dec()), 
+               label_row(_("Total"), number_format2($total_qty,user_qty_dec()),
                        "colspan=3", "nowrap align=right");
 
                end_table();
@@ -185,8 +185,8 @@ function display_wo_issues($woid)
     if (db_num_rows($result) == 0)
     {
        display_note(_("There are no Issues for this Order."), 0, 1);
-    } 
-    else 
+    }
+    else
     {
         start_table($table_style);
         $th = array(_("#"), _("Reference"), _("Date"));
@@ -195,7 +195,7 @@ function display_wo_issues($woid)
 
         $k = 0; //row colour counter
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
@@ -220,9 +220,9 @@ function display_wo_payments($woid)
 
     if (db_num_rows($result) == 0)
     {
-       echo _("There are no Payments for this Order.") . "<br>";
-    } 
-    else 
+       display_note(_("There are no Payments for this Order."), 0, 1);
+    }
+    else
     {
         start_table($table_style);
         $th = array(_("#"), _("Reference"), _("Date"), _("Amount"));
@@ -231,7 +231,7 @@ function display_wo_payments($woid)
 
         $k = 0; //row colour counter
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
@@ -256,7 +256,7 @@ function display_wo_details($woid, $suppress_view_link=false)
 
        $myrow = get_work_order($woid);
 
-    if (strlen($myrow[0]) == 0) 
+    if (strlen($myrow[0]) == 0)
     {
        display_note(_("The work order number sent is not valid."));
        exit;
@@ -264,11 +264,11 @@ function display_wo_details($woid, $suppress_view_link=false)
 
        start_table("$table_style width=80%");
 
-       if ($myrow["released"] == true) 
+       if ($myrow["released"] == true)
                $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"),
                        _("Into Location"), _("Date"), _("Required By"), _("Quantity Required"),
                        _("Released Date"), _("Manufactured"));
-       else            
+       else
                $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"),
                        _("Into Location"), _("Date"), _("Required By"), _("Quantity Required"));
 
@@ -287,7 +287,7 @@ function display_wo_details($woid, $suppress_view_link=false)
 
        qty_cell($myrow["units_reqd"]);
 
-       if ($myrow["released"] == true) 
+       if ($myrow["released"] == true)
        {
                label_cell(sql2date($myrow["released_date"]));
                qty_cell($myrow["units_issued"]);
@@ -298,7 +298,7 @@ function display_wo_details($woid, $suppress_view_link=false)
 
        end_table();
 
-    if ($myrow["closed"] == true) 
+    if ($myrow["closed"] == true)
     {
        display_note(_("This work order is closed."));
     }
@@ -312,7 +312,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false)
 
        $myrow = get_work_order($woid);
 
-    if (strlen($myrow[0]) == 0) 
+    if (strlen($myrow[0]) == 0)
     {
        display_note(_("The work order number sent is not valid."));
        exit;
@@ -322,7 +322,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false)
 
        $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"),
                _("Into Location"), _("Date"), _("Quantity"));
-       table_header($th);      
+       table_header($th);
 
        start_row();
        if ($suppress_view_link)
@@ -343,7 +343,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false)
 
        end_table();
 
-    if ($myrow["closed"] == true) 
+    if ($myrow["closed"] == true)
     {
        display_note(_("This work order is closed."));
     }
index 19b62bc0b359153968912f9baef52ffee573ba2a..484b08ec74161975a34eea80c69726ae4a1be3d3 100644 (file)
@@ -4,7 +4,10 @@ $page_security = 10;
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("View Work Order Issue"), true);
+$js = "";
+if ($use_popup_windows)
+       $js .= get_js_open_window(900, 500);
+page(_("View Work Order Issue"), true, false, "", $js);
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
@@ -15,7 +18,7 @@ include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
 //-------------------------------------------------------------------------------------------------
 
-if ($_GET['trans_no'] != "") 
+if ($_GET['trans_no'] != "")
 {
        $wo_issue_no = $_GET['trans_no'];
 }
@@ -31,7 +34,7 @@ function display_wo_issue($issue_no)
     start_table($table_style);
     $th = array(_("Issue #"), _("Reference"), _("For Work Order #"),
        _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue"));
-    table_header($th); 
+    table_header($th);
 
        start_row();
        label_cell($myrow["issue_no"]);
@@ -60,9 +63,9 @@ function display_wo_issue_details($issue_no)
 
     if (db_num_rows($result) == 0)
     {
-       echo "<br>" . _("There are no items for this issue.");
-    } 
-    else 
+       display_note(_("There are no items for this issue."));
+    }
+    else
     {
         start_table($table_style);
         $th = array(_("Component"), _("Quantity"), _("Units"));
@@ -74,7 +77,7 @@ function display_wo_issue_details($issue_no)
 
         $total_cost = 0;
 
-        while ($myrow = db_fetch($result)) 
+        while ($myrow = db_fetch($result))
         {
 
                        alt_table_row_color($k);
index fb28310cbf10532d1d93a6457be5217e4a59092f..d63f2de351d00b1b0c36ed52a6b7d3820197ce17 100644 (file)
@@ -18,8 +18,8 @@ page(_("View Work Order"), true, false, "", $js);
 
 //-------------------------------------------------------------------------------------------------
 $woid = 0;
-if ($_GET['trans_no'] != "") 
-{      
+if ($_GET['trans_no'] != "")
+{
        $woid = $_GET['trans_no'];
 }
 
@@ -34,33 +34,33 @@ else
 
 echo "<center>";
 
-// display the WO requirements 
+// display the WO requirements
 echo "<br>";
-if ($myrow["released"] == false) 
-{      
+if ($myrow["released"] == false)
+{
     display_heading2(_("BOM for item:") . " " . $myrow["StockItemName"]);
     display_bom($myrow["stock_id"]);
-} 
-else 
+}
+else
 {
-       display_heading2(_("Work Order Requirements"));         
+       display_heading2(_("Work Order Requirements"));
        display_wo_requirements($woid, $myrow["units_reqd"]);
-       if ($myrow["type"] == wo_types::advanced()) 
-       {       
+       if ($myrow["type"] == wo_types::advanced())
+       {
        echo "<br><table cellspacing=7><tr valign=top><td>";
-       display_heading2(_("Issues"));          
+       display_heading2(_("Issues"));
        display_wo_issues($woid);
        echo "</td><td>";
        display_heading2(_("Productions"));
        display_wo_productions($woid);
        echo "</td><td>";
        display_heading2(_("Payments"));
-       display_wo_payments($woid);     
+       display_wo_payments($woid);
        echo "</td></tr></table>";
-       }               
+       }
 }
 
-echo "<br>";
+echo "<br></center>";
 
 is_voided_display(systypes::work_order(), $woid, _("This work order has been voided."));
 
index 9cb5607466e9f1819bc307f294a681a821b3171f..545b694b97794256cfcfb877ceed0b70e82948c9 100644 (file)
@@ -12,6 +12,8 @@ include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
 $js = "";
+if ($use_popup_windows)
+       $js .= get_js_open_window(900, 500);
 if ($use_date_picker)
        $js .= get_js_date_picker();
 page(_("Produce or Unassemble Finished Items From Work Order"), false, false, "", $js);
@@ -23,7 +25,7 @@ if (isset($_GET['trans_no']) && $_GET['trans_no'] != "")
 
 //--------------------------------------------------------------------------------------------------
 
-if (isset($_GET['AddedID'])) 
+if (isset($_GET['AddedID']))
 {
 
        display_note(_("The manufacturing process has been entered."));
@@ -38,7 +40,7 @@ if (isset($_GET['AddedID']))
 
 $wo_details = get_work_order($_POST['selected_id']);
 
-if (strlen($wo_details[0]) == 0) 
+if (strlen($wo_details[0]) == 0)
 {
        display_error(_("The order number sent is not valid."));
        exit;
@@ -50,14 +52,14 @@ function can_process()
 {
        global $wo_details;
 
-       if (!references::is_valid($_POST['ref'])) 
+       if (!references::is_valid($_POST['ref']))
        {
                display_error(_("You must enter a reference."));
                set_focus('ref');
                return false;
        }
 
-       if (!is_new_reference($_POST['ref'], 29)) 
+       if (!is_new_reference($_POST['ref'], 29))
        {
                display_error(_("The entered reference is already in use."));
                set_focus('ref');
@@ -76,14 +78,14 @@ function can_process()
                display_error(_("The entered date is invalid."));
                set_focus('date_');
                return false;
-       } 
-       elseif (!is_date_in_fiscalyear($_POST['date_'])) 
+       }
+       elseif (!is_date_in_fiscalyear($_POST['date_']))
        {
                display_error(_("The entered date is not in fiscal year."));
                set_focus('date_');
                return false;
        }
-       if (date_diff(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0) 
+       if (date_diff(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0)
        {
                display_error(_("The production date cannot be before the release date of the work order."));
                set_focus('date_');
@@ -96,7 +98,7 @@ function can_process()
                $wo_details = get_work_order($_POST['selected_id']);
 
                $qoh = get_qoh_on_date($wo_details["stock_id"], $wo_details["loc_code"], $date_);
-               if (-$_POST['quantity'] + $qoh < 0) 
+               if (-$_POST['quantity'] + $qoh < 0)
                {
                        display_error(_("The unassembling cannot be processed because there is insufficient stock."));
                        set_focus('quantity');
@@ -109,7 +111,7 @@ function can_process()
 
 //--------------------------------------------------------------------------------------------------
 
-if (isset($_POST['Process']) || (isset($_POST['ProcessAndClose']) && can_process() == true)) 
+if (isset($_POST['Process']) || (isset($_POST['ProcessAndClose']) && can_process() == true))
 {
 
        $close_wo = 0;
@@ -137,7 +139,7 @@ start_form();
 hidden('selected_id', $_POST['selected_id']);
 //hidden('WOReqQuantity', $_POST['WOReqQuantity']);
 
-if (!isset($_POST['quantity']) || $_POST['quantity'] == '') 
+if (!isset($_POST['quantity']) || $_POST['quantity'] == '')
 {
        $_POST['quantity'] = max($wo_details["units_reqd"] - $wo_details["units_issued"], 0);
 }
index b02525612cdc0945fdd145f1ec92f8907667f0af..c20262d5acbb17d3a39e14cf62dfe44d953c7123 100644 (file)
@@ -185,8 +185,7 @@ while ($myrow = db_fetch($result))
        }
 
        label_cell(systypes::name($myrow["type"]));
-
-       label_cell(get_customer_trans_view_str($myrow["type"], $myrow["trans_no"]));
+       label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
        label_cell($myrow["reference"]);
        label_cell($preview_order_str);
        label_cell(sql2date($myrow["tran_date"]), "nowrap");
index db68dfdd36616e61c97812a895c88715a0e03657..ab2cdd6172ebefcc3bc074a2b6d54bbc1fb9c93e 100644 (file)
@@ -29,8 +29,9 @@ if (!isset($_POST['customer_id']))
        $_POST['customer_id'] = get_global_customer();
 
 start_table("class='tablestyle_noborder'");
+start_row();
 
-customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
+customer_list_cells(_("Select a customer: "), 'customer_id', null, true);
 
 date_cells(_("From:"), 'TransAfterDate', null, -30);
 date_cells(_("To:"), 'TransToDate', null, 1);
@@ -41,7 +42,7 @@ if (!isset($_POST['filterType']))
 cust_allocations_list_cells(null, 'filterType', $_POST['filterType'], true);
 
 submit_cells('Refresh Inquiry', _("Search"));
-
+end_row();
 end_table();
 
 end_form();
@@ -145,8 +146,7 @@ function get_transactions()
 }
 
 //------------------------------------------------------------------------------------------------
-
-if (($_POST['customer_id'] != "") && ($_POST['customer_id'] != reserved_words::get_all()))
+if ($_POST['customer_id'] != "" && $_POST['customer_id'] != reserved_words::get_all())
 {
        $customer_record = get_customer_details($_POST['customer_id']);
     display_customer_summary($customer_record);