예제 #1
0
include_once $path_to_root . "/manufacturing/includes/manufacturing_ui.inc";
$js = "";
if ($use_popup_windows) {
    $js .= get_js_open_window(800, 500);
}
page(_($help_context = "View Work Order"), true, false, "", $js);
//-------------------------------------------------------------------------------------------------
$woid = 0;
if ($_GET['trans_no'] != "") {
    $woid = $_GET['trans_no'];
}
display_heading($systypes_array[ST_WORKORDER] . " # " . $woid);
br(1);
$myrow = get_work_order($woid);
if ($myrow["type"] == WO_ADVANCED) {
    display_wo_details($woid, true);
} else {
    display_wo_details_quick($woid, true);
}
echo "<center>";
// display the WO requirements
br(1);
if ($myrow["released"] == false) {
    display_heading2(_("BOM for item:") . " " . $myrow["StockItemName"]);
    display_bom($myrow["stock_id"]);
} else {
    display_heading2(_("Work Order Requirements"));
    display_wo_requirements($woid, $myrow["units_reqd"]);
    if ($myrow["type"] == WO_ADVANCED) {
        echo "<br><table cellspacing=7><tr valign=top><td>";
        display_heading2(_("Issues"));
예제 #2
0
}
//--------------------------------------------------------------------------------------------------
if (isset($_POST['Process']) || isset($_POST['ProcessAndClose']) && can_process() == true) {
    $close_wo = 0;
    if (isset($_POST['ProcessAndClose']) && $_POST['ProcessAndClose'] != "") {
        $close_wo = 1;
    }
    // if unassembling, negate quantity
    if ($_POST['ProductionType'] == 0) {
        $_POST['quantity'] = -$_POST['quantity'];
    }
    $id = work_order_produce($_POST['selected_id'], $_POST['ref'], $_POST['quantity'], $_POST['date_'], $_POST['memo_'], $close_wo);
    meta_forward($_SERVER['PHP_SELF'], "AddedID={$id}");
}
//-------------------------------------------------------------------------------------
display_wo_details($_POST['selected_id']);
//-------------------------------------------------------------------------------------
start_form();
hidden('selected_id', $_POST['selected_id']);
//hidden('WOReqQuantity', $_POST['WOReqQuantity']);
if (!isset($_POST['quantity']) || $_POST['quantity'] == '') {
    $_POST['quantity'] = max($wo_details["units_reqd"] - $wo_details["units_issued"], 0);
}
start_table();
ref_row(tr("Reference:"), 'ref', references::get_next(29));
if (!isset($_POST['ProductionType'])) {
    $_POST['ProductionType'] = 1;
}
yesno_list_row(tr("Type:"), 'ProductionType', $_POST['ProductionType'], tr("Produce Finished Items"), tr("Return Items to Work Order"));
text_row(tr("Quantity:"), 'quantity', $_POST['quantity'], 13, 15);
date_row(tr("Date:"), 'date_');
예제 #3
0
$id = find_submit('Delete');
if ($id != -1) {
    handle_delete_item($id);
}
if (isset($_POST['AddItem'])) {
    handle_new_item();
}
if (isset($_POST['UpdateItem'])) {
    handle_update_item();
}
if (isset($_POST['CancelItemChanges'])) {
    line_start_focus();
}
//-----------------------------------------------------------------------------------------------
if (isset($_GET['trans_no'])) {
    handle_new_order();
}
//-----------------------------------------------------------------------------------------------
display_wo_details($_SESSION['issue_items']->order_id);
echo "<br>";
start_form();
start_table(TABLESTYLE, "width=90%", 10);
echo "<tr><td>";
display_issue_items(_("Items to Issue"), $_SESSION['issue_items']);
issue_options_controls();
echo "</td></tr>";
end_table();
submit_center('Process', _("Process Issue"), true, '', 'default');
end_form();
//------------------------------------------------------------------------------------------------
end_page();