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

Answered: Creating Order_lines for Order in .net

$
0
0
Hi Kalpana,

You cannot set the cost price on the order line explicitly - it's automatically determined by your product's cost price (Product.CostPrice). That, however, you are free to change - that is, unless you're using our Stock Management add-on module, in which case product cost prices are maintained automatically (in connection with purchases being registered).

As a comment to your code, I believe you're setting the wrong sales price: You're setting the ('default') sales price of the product, rather than the unit net price on the order line. What you'd probably like to do is something like:

_orderLine.UnitNetPrice = Product.SalesPrice
or
_orderLine.UnitNetPrice = saleprice

- depending on whether you wish to explicitly set a specific sales price, or pick up the default sales price set up on the product master information.

 

Best regards,

Viewing all articles
Browse latest Browse all 2527

Trending Articles