+ $_POST['Comments'] = $cart->Comments;
+
+ $_POST['OrderDate'] = $cart->document_date;
+ $_POST['delivery_date'] = $cart->due_date;
+ $_POST['cust_ref'] = $cart->cust_ref;
+ $_POST['freight_cost'] = price_format($cart->freight_cost);
+
+ $_POST['deliver_to'] = $cart->deliver_to;
+ $_POST['delivery_address'] = $cart->delivery_address;
+ $_POST['phone'] = $cart->phone;
+ $_POST['Location'] = $cart->Location;
+ $_POST['ship_via'] = $cart->ship_via;
+
+ $_POST['customer_id'] = $cart->customer_id;
+
+ $_POST['branch_id'] = $cart->Branch;
+ $_POST['sales_type'] = $cart->sales_type;
+ // POS
+ if ($cart->trans_type == 10)
+ $_POST['cash'] = $cart->cash;
+ if ($cart->trans_type!=30) { // 2008-11-12 Joe Hunt
+ $_POST['dimension_id'] = $cart->dimension_id;
+ $_POST['dimension2_id'] = $cart->dimension2_id;
+ }
+ $_POST['cart_id'] = $cart->cart_id;
+
+}
+//--------------------------------------------------------------------------------
+
+function line_start_focus() {
+ global $Ajax;
+
+ $Ajax->activate('items_table');
+ set_focus('_stock_id_edit');
+}
+//--------------------------------------------------------------------------------
+
+function can_process() {
+ if (!is_date($_POST['OrderDate'])) {
+ display_error(_("The entered date is invalid."));
+ set_focus('OrderDate');