Dataport Hitting Gen Journal Line as Purchase Journal

Hello,

I have created a dataport to hit the GNL Jrnl Line table 81 in Nav 5.0, I have it working correctly except for the amount. Since it is going to be a purchase journal it needs to be a negative amount. We are getting the information from our expense reporting program and I can not change it there. Is there a way to throw a bit of code at it to inverse the amount to a negative number and if it is a 0.00 charge to ignore it?

Any help is much appreviated.

Thanks!

Chuck

Object C/AL Editor in dataport and in OnAfterImportRecord trigger add this

IF Amount <> 0 THEN
VALIDATE(Amount, (-1) * Amount );

Thank you! That is awesome!

Is it possible to have the dataport ignore lines that have a 0.00 amount? So it would not create the entry in the purchase journal?

Thanks!

Chuck