Example #1
0
    $_POST['Costs'] = price_format($myrow["additional_costs"]);
    $_POST['memo_'] = get_comments_string(ST_WORKORDER, $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(_("Reference:"), $_POST['wo_ref']);
    label_row(_("Type:"), $wo_types_array[$_POST['type']]);
    hidden('type', $myrow["type"]);
} else {
    $_POST['units_issued'] = $_POST['released'] = 0;
    ref_row(_("Reference:"), 'wo_ref', '', $Refs->get_next(ST_WORKORDER));
    wo_types_list_row(_("Type:"), 'type', null);
}
if (get_post('released')) {
    hidden('stock_id', $_POST['stock_id']);
    hidden('StockLocation', $_POST['StockLocation']);
    hidden('type', $_POST['type']);
    label_row(_("Item:"), $myrow["StockItemName"]);
    label_row(_("Destination Location:"), $myrow["location_name"]);
} else {
    stock_manufactured_items_list_row(_("Item:"), 'stock_id', null, false, true);
    if (list_updated('stock_id')) {
        $Ajax->activate('quantity');
    }
    locations_list_row(_("Destination Location:"), 'StockLocation', null);
}
if (!isset($_POST['quantity'])) {
Example #2
0
    $_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);
}
if (!isset($_POST['quantity'])) {
    $_POST['quantity'] = qty_format(1);
}
if ($_POST['type'] == wo_types::advanced()) {