Re: IM: Totals by document
You have a lot more to do than just set the document type.
Your post was not clear but I am assuming you are trying to import sales transactions using integration manager. You will need to not only change the document type but also change the value of the documents. See, GP stores all documents with positive numbers. So the total of a Return loaded in GP is a positive number.
The integration manager has the ability to run scripts against fields. Set the source of the Document Type field to Script and then open the details area where you can write the script you need. There are a number of sample scripts, including one that sets a value of a field based on the contents of the source document. Just what you need.
However, if your source documents (header and lines) have negative numbers on returns, you will need to create a formula for each value and take the Absolute value of the field or multiply it by -1 when appropriate to get positive values.
Check the sample scripts. I am sure the syntax on this is not 100% accurate but the lines should read something like
If SourceField(type)='RETURN then CURRENTFIELD = SourceField(lineunitprice) * -1;
or
IF SourceField(mytotal)<0 then CURRENTFIELD = SourceField(lineunitprice) * -1 else CURRENTFIELD = SourceField(lineunitprice);