- $cart->due_date = $_POST['delivery_date'];
- $cart->cust_ref = $_POST['cust_ref'];
- $cart->freight_cost = input_num('freight_cost');
- $cart->deliver_to = $_POST['deliver_to'];
- $cart->delivery_address = $_POST['delivery_address'];
- $cart->phone = $_POST['phone'];
- $cart->Location = $_POST['Location'];
- $cart->ship_via = $_POST['ship_via'];
-
+ if ($cart->trans_type == 10)
+ $cart->cash = $_POST['cash'];
+ if ($cart->cash) {
+ $cart->due_date = $cart->document_date;
+ $cart->phone = $cart->cust_ref = $cart->delivery_address = '';
+ $cart->freight_cost = 0;
+ $cart->ship_via = 1;
+ $cart->deliver_to = '';//$_POST['deliver_to'];
+ } else {
+ $cart->due_date = $_POST['delivery_date'];
+ $cart->cust_ref = $_POST['cust_ref'];
+ $cart->freight_cost = input_num('freight_cost');
+ $cart->deliver_to = $_POST['deliver_to'];
+ $cart->delivery_address = $_POST['delivery_address'];
+ $cart->phone = $_POST['phone'];
+ $cart->Location = $_POST['Location'];
+ $cart->ship_via = $_POST['ship_via'];
+ }