by manish » Tue Jan 24, 2012 10:06 am
Hello
Thanks for your reply..
here is my code to add set other refrence::
=======================================
$orderno = $client->Order_Create(array("debtorHandle" => $newDebtorHandle))->Order_CreateResult;
$client->Order_SetOtherReference(array('OrderHandle'=>$orderno, 'value' => '84'));
$orderline = $client->OrderLine_Create(array("orderHandle" => $orderno))->OrderLine_CreateResult;
$quantity = 1;
$description = "test desc";
$UnitCostPrice = 80;
$UnitNetPrice = 80;
$netamount = $quantity * $UnitNetPrice;
$newOrderHandle = $client->OrderLine_CreateFromData(array("data" => array(
"Handle" => $orderline,
'Id' => $orderline->Id,
'Number' => $orderline->Number,
'OrderHandle' => $orderno,
'Description' => $description,
'DeliveryDate' => date('Y-m-d\TH:i:s'),
'ProductHandle' => $productHandle,
'Quantity' => $quantity,
'UnitNetPrice' => $UnitNetPrice,
'DiscountAsPercent' => 0,
'UnitCostPrice' => $UnitCostPrice,
'TotalNetAmount' => $UnitNetPrice,
'TotalMargin' => 0,
'MarginAsPercent' => 0
)))->OrderLine_CreateFromDataResult;
But i have got a some exception warning so m not able to add
order as well as other refrence field.
Can u please check this code & let me know where is the mistake.
one thing i also want to tell u "if i do create order without refrence then it
will create but when i set otherrefrence then if
can't add orders.
Please do reply m in trouble.
Thanks
manish