edit_button_cell("Edit" . $myrow['requisition_detail_id'], _("Edit"));
    delete_button_cell("Delete" . $myrow['requisition_detail_id'], _("Delete"));
    end_row();
}
end_table(1);
//-----------------------------------------------------------------------------------
start_table(TABLESTYLE2);
if ($selected_id != -1) {
    if ($Mode == 'Edit') {
        //editing an existing status code
        $myrow = get_requisition_detail($selected_id);
        $_POST['item_code'] = $myrow["item_code"];
        $_POST['purpose'] = $myrow["purpose"];
        $_POST['order_quantity'] = $myrow["order_quantity"];
        $_POST['estimate_price'] = $myrow["estimate_price"];
    }
    hidden('selected_id', $selected_id);
}
sales_local_items_list_row(_("Item :"), 'item_code', null, false, false);
text_row(_("Purpose :"), 'purpose', null, 50, 50);
$res = get_item_edit_info(get_post('item_code'));
$dec = $res["decimals"] == '' ? 0 : $res["decimals"];
$units = $res["units"] == '' ? _('kits') : $res["units"];
qty_row(_("Requisition Quantity:"), 'order_quantity', number_format2(1, $dec), '', $units, $dec);
amount_row(_("Estimate Price :"), 'estimate_price', null, null, null, 2);
hidden('requisitionid');
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
//------------------------------------------------------------------------------------
end_page();
Example #2
0
    text_row(_("Description:"), 'description', null, 50, 200);
    stock_categories_list_row(_("Category:"), 'category', null);
    submit_row('update_name', _("Update"), false, 'align=center colspan=2', _('Update kit/alias name'), true);
    end_row();
    end_table(1);
    display_kit_items($selected_kit);
    echo '<br>';
    start_table(TABLESTYLE2);
}
if ($Mode == 'Edit') {
    $myrow = get_item_code($selected_id);
    $_POST['component'] = $myrow["stock_id"];
    $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["stock_id"]));
}
hidden("selected_id", $selected_id);
sales_local_items_list_row(_("Component:"), 'component', null, false, true);
//	if (get_post('description') == '')
//		$_POST['description'] = get_kit_name($_POST['component']);
if (get_post('item_code') == '') {
    // new kit/alias
    if ($Mode != 'ADD_ITEM' && $Mode != 'UPDATE_ITEM') {
        $_POST['description'] = $props['description'];
        $_POST['category'] = $props['category_id'];
    }
    text_row(_("Description:"), 'description', null, 50, 200);
    stock_categories_list_row(_("Category:"), 'category', null);
}
$res = get_item_edit_info(get_post('component'));
$dec = $res["decimals"] == '' ? 0 : $res["decimals"];
$units = $res["units"] == '' ? _('kits') : $res["units"];
if (list_updated('component')) {