Return Item Sales Order - Please Help

Hi, We have a process that reads a number of sales orders from an input file and creates the relevant sales order related data and immediately posts the sales orders. We now need the ability to post a returned item sales order in the same manner. I have set up the sales order so that it’s SalesType is ReturnItem, set SalesLine.SalesQty, SalesType.SalesPrice, SalesLine.LineAmount, SalesLine.RemainInventPhysical and SalesLine.RemainSalesPhysical to negative values. I have also set the returnActionId and CostPrice. The process fails to post, with the following error: Posting Sales order: 00193575_SO Item number: Minimum Charge Illegal sign for update quantity in the stock Update has been cancelled. This error origonates in \Classes\InventMovement\checkUpdatePhysical, on line 12. I cant figure out how to set the sales order up so that it does not fail. I am urgently looking for a solution to this and any help would be greatly appreciated! Thanks in advance, Matt