include_once($path_to_root . "/sales/includes/sales_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_types_db.inc");
include_once($path_to_root . "/reporting/includes/reporting.inc");
-
$js = '';
if ($use_popup_windows) {
global $Ajax;
$Ajax->activate('items_table');
- $Ajax->addFocus(true, '_stock_id_edit');
set_focus('_stock_id_edit');
}
//--------------------------------------------------------------------------------
set_focus('delivery_date');
return false;
}
- if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
+ //if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
+ if (date1_greater_date2($_POST['OrderDate'], $_POST['delivery_date'])) {
display_error(_("The requested delivery date is before the date of the order."));
set_focus('delivery_date');
return false;
input_num('qty'), input_num('price'),
input_num('Disc') / 100 );
}
- copy_from_cart();
line_start_focus();
}
if (isset($_POST['AddItem']))
handle_new_item();
-if (isset($_POST['CancelItemChanges']) || isset($_POST['UpdateItem'])) {
+if (isset($_POST['CancelItemChanges'])) {
line_start_focus();
}
-if (isset($_POST['_customer_id_update']))
- set_focus('branch_id');
//--------------------------------------------------------------------------------
check_db_has_stock_items(_("There are no inventory items defined in the system."));