on 01-26-2005 6:28 PM
hye, I have created a delivery from a sales order and all is ok. So, If I put less quantity in severals items, the delivery is generated ok and the sales order is OPEN status.
Now , I want to generate a delivery from sales order, but I don´t want to include in my delivery all sales order's items. For example, if I have in my sales order four items (Itm1,Itm2,Itm3,Itm4) with theirs quantity, by SDK I want to generate the Delivery with Itm2 and Itm3 only. I can't do that. I hate It,jajajajajaja.
With the next FOR, I get do it with all Items but I don´t know to say it that when status = 0 "jump" this item.
delivery.CardCode = Order.CardCode
delivery.DocDueDate = Order.DocDueDate
delivery.DocDate = Order.DocDate
For i = 0 To Order.Lines.Count - 1
delivery.Lines.BaseType = 17
delivery.Lines.BaseEntry = Order.DocEntry
Status = 1
If Status <> 0 Then
delivery.Lines.BaseLine = place
If i <> Order.Lines.Count - 1 Then
delivery.Lines.Add
place = place + 1
End If
End If
Next
retval = delivery.Add
Thanks and I hope to get a solution.
What is "it" that you cannot do (+ hate)???
What is "status"? LineStatus???
What is your problem when you try to skip an item?
PS: You should always use enums instead of hard-coded values e.g.: Use the BoAPARDocumentTypes Enumeration for delivery.Lines.BaseType
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.