How single-line Journal Entry gets distributed into 2 in GL
knm
Member Posts: 170
Hi,
I'm trying to find out how the single-line Journal Entry is being distributed into 2 GL Entry in NAV.
Is there a specific Codeunit that is handling this logic? Or is it some function within a Codeunit?
Thank you.
Kenji
I'm trying to find out how the single-line Journal Entry is being distributed into 2 GL Entry in NAV.
Is there a specific Codeunit that is handling this logic? Or is it some function within a Codeunit?
Thank you.
Kenji
0
Comments
-
Hi Kenji,
SplitJnlLine() in CU 12 does this. It gets called in the Code() function AFAIR.
with best regards
Jens
---
I am here: http://maps.google.com/maps?ll=52.523624,13.3760790 -
Hi Jens,
Thank you so much for your respnse.
I looked in the CU12, and couldn't find the SplitJnlLine() that you mentioned.
I'm currently looking at my demo database in NAV2009R2 NA.
Let me know if localized version has different logic. (which is less likely for G/L...)
Thank you.
Kenji0 -
If you look at CU 12 in the Code function you will see the code:
IF "Account No." <> '' THEN CASE "Account Type" OF "Account Type"::"G/L Account": PostGLAcc; "Account Type"::Customer: PostCust; "Account Type"::Vendor: PostVend; "Account Type"::"Bank Account": PostBankAcc; "Account Type"::"Fixed Asset": PostFixedAsset; "Account Type"::"IC Partner": PostICPartner; END; IF "Bal. Account No." <> '' THEN BEGIN ExchAccGLJnlLine.RUN(GenJnlLine); IF "Account No." <> '' THEN CASE "Account Type" OF "Account Type"::"G/L Account": PostGLAcc; "Account Type"::Customer: PostCust; "Account Type"::Vendor: PostVend; "Account Type"::"Bank Account": PostBankAcc; "Account Type"::"Fixed Asset": PostFixedAsset; "Account Type"::"IC Partner": PostICPartner; END; END;This code posts to the acct and then to the balancing acct thus two entries.
the SplitJnlLine function is part of codunit 22 Item Jnl. Post Line
Steve0 -
Hi Steve,
Thank you for the clarification.
I took a look a the code, and understood how the lines are getting split.
And now I have another question with regards to this, do you know how the 2nd line is inheriting the Dimensions that were assigned to the 1st line.
As an example, I took a look at the "PostGLAcc()", and couldn't find where it is defined.WITH GenJnlLine DO BEGIN // Post G/L entry InitGLEntry( "Account No.","Amount (LCY)", "Source Currency Amount",TRUE,"System-Created Entry"); IF NOT "System-Created Entry" THEN IF "Posting Date" = NORMALDATE("Posting Date") THEN GLAcc.TESTFIELD("Direct Posting",TRUE); GLEntry."Gen. Posting Type" := "Gen. Posting Type"; GLEntry."Bal. Account Type" := "Bal. Account Type"; GLEntry."Bal. Account No." := "Bal. Account No."; GLEntry."No. Series" := "Posting No. Series"; IF "Additional-Currency Posting" = "Additional-Currency Posting"::"Additional-Currency Amount Only" THEN BEGIN GLEntry."Additional-Currency Amount" := Amount; GLEntry.Amount := 0; END; InitVat; IF (GLEntry.Amount <> 0) OR (GLEntry."Additional-Currency Amount" <> 0) OR ("VAT Calculation Type" <> "VAT Calculation Type"::"Sales Tax") THEN InsertGLEntry(TRUE); PostJob; PostVAT; END;
Thank you!
Kenji0 -
Hi Kenji,
I didn't remember correctly
When you take a look in CU366 Exchange Acc. G/L Journal Line, you'll see that all operations are done on the same record. The associated dimensions for this record are already copied into TempJnlLineDims and don't get changed, they are valid for the whole line.
with best regards
Jens0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions