What i am trying is :
I am trying to do a partial invoicing , so what i did is i have added two fields in purchParmLine: 1)InvoiceAmount 2)InvoiceAmountRemainder. 1st will have the amount we need to invoice and the second field will have the remainder and both the fields will enabled only when my item is service type item and recieve now field in purchParmLine is 1.
So now when i have a single quantity in PurchLine its working fine. When i have multiple items (say 10) , so i explicitly make the recieve now field in purchParmLine as 1 so that my field is enabled and i go on with partial invoicing for that item. When i make partial invoicing i am inserting 3 lines in Purchline 1st with quantity as 9 with net amount of 9 items, 2nd with 1 quantity and net amount as what i have invoiced and purchStatus as Invoiced and 3rd line with quantity as 1 and net amount as remainder we need to invoice for and purchStatus as OpenOrder.
The problem is:
In the quantity tab of PurchLine i will get an ordered field as 9 for 1st line but i am not able to get the ordered field for the 3rd line, so when i go for invoice second time it throws me an error.
i hope i am clear with what i am trying to do. Please help.[:(]