Code(CheckLine) WITH GenJnlLine DO BEGIN IF EmptyLine THEN BEGIN LastDocType := "Document Type"; LastDocNo := "Document No."; LastLineNo := "Line No."; LastDate := "Posting Date"; EXIT; END; IF CheckLine THEN BEGIN IF OverrideDimErr THEN GenJnlCheckLine.SetOverDimErr; GenJnlCheckLine.RunCheck(GenJnlLine,TempJnlLineDim); END; IF "Currency Code" = '' THEN BEGIN Currency.InitRoundingPrecision; "Amount (LCY)" := Amount; "VAT Amount (LCY)" := "VAT Amount"; "VAT Base Amount (LCY)" := "VAT Base Amount"; END ELSE BEGIN Currency.GET("Currency Code"); Currency.TESTFIELD("Amount Rounding Precision"); IF NOT "System-Created Entry" THEN BEGIN "Source Currency Code" := "Currency Code"; "Source Currency Amount" := Amount; "Source Curr. VAT Base Amount" := "VAT Base Amount"; "Source Curr. VAT Amount" := "VAT Amount"; END; END; IF "Additional-Currency Posting" = "Additional-Currency Posting"::None THEN BEGIN [u][b]IF Amount <> ROUND(Amount,Currency."Amount Rounding Precision") THEN FIELDERROR( Amount, STRSUBSTNO(Text000,Amount));[/b][/u] IF "Amount (LCY)" <> ROUND("Amount (LCY)") THEN FIELDERROR( "Amount (LCY)", STRSUBSTNO(Text000,"Amount (LCY)")); END;
Comments
You are obviousbly trying to apply the credit not against a certain document. In your case you need to see how many decimal point the application currecny are set to as you will probably find that it will only apply to .00001 etc depending how you have it setup.
You can go to the GL entry to see what level of decimals it goes down to.
This obviously forces some kind of validate which the 'get posted document lines' did not do automatically as they are loaded.
Regards - Noeline