LS Retail Statement Post - Error with VAT Setup

voyager99
Member Posts: 15
Hi,
i hope that one of yours can help me, or can give a hint.
There are many Transactions with Trans. Sales Entries in the database.
The Statements are calculated.
At the Beginning of Posting, for example Line 2 of Statement Line, i get following Error.
The VAT Setup doesnt exist.
VAT Bus Group '', BLANK, VAT Prod. code = '' BLANK.
The Items are complete, the Customers are complete, the Store card hast Gen Bus Group and VAT Bus Group. ](*,)
Have anyone an idea :?: :idea:
LS Retail 4.0 - No PlusPOS, POS-Import 3-party-appl.
Thanks
voy
At least the info, in this database there are three companies, in two it works correct, without an error. Sames Objects ... ?
i hope that one of yours can help me, or can give a hint.
There are many Transactions with Trans. Sales Entries in the database.
The Statements are calculated.
At the Beginning of Posting, for example Line 2 of Statement Line, i get following Error.
The VAT Setup doesnt exist.
VAT Bus Group '', BLANK, VAT Prod. code = '' BLANK.
The Items are complete, the Customers are complete, the Store card hast Gen Bus Group and VAT Bus Group. ](*,)
Have anyone an idea :?: :idea:
LS Retail 4.0 - No PlusPOS, POS-Import 3-party-appl.
Thanks
voy
At least the info, in this database there are three companies, in two it works correct, without an error. Sames Objects ... ?
0
Answers
-
The VAT Bus.Posting Group comes from Transaction Header table during posting of a statement. The transaction header "Bus.Posting Group" gets populated from Store."Store VAT Bus. Post. Gr.".
It looks like when the transaction were inserted the store was not setup.
You need to fix the transaction header table and populate the fields.
Usually these fields are blank if you are using sales tax.0 -
Hi ara3n,
my the store card was setup with "Store VAT Bus. Post. Gr".
And all Trans. Header have an "VAT Bus. Rel. Grp.".
And all Items, where used while posting have gen.prod.grp. and vat prod.grp..
any other ideas ?
Voy
Is there a limit with quantity of trans. in one Statement ?0 -
the code for posting statement in CU 9900457 is in here
IF Transaction."To Account" THEN BEGIN GenPostingSetup.GET(CustomerRec."Gen. Bus. Posting Group",Item."Gen. Prod. Posting Group"); END ELSE BEGIN GenPostingSetup.GET(Store."Store Gen. Bus. Post. Gr.",Item."Gen. Prod. Posting Group"); END; VATPostingSetup.GET(Transaction."VAT Bus.Posting Group",Item."VAT Prod. Posting Group");
Turn on the debugger and see where the error stops. Post the code in here.0 -
btw, No there is no limit. Well there is a limit; the harddisk on your system.0
-
Hi, i´ve turned on the debugger
InitVat() WITH GenJnlLine DO IF "Gen. Posting Type" <> 0 THEN BEGIN // None ##### at this line stops the debugger ! #### VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group"); TESTFIELD("VAT Calculation Type",VATPostingSetup."VAT Calculation Type"); CASE "VAT Posting" OF "VAT Posting"::"Automatische MwSt.-Buch.": BEGIN GLEntry."Gen. Bus. Posting Group" := "Gen. Bus. Posting Group"; GLEntry."Gen. Prod. Posting Group" := "Gen. Prod. Posting Group"; GLEntry."VAT Bus. Posting Group" := "VAT Bus. Posting Group"; GLEntry."VAT Prod. Posting Group" := "VAT Prod. Posting Group"; GLEntry."Reason Code" := "Reason Code"; //LS4.0 GLEntry."Tax Area Code" := "Tax Area Code"; GLEntry."Tax Liable" := "Tax Liable"; GLEntry."Tax Group Code" := "Tax Group Code"; GLEntry."Use Tax" := "Use Tax"; CASE "VAT Calculation Type" OF "VAT Calculation Type"::"Normale MwSt.": BEGIN IF "VAT Difference" <> 0 THEN BEGIN GLEntry.Amount := "VAT Base Amount (LCY)"; GLEntry."VAT Amount" := "Amount (LCY)" - GLEntry.Amount; GLEntry."Additional-Currency Amount" := "Source Curr. VAT Base Amount"; IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Curr. VAT Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr(GLEntry."VAT Amount"); END ELSE BEGIN GLEntry.Amount := ROUND("Amount (LCY)" / (1 + VATPostingSetup."VAT %" / 100)); GLEntry."VAT Amount" := "Amount (LCY)" - GLEntry.Amount; GLEntry."Additional-Currency Amount" := ROUND( "Source Currency Amount" / (1 + VATPostingSetup."VAT %" / 100), AddCurrency."Amount Rounding Precision"); IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Currency Amount" - GLEntry."Additional-Currency Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr(GLEntry."VAT Amount"); END; END; "VAT Calculation Type"::Erwerbsbesteuerung: CASE "Gen. Posting Type" OF "Gen. Posting Type"::Einkauf: BEGIN IF "VAT Difference" <> 0 THEN BEGIN GLEntry."VAT Amount" := "VAT Amount (LCY)"; IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Curr. VAT Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr(GLEntry."VAT Amount"); END ELSE BEGIN GLEntry."VAT Amount" := ROUND(GLEntry.Amount * VATPostingSetup."VAT %" / 100); AddCurrGLEntryVATAmt := ROUND( GLEntry."Additional-Currency Amount" * VATPostingSetup."VAT %" / 100, AddCurrency."Amount Rounding Precision"); END; END; "Gen. Posting Type"::Verkauf: BEGIN GLEntry."VAT Amount" := 0; AddCurrGLEntryVATAmt := 0; END; END; "VAT Calculation Type"::"Nur MwSt.": BEGIN CASE "Gen. Posting Type" OF "Gen. Posting Type"::Verkauf: BEGIN VATPostingSetup.TESTFIELD("Sales VAT Account"); TESTFIELD("Account No.",VATPostingSetup."Sales VAT Account"); END; "Gen. Posting Type"::Einkauf: BEGIN VATPostingSetup.TESTFIELD("Purchase VAT Account"); TESTFIELD("Account No.",VATPostingSetup."Purchase VAT Account"); END; END; GLEntry.Amount := 0; GLEntry."Additional-Currency Amount" := 0; GLEntry."VAT Amount" := "Amount (LCY)"; IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Currency Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr("Amount (LCY)"); END; "VAT Calculation Type"::Verkaufssteuer: BEGIN IF ("Gen. Posting Type" = "Gen. Posting Type"::Einkauf) AND "Use Tax" THEN BEGIN GLEntry."VAT Amount" := ROUND( SalesTaxCalculate.CalculateTax( "Tax Area Code","Tax Group Code","Tax Liable", "Posting Date","Amount (LCY)",Quantity,0)); GLEntry.Amount := "Amount (LCY)"; END ELSE BEGIN GLEntry.Amount := ROUND( SalesTaxCalculate.ReverseCalculateTax( "Tax Area Code","Tax Group Code","Tax Liable", "Posting Date","Amount (LCY)",Quantity,0)); GLEntry."VAT Amount" := "Amount (LCY)" - GLEntry.Amount; END; GLEntry."Additional-Currency Amount" := "Source Curr. VAT Base Amount"; IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Curr. VAT Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr(GLEntry."VAT Amount"); END; END; END; "VAT Posting"::"Manuelle MwSt.-Buch.": BEGIN IF GenJnlLine."Gen. Posting Type" <> GenJnlLine."Gen. Posting Type"::Ausgleich THEN BEGIN GLEntry."Gen. Bus. Posting Group" := "Gen. Bus. Posting Group"; GLEntry."Gen. Prod. Posting Group" := "Gen. Prod. Posting Group"; GLEntry."VAT Bus. Posting Group" := "VAT Bus. Posting Group"; GLEntry."VAT Prod. Posting Group" := "VAT Prod. Posting Group"; GLEntry."Tax Area Code" := "Tax Area Code"; GLEntry."Tax Liable" := "Tax Liable"; GLEntry."Tax Group Code" := "Tax Group Code"; GLEntry."Use Tax" := "Use Tax"; GLEntry."VAT Amount" := "VAT Amount (LCY)"; IF "Source Currency Code" = GLSetup."Additional Reporting Currency" THEN AddCurrGLEntryVATAmt := "Source Curr. VAT Amount" ELSE AddCurrGLEntryVATAmt := CalcLCYToAddCurr("VAT Amount (LCY)"); END; END; END; END; GLCalcAddCurrency(GLEntry."Additional-Currency Amount",TRUE);
Here is my code, but it is default code of LS Retail 4.0.
The GenJnlLine REC have no VAT Gen Bus code and no VAT Prod Grp. Code! In the Posting Buffer in Codeunit 99001457 there ist no VAT Gen Bus code and no VAT Prod Grp., too. :?:
This error is only with one tender type !
Where is the mistake in my tender type (setup) :-ken
Voy0 -
Ok here is what I think the problem is. You have on the tender type setup a GL Account No. THe GL Account No. doesn't have the
"VAT Bus. Posting Group"
"VAT Prod. Posting Group"
Please fix the GL account you should be set.
Go to the store card. find the store. click on store button and select tender type. click on posting tab and lookup into the gl account. Go to GL card and make sure it has the correct setup.
Also if you have a difference GL account No on tender type that it is setup correctly also.
If that's not the case. do turn on the debugger and it will stop at the same place. paste the Call Stack in here.0 -
Hi,
i have checked the GL Accounts in the other companies. there were no Posting Type an no gen bus grp, and so on.
Then i searched for the point, if the Posting Buffer loses the data of VAT Bus Post. Grp and VAT Prod. Post. Grp.
It was in the trigger in cu statement post, where the tender type ist NOT Customer, then there is a validate of the GL Account. :-k
I cleared the Fields in the GL Account on the register Posting and the posting of the statement have no error. \:D/
Thanks for your help.
Voy0 -
Great. I wish LS retail puts some more meaningful error in their code.
It sucks to look at code to figure out what is not setup.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions