Quantcast
Channel: e-conomic Global API Forum
Viewing all articles
Browse latest Browse all 2527

Problem with costprice on OrderLines

$
0
0
I use the api call OrderLine_CreateFromData to create an orderline. I set the following data.

$data = array(
            "Handle"            => a handle,
            'Id'                =>  and id,
            'Number'            =>  a number,
            'OrderHandle'       =>  a handle,
            'Description'       => "abc",
            'DeliveryDate'      => a date,
            'ProductHandle'     => a handle,
            'Quantity'          => 1,
            'UnitNetPrice'      => 1000,
            'DiscountAsPercent' => 0,
            'UnitCostPrice'     => 100.50,
            'TotalNetAmount'    => 1000,
            'TotalMargin'       => 0,
            'MarginAsPercent'   => 0
        );

 

The orderline is created but the costprice is always 0.

I have read in other posts that stock management causes the costprice to be locked. But this account does not use this. I can with no problem open the interface and change the costprice. But what am I doing wrong in the API call?

Viewing all articles
Browse latest Browse all 2527

Trending Articles