Exemplo n.º 1
0
    $_POST['date_'] = sql2date($myrow["date_"]);
    $_POST['RequDate'] = sql2date($myrow["required_by"]);
    $_POST['released_date'] = sql2date($myrow["released_date"]);
    $_POST['memo_'] = "";
    $_POST['units_issued'] = $myrow["units_issued"];
    $_POST['Costs'] = price_format($myrow["Costs"]);
    $_POST['memo_'] = get_comments_string(systypes::work_order(), $selected_id);
    hidden('wo_ref', $_POST['wo_ref']);
    hidden('units_issued', $_POST['units_issued']);
    hidden('released', $_POST['released']);
    hidden('released_date', $_POST['released_date']);
    hidden('selected_id', $selected_id);
    hidden('old_qty', $myrow["units_reqd"]);
    hidden('old_stk_id', $myrow["stock_id"]);
    label_row(tr("Reference:"), $_POST['wo_ref']);
    label_row(tr("Type:"), wo_types::name($_POST['type']));
} else {
    $_POST['units_issued'] = $_POST['released'] = 0;
    ref_row(tr("Reference:"), 'wo_ref', references::get_next(systypes::work_order()));
    wo_types_list_row(tr("Type:"), 'type', $_POST['type']);
}
if ($_POST['released'] == true) {
    hidden('stock_id', $_POST['stock_id']);
    hidden('StockLocation', $_POST['StockLocation']);
    hidden('type', $_POST['type']);
    label_row(tr("Item:"), $myrow["StockItemName"]);
    label_row(tr("Destination Location:"), $myrow["location_name"]);
} else {
    stock_manufactured_items_list_row(tr("Item:"), 'stock_id', null);
    locations_list_row(tr("Destination Location:"), 'StockLocation', null);
}
Exemplo n.º 2
0
     alt_table_row_color($k);
 }
 $modify_page = $path_to_root . "/manufacturing/work_order_entry.php?" . SID . "trans_no=" . $myrow["id"];
 $release_page = $path_to_root . "/manufacturing/work_order_release.php?" . SID . "trans_no=" . $myrow["id"];
 if ($myrow["closed"] == 0) {
     $issue = $path_to_root . "/manufacturing/work_order_issue.php?" . SID . "trans_no=" . $myrow["id"];
     $add_finished = $path_to_root . "/manufacturing/work_order_add_finished.php?" . SID . "trans_no=" . $myrow["id"];
     $costs = $path_to_root . "/gl/gl_payment.php?NewPayment=1&PayType=" . payment_person_types::WorkOrder() . "&PayPerson=" . $myrow["id"];
     $can_issue = $myrow["released"];
     $issue_link = $can_issue ? "<a href={$issue}>" . tr("Issue") . "</a></td>\n\t\t\t<td><a href={$add_finished}>" . tr("Produce") . "</a></td>\n\t\t\t<td><a href={$costs}>" . tr("Costs") . "</a>" : tr("Not Released");
 } else {
     $issue_link = "";
 }
 label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"]));
 label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"], $myrow["wo_ref"]));
 label_cell(wo_types::name($myrow["type"]));
 label_cell($myrow["location_name"]);
 view_stock_status_cell($myrow["stock_id"], $myrow["description"]);
 qty_cell($myrow["units_reqd"]);
 qty_cell($myrow["units_issued"]);
 label_cell(sql2date($myrow["date_"]));
 label_cell(sql2date($myrow["required_by"]));
 label_cell($myrow["closed"] ? tr("Yes") : tr("No"));
 if ($issue_link != "") {
     label_cell($issue_link);
 }
 if ($myrow["released"] == 0) {
     label_cell("<a href={$release_page}>" . tr("Release") . "</a>");
 }
 if ($myrow["closed"] == 0) {
     label_cell("<a href={$modify_page}>" . tr("Edit") . "</a>");