+//--------------------------------------------------------------------------------------------------
+
+function copy_from_cart()
+{
+ $cart = &$_SESSION['PO'];
+
+ $_POST['supplier_id'] = $cart->supplier_id;
+ $_POST['OrderDate'] = $cart->orig_order_date;
+ if ($cart->trans_type == ST_SUPPINVOICE)
+ $_POST['due_date'] = $cart->due_date;
+ $_POST['supp_ref'] = $cart->supp_ref;
+ $_POST['ref'] = $cart->reference;
+ $_POST['Comments'] = $cart->Comments;
+ $_POST['StkLocation'] = $cart->Location;
+ $_POST['delivery_address'] = $cart->delivery_address;
+ $_POST['tax_algorithm'] = $cart->tax_algorithm;
+}
+
+function copy_to_cart()
+{
+ $cart = &$_SESSION['PO'];
+
+ $cart->supplier_id = $_POST['supplier_id'];
+ $cart->orig_order_date = $_POST['OrderDate'];
+ if ($cart->trans_type == ST_SUPPINVOICE)
+ $cart->due_date = $_POST['due_date'];
+ $cart->reference = $_POST['ref'];
+ $cart->supp_ref = $_POST['supp_ref'];
+ $cart->Comments = $_POST['Comments'];
+ $cart->Location = $_POST['StkLocation'];
+ $cart->delivery_address = $_POST['delivery_address'];
+ if (isset($_POST['tax_algorithm']))
+ $cart->tax_algorithm = $_POST['tax_algorithm'];
+}