+ if (isset($_POST['Line'.$line_no.'Desc'])) {
+ $line_desc = $_POST['Line'.$line_no.'Desc'];
+ if (strlen($line_desc) > 0) {
+ $_SESSION['Items']->line_items[$line_no]->item_description = $line_desc;
+ }
+ }
+ }
+ return $ok;
+}
+
+function set_delivery_shipping_sum($delivery_notes)
+{
+
+ $shipping = 0;
+
+ foreach($delivery_notes as $delivery_num)
+ {
+ $myrow = get_customer_trans($delivery_num, 13);
+ //$branch = get_branch($myrow["branch_code"]);
+ //$sales_order = get_sales_order_header($myrow["order_"]);
+
+ //$shipping += $sales_order['freight_cost'];
+ $shipping += $myrow['ov_freight'];
+ }
+ $_POST['ChargeFreightCost'] = price_format($shipping);
+}
+
+
+function copy_to_cart()
+{
+ $cart = &$_SESSION['Items'];
+ $cart->ship_via = $_POST['ship_via'];
+ $cart->freight_cost = input_num('ChargeFreightCost');
+ $cart->document_date = $_POST['InvoiceDate'];
+ $cart->due_date = $_POST['due_date'];
+ $cart->Comments = $_POST['Comments'];