Jozef Pietruniak Posted July 22 Share Posted July 22 I've created some triggers that create a STATS entry whenever an OE Invoice is posted. I don't have any issues with the trigger until I enter the Quantity with 2 decimals. I get an error stating: Could not create GLBatch record. #GL-0951 Line No. 1 has more than two decimals in the transaction amount 2761.3800000000001091393642127513885498046875 [Support ID: T39E4EB002%7EZp59xP0B5m0-rxVWTdNCmgAAAA8] Could not create GLBatch record! 1 See detail and correct data. #PT00000112 I've attached my API. I tried adding Math.round({!SODOCUMENTENTRY.QUANTITY#value!}*100)/100 but that still does not fix the error. Any insight would be appreciated FBO SALES STATS CREATE ENTRY.txt Link to comment Share on other sites More sharing options...
Members Sterio, Louis Posted July 23 Members Share Posted July 23 @Jozef Pietruniak Im no javascript expert but try looking up how to use "float" and use that to round. Link to comment Share on other sites More sharing options...
Solution Jozef Pietruniak Posted July 25 Author Solution Share Posted July 25 My dev team assisted and suggested. <AMOUNT>#EVAL[ ((Math.round(Math.abs({!SODOCUMENTENTRY.QUANTITY#value!})*100)/100).toFixed(2)); ]</AMOUNT> This worked. Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts