You've mentioned that,
@Eirik Morken - Proplan AS wrote:
This is kind of understandable as when you change the InventoryItem in the GUI the project is removed and set to null.
It appears being related to these following settings in the company where your integration working at,
If a supplier or inventory item used in the Purchase Order line and its "Expense Account" connected to a "Project Account Group" then the Non-Project "Project X" will not be automatically fetched, and we have to manually enter a "project" value.
This is OK when working in the Financials UI, but when using the API, especially with PUT > Line > Inventory, we are unable to set this value on the fly.
Therefore, you should check the following settings in the UI respectively,
Go to the ScreenId=IN202000 (Non-Stock Item) and open "Inventory: 99" (Assuming that this is a Non-Stock Item, "Man hours 50% overtimee")
Go to the General Ledger Accounts tab and check its Expense Account/s fields. (Taxable "4700" , "4710" is Non-taxable depending on the Company/Country Chart of accounts template etc)
Find the "Expense Accounts" (Taxable, non-taxable etc. depends on the process details)
Then go to the "Account Groups" page (ScreenId=PM2010PL)
It'll look like the image above if there aren't custom groups have been created.
Check "Expense" type groups by clicking on the GroupID in the list.
Search for the Group that contains those Expense Accounts registered under.
You'll either need to change the "expense account/s" of the Inventory which is associated with any Expense Type Account Group or remove those "Expense Accounts" from the Account Groups.
Once Inventory > Expense Accounts are not connected to any Account Groups, then the "Project" field will automatically be populated with Non-Project value as "X"
Otherwise, as we talked, one can delete the Line and Insert a new line again with the desired information
I hope this helps to clarify the situation.
... View more