This is strange.
In my order import I use add_to_order() (sales/includes/ui/sales_order_ui.inc)
If I import an order with a Description that has a " in it I end up with
16" Plate Glass Blank
And if I enter the sales order by hand I get
16" Plate Glass Blank
Here is my code
include($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");
include_once($path_to_root . "/sales/includes/db/branches_db.inc");
include_once($path_to_root . "/sales/includes/db/customers_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_order_db.inc");
include_once($path_to_root . "/sales/includes/cart_class.inc");
include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc");
$cart = new Cart(30); // New Sales Order
$cart->customer_id = $customer['debtor_no'];
$cart->customer_currency = $customer['curr_code'];
$cart->Branch = $branch['branch_code'];
$cart->cust_ref = "osC Order # $oID";
$cart->Comments = $comments;
$cart->document_date = Today();
// $_POST['OrderDate'] = $cart->document_date;
$cart->sales_type = $customer['sales_type'];
$cart->ship_via = $branch['default_ship_via'];
$cart->deliver_to = $branch['br_name'];
$cart->delivery_address = $branch['br_address'];
$cart->phone = $branch['phone'];
$cart->email = $branch['email'];
$cart->freight_cost = $order_total['value'];
$cart->Location = $branch['default_location'];
$cart->due_date = Today();
$sql = "SELECT * FROM orders_products WHERE orders_id = $oID";
$result = mysql_query($sql, $osc);
$lines = array();
while ($prod = mysql_fetch_assoc($result)) {
add_to_order($cart, $prod['products_model'], $prod['products_quantity'], $prod['products_price'], $customer['pymt_discount']);
}
mysql_free_result($result);
// print_r($cart);
$order_no = add_sales_order($cart);
display_notification("Added Order Number $order_no");
What is funny, When I call add_to_order I do not pass the description, it gets pulled from the FA db.
confusing...
tom