$_POST['date_'] = Today();
if (!is_date_in_fiscalyear($_POST['date_']))
$_POST['date_'] = end_fiscalyear();
$_POST['date_'] = Today();
if (!is_date_in_fiscalyear($_POST['date_']))
$_POST['date_'] = end_fiscalyear();
{
display_error(_("The entered date is not in fiscal year."));
return false;
}
// only check bom and quantites if quick assembly
{
display_error(_("The entered date is not in fiscal year."));
return false;
}
// only check bom and quantites if quick assembly
{
$quantity = $bom_item["quantity"] * $_POST['quantity'];
$qoh = get_qoh_on_date($bom_item["component"], $bom_item["loc_code"], $_POST['date_']);
{
$quantity = $bom_item["quantity"] * $_POST['quantity'];
$qoh = get_qoh_on_date($bom_item["component"], $bom_item["loc_code"], $_POST['date_']);
{
display_error(_("The work order cannot be processed because there is an insufficient quantity for component:") .
" " . $bom_item["component"] . " - " . $bom_item["description"] . ". " . _("Location:") . " " . $bom_item["location_name"]);
{
display_error(_("The work order cannot be processed because there is an insufficient quantity for component:") .
" " . $bom_item["component"] . " - " . $bom_item["description"] . ". " . _("Location:") . " " . $bom_item["location_name"]);
{
// if unassembling, check item to unassemble
$qoh = get_qoh_on_date($_POST['stock_id'], $_POST['StockLocation'], $_POST['date_']);
{
// if unassembling, check item to unassemble
$qoh = get_qoh_on_date($_POST['stock_id'], $_POST['StockLocation'], $_POST['date_']);
{
$id = add_work_order($_POST['wo_ref'], $_POST['StockLocation'], $_POST['quantity'],
{
$id = add_work_order($_POST['wo_ref'], $_POST['StockLocation'], $_POST['quantity'],
{
update_work_order($selected_id, $_POST['StockLocation'], $_POST['quantity'],
{
update_work_order($selected_id, $_POST['StockLocation'], $_POST['quantity'],
{
//the link to delete a selected record was clicked instead of the submit button
$cancel_delete = false;
// can't delete it there are productions or issues
{
//the link to delete a selected record was clicked instead of the submit button
$cancel_delete = false;
// can't delete it there are productions or issues
work_order_has_payments($selected_id))
{
display_error(_("This work order cannot be deleted because it has already been processed."));
$cancel_delete = true;
}
work_order_has_payments($selected_id))
{
display_error(_("This work order cannot be deleted because it has already been processed."));
$cancel_delete = true;
}
hidden('released', $_POST['released']);
hidden('released_date', $_POST['released_date']);
hidden('selected_id', $selected_id);
hidden('released', $_POST['released']);
hidden('released_date', $_POST['released_date']);
hidden('selected_id', $selected_id);
label_row(_("Reference:"), $_POST['wo_ref']);
label_row(_("Type:"), wo_types::name($_POST['type']));
label_row(_("Reference:"), $_POST['wo_ref']);
label_row(_("Type:"), wo_types::name($_POST['type']));
{
$_POST['units_issued'] = $_POST['released'] = 0;
ref_row(_("Reference:"), 'wo_ref', references::get_next(systypes::work_order()));
{
$_POST['units_issued'] = $_POST['released'] = 0;
ref_row(_("Reference:"), 'wo_ref', references::get_next(systypes::work_order()));
{
hidden('stock_id', $_POST['stock_id']);
hidden('StockLocation', $_POST['StockLocation']);
{
hidden('stock_id', $_POST['stock_id']);
hidden('StockLocation', $_POST['StockLocation']);
label_row(_("Item:"), $myrow["StockItemName"]);
label_row(_("Destination Location:"), $myrow["location_name"]);
label_row(_("Item:"), $myrow["StockItemName"]);
label_row(_("Destination Location:"), $myrow["location_name"]);
date_row(_("Date") . ":", 'date_');
date_row(_("Date Required By") . ":", 'RequDate', null, sys_prefs::default_wo_required_by());
}
date_row(_("Date") . ":", 'date_');
date_row(_("Date Required By") . ":", 'RequDate', null, sys_prefs::default_wo_required_by());
}
{
text_row_ex(_("Quantity:"), 'quantity', 12);
date_row(_("Date") . ":", 'date_');
{
text_row_ex(_("Quantity:"), 'quantity', 12);
date_row(_("Date") . ":", 'date_');
{
submit_cells('close', _("Close This Work Order"));
}
submit_cells('delete', _("Delete This Work Order"));
{
submit_cells('close', _("Close This Work Order"));
}
submit_cells('delete', _("Delete This Work Order"));