示例#1
0
    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'])) {
    $_POST['quantity'] = qty_format(1, $_POST['stock_id'], $dec);
} else {
    $_POST['quantity'] = qty_format($_POST['quantity'], $_POST['stock_id'], $dec);
}
if (get_post('type') == WO_ADVANCED) {
    qty_row(_("Quantity Required:"), 'quantity', null, null, null, $dec);
    if ($_POST['released']) {
        label_row(_("Quantity Manufactured:"), number_format($_POST['units_issued'], get_qty_dec($_POST['stock_id'])));
    }
示例#2
0
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 'SA_WORKORDERCOST';
$path_to_root = "../..";
include_once $path_to_root . "/includes/session.inc";
page(_($help_context = "Costed Bill Of Material Inquiry"));
include_once $path_to_root . "/manufacturing/includes/manufacturing_ui.inc";
include_once $path_to_root . "/includes/manufacturing.inc";
include_once $path_to_root . "/includes/ui.inc";
include_once $path_to_root . "/includes/banking.inc";
include_once $path_to_root . "/includes/data_checks.inc";
check_db_has_bom_stock_items(_("There are no manufactured or kit items defined in the system."));
if (isset($_GET['stock_id'])) {
    $_POST['stock_id'] = $_GET['stock_id'];
}
if (list_updated('stock_id')) {
    $Ajax->activate('_page_body');
}
start_form(false, true);
start_table(TABLESTYLE_NOBORDER);
stock_manufactured_items_list_row(_("Select a manufacturable item:"), 'stock_id', null, false, true);
end_table();
br();
display_heading(_("All Costs Are In:") . " " . get_company_currency());
display_bom($_POST['stock_id']);
end_form();
end_page();
示例#3
0
    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()) {
    qty_row(tr("Quantity Required:"), 'quantity', 12);
    if ($_POST['released']) {
        label_row(tr("Quantity Manufactured:"), qty_format($_POST['units_issued']));
    }
    date_row(tr("Date") . ":", 'date_');
    date_row(tr("Date Required By") . ":", 'RequDate', null, sys_prefs::default_wo_required_by());
} else {
    qty_row(tr("Quantity:"), 'quantity', 12);
    date_row(tr("Date") . ":", 'date_');