IF, you guys facing following issue on inserting a line of Item type : Service
Issue: it is the case when the code is trying to update the inventory for the item which is not stocked, particularly item of type SERVICE are not stocked item i.e. No inventory exist
Below code does that:
Since for Item of type service, there is no need to update the invent. So for this below is the resoultion, where we add a check if the item model associated with that item is checked ‘stocked’ or not
For further reference you can check ‘SalesLineType’ class ‘insert’ method.