web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

How to use internalsVisibleTo In "Tax Engine" to access fields from "Tax Component Summary" table in Tax Engine

(0) ShareShare
ReportReport
Posted on by 76

I'm trying to access "Tax Component Summary" table to get CGST and SGST values in the Sales Invoice Report. But when i try to use "Tax Component Summary" table in dataitem of the report extension, showing error as "Tax Component Summary" is inaccessible due to its protection level.

I'm unable to access the "Tax Component Summary" table because whose access Marked as "Internal".

Referring this document: Dynamics 365 Business Central: AL and the internalsVisibleTo property – Stefano Demiliani explains how to add our extension details like ID, name and Publisher in the source extension (Access = Internal) to access fields and its values.

But my problem is Tax Engine (having Tax Component Summary table) is the default extension in BC, how to add my extension details to the tax engine to access the "Tax Component Summary" table fields and its value.

I have the same question (0)
  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at
    RE: How to use internalsVisibleTo In "Tax Engine" to access fields from "Tax Component Summary" table in Tax Engine

    Hi,

    For calculating GST amount in Sales use the below logic.

    Clear(CGSTTotalAmount);
                        Clear(SGSTTotalAmount);
                        Clear(IGSTTotalAmount);
                        Clear(TotalInvoiceValue);
                        DetailedGSTLedgerEntry.RESET;
                        DetailedGSTLedgerEntry.SETCURRENTKEY("GST Component Code");
                        DetailedGSTLedgerEntry.SETRANGE("Document No.", "No.");
                        //DetailedGSTLedgerEntry.SETRANGE("Document Line No.", "Line No.");
                        DetailedGSTLedgerEntry.SETRANGE("Entry Type", DetailedGSTLedgerEntry."Entry Type"::"Initial Entry");
                        IF DetailedGSTLedgerEntry.FINDSET THEN BEGIN
                            REPEAT
                                IF DetailedGSTLedgerEntry."GST Component Code" = 'CGST' THEN BEGIN
                                    CGSTTotalAmount += -DetailedGSTLedgerEntry."GST Amount";
                                    //TotalGSTLinePercemntage += DetailedGSTLedgerEntry."GST %";
                                END;
                                IF DetailedGSTLedgerEntry."GST Component Code" = 'IGST' THEN BEGIN
                                    IGSTTotalAmount += -DetailedGSTLedgerEntry."GST Amount";
                                    //TotalGSTLinePercemntage += DetailedGSTLedgerEntry."GST %";
                                END;
                                IF DetailedGSTLedgerEntry."GST Component Code" = 'SGST' THEN BEGIN
                                    SGSTTotalAmount += -DetailedGSTLedgerEntry."GST Amount";
                                    //TotalGSTLinePercemntage += DetailedGSTLedgerEntry."GST %";
                                END;
                            UNTIL DetailedGSTLedgerEntry.NEXT = 0;
                        END;
    Regards
    Amit Sharma
    linkedin.com/in/amit-sharma-94542440/
    Press Yes if info is useful.
  • Dhiru@123 Profile Picture
    27 on at
    How to use internalsVisibleTo In "Tax Engine" to access fields from "Tax Component Summary" table in Tax Engine
    Hi Revathi,
    I'm stuck with the same issue
     
    Did you find solution for your problem? if yes, please reply back our solution.
     
    Thanks in advance :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,327

#2
Sumit Singh Profile Picture

Sumit Singh 2,734

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,599

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans