! -> 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
$show_currencies = false;
-if ($to_trans['bank_curr_code'] != $company_currency)
+if ($to_trans['bank_curr_code'] != $company_currency)
{
$show_currencies = true;
}
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"));
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);
$show_currencies = false;
-if ($from_trans['bank_curr_code'] != $company_currency)
+if ($from_trans['bank_curr_code'] != $company_currency)
{
$show_currencies = true;
}
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"));
$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);
{
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>";
if ($selected_id == "")
{
$selected_id = $all_items;
+ $_POST[$name] = $selected_id;
}
}
if ($selected_id == "")
{
$selected_id = $all_items;
+ $_POST[$name] = $selected_id;
}
}
while ($customer_row = db_fetch_row($customer_result))
if ($selected_id == "")
{
$selected_id = $all_items;
+ $_POST[$name] = $selected_id;
}
}
if ($selected_id == "")
{
$selected_id = $all_items;
+ $_POST[$name] = $selected_id;
}
}
#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;}
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);
$total_cost = 0;
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
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%");
if ($date == null)
$date = Today();
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
$qoh = 0;
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);
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"));
$k = 0; //row colour counter
$total_qty = 0;
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
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();
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"));
$k = 0; //row colour counter
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
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"));
$k = 0; //row colour counter
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
$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;
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"));
qty_cell($myrow["units_reqd"]);
- if ($myrow["released"] == true)
+ if ($myrow["released"] == true)
{
label_cell(sql2date($myrow["released_date"]));
qty_cell($myrow["units_issued"]);
end_table();
- if ($myrow["closed"] == true)
+ if ($myrow["closed"] == true)
{
display_note(_("This work order is closed."));
}
$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;
$th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"),
_("Into Location"), _("Date"), _("Quantity"));
- table_header($th);
+ table_header($th);
start_row();
if ($suppress_view_link)
end_table();
- if ($myrow["closed"] == true)
+ if ($myrow["closed"] == true)
{
display_note(_("This work order is closed."));
}
$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");
//-------------------------------------------------------------------------------------------------
-if ($_GET['trans_no'] != "")
+if ($_GET['trans_no'] != "")
{
$wo_issue_no = $_GET['trans_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"]);
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"));
$total_cost = 0;
- while ($myrow = db_fetch($result))
+ while ($myrow = db_fetch($result))
{
alt_table_row_color($k);
//-------------------------------------------------------------------------------------------------
$woid = 0;
-if ($_GET['trans_no'] != "")
-{
+if ($_GET['trans_no'] != "")
+{
$woid = $_GET['trans_no'];
}
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."));
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);
//--------------------------------------------------------------------------------------------------
-if (isset($_GET['AddedID']))
+if (isset($_GET['AddedID']))
{
display_note(_("The manufacturing process has been entered."));
$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;
{
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');
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_');
$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');
//--------------------------------------------------------------------------------------------------
-if (isset($_POST['Process']) || (isset($_POST['ProcessAndClose']) && can_process() == true))
+if (isset($_POST['Process']) || (isset($_POST['ProcessAndClose']) && can_process() == true))
{
$close_wo = 0;
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);
}
}
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");
$_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);
cust_allocations_list_cells(null, 'filterType', $_POST['filterType'], true);
submit_cells('Refresh Inquiry', _("Search"));
-
+end_row();
end_table();
end_form();
}
//------------------------------------------------------------------------------------------------
-
-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);