HSN and SAC Codes list

Discussion in 'Free Source Codes' started by teja varma, Dec 22, 2019.

    
  1. teja varma

    teja varma Active Member


    Hello people,
    Hope it is useful..

    Predefined collection of HSN and SAC codes
    I collected these codes from internet and made a xml collection with them

    hsnandsac.PNG

    Download the xmlfiles.rar attached below
    unzip the file and place them in tally folder (Working directory)


    Code:

    Code:
    [Collection:HsnCodesXmlCollection]
        Data Source:File XML :"HsnData.xml"
        XML Object Path : DATA : 1 :ROOT
        Client Only:Yes
    
    [Collection:SACCodesXmlCollection]
        Data Source:File XML :"SacData.xml"
        XML Object Path : DATA : 1 :ROOT
        Client Only:Yes
    
    [#Field:GST ClassfnMst Code]
        Table:HsnTableColl,SacTableColl,NotApplicable
        Show Table:On Empty
    
    
    ;;if you dont want hsn codes then remove Hsntablecoll
    
    ;;if you dont want sac codes then remove SacTableColl
    
    [Collection:HsnTableColl]
    Title:$$LocaleString:"List of Hsn/Sac Codes"
    Align:Right
    Full Height:Yes
    Source Collection:HsnCodesXmlCollection
    Fetch :Hsn
    Format:$Hsn,25
    
    
    [Collection:SacTableColl]
    Title:$$LocaleString:"List of Hsn/Sac Codes"
    Align:Right
    Full Height:Yes
    Source Collection:SACCodesXmlCollection
    Fetch :Sac
    Format:$Sac,25
    
    

    You can create a collection to add HSN codes ,If you want to add HSN code manually
    then add that collection to HSN table.
     

    Attached Files:

    Last edited: Dec 22, 2019
    Frz and tejeet like this.


  2. tejeet

    tejeet Member


    dear sir,

    thanks for sharing very useful code for hsn & sac code list , please keep on sharing codes
     


  3. tejeet

    tejeet Member


    dear sir,

    can you share / develop code for city as per below for me, please email me on tejeet1@gmail.com

    [​IMG]
     


  4. ASHOK

    ASHOK Member


    [System : UDF]
    udfLedCity : String : 20001 ;; Ledger City

    ; City Master

    [#Menu : Accounts Info.]
    Add : Key Item : After : @@locLedgers : "City" : Y : Menu : VIT City Menu

    [Menu : VIT City Menu]
    Title : $$LocaleString:"City Master"
    Indent : "Single City"
    Item : BLANK
    Key Item : @@locCreate : C : Create Collection : List of ExtractCostCategories : @Allowed AND $$Allow:Create:AccountsMasters
    Key Item : @@locDisplay : D : Display Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Display:AccountsMasters
    Key Item : @@locAlter : A : Alter Collection : List of ExtractCostCategories : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Alter:AccountsMasters
    Item : BLANK
    ;Indent : "Multiple City"
    ;Item : BLANK
    ;Key Item : @@locCreate : R : Create : Multi Cost Category : @Allowed AND $$Allow:Create:AccountsMasters
    ;Key Item : @@locDisplay : I : Display Collection : Multi Cost Category : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Display:AccountsMasters
    ;Key Item : @@locAlter : T : Alter Collection : Multi Cost Category : @Allowed AND $$NumCostCategories > 0 AND $$Allow:Alter:AccountsMasters
    ;Item : BLANK
    Key Item : @@locQuit : Q
    Allowed : $$IsAccountingOn:$$CurrentSimpleCompany

    [#Collection : List of ExtractCostCategories]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary

    [#Collection : Cost Category]
    Title : $$LocaleString:"List of Cities"
    Filter : NoPrimary

    [System : Formula]
    NoPrimary : $Name <> $$PrimaryCostCategory

    [#Report : SCostCategory]
    Title : $$LocaleString:"Select City"
    Local : Field: MV Title : Info : $$LocaleString:"Name of City"

    [System : Formula]
    MultCostCatCreateModeFormat : $$LocaleString:"Multi City %s %s"

    [#Report : Cost Category]
    Title : $$LocaleString:"City" + @@ModeName + @@SubModeName

    [#Form : Cost Category]
    Delete : Top Parts : CSTCAT Behaviour

    [#Form : Multi Cost Category]
    Width : 100% Screen

    [#Part : MCSTCAT Body]
    Delete : Lines : MCSTCAT Secondary Titles

    [#Line : MCSTCAT Main Titles]
    Delete : Right Fields : MCSTCAT Allocation Title

    [#Field : MCSTCAT Name Title]
    Info : $$LocaleString:"Name of City"

    [#Line : MCSTCAT Body]
    Delete : Right Fields : CSTCAT ForRevenue, CSTCAT ForNonRevenue

    [Collection : MyCity]
    Type : Cost Category
    Fetch : *
    IsOdbcTable : Yes

    ; Ledger

    [#Part : LED Mailing Address]
    Add : Bottom Line : Before : LEDState : lnCityUDF

    [#Field : LED Mailing Address]
    Set Always : Yes

    [Line : lnCityUDF]
    Field : Medium Prompt,fldCityUDF
    Local : Field : Medium Prompt : Set as : "City"
    Local : Field : Medium Prompt : Inactive : NOT @@IsDebtorCreditor

    [Field : fldCityUDF]
    Use : Name Field
    Storage : udfLedCity
    Max : 40
    Table : Cost Category,Not Applicable
    Show Table : Always
    Key : Create Cost Category
    Style : Small Bold
    Inactive : NOT @@IsDebtorCreditor
     
    Frz likes this.


  5. tejeet

    tejeet Member


    Code:
    [Collection:HsnCodesXmlCollection1]
        Data Source:File XML :"HsnData1.xml"
        XML Object Path : DATA : 1 :ROOT
        Client Only:Yes
    
    [#Field:GST ClassfnMst desc]
        Table:HsnTableColl1,NotApplicable
        Show Table:On Empty
    
    
    ;;if you dont want hsn codes then remove Hsntablecoll
    
    ;;if you dont sac codes then remove SacTableColl
    
    [Collection:HsnTableColl1]
    Title:$$LocaleString:"List of Hsn/Sac Descriptions"
    Align:Right
    Full Height:Yes
    Source Collection:HsnCodesXmlCollection1
    Fetch :Hsn
    Format:$Hsn,25
    
    dear teja verma sir,

    on basis of your code, i have created another code for hsn description , which is working fine, but now i want to co- relate both code for hsn description & hsn code , if are select particular hsc description than it should select pre assign hsc code from hsn code list & auto fill hsn code & go to next tab, so please help to link both code, my codes for hsn description is as follows :
     


  6. teja varma

    teja varma Active Member


    nice
    but,where are the xml files for description??
     


  7. tejeet

    tejeet Member


    dear teja verma sir,

    on basis of your code, i have created another code for hsn description , which is working fine, but now i want to co- relate both code for hsn description & hsn code , if are select particular hsc description than it should select pre assign hsc code from hsn code list & auto fill hsn code & go to next tab, so please help to link both code, my codes for hsn description is as follows ,

    Download the HSNDATA1.xml files attached below, unzip the file
    and place them in tally folder (Working directory)

    You can create a collection to add HSN description ,If you want to add HSN code manually
    then add that collection to HSN description table.

    Code:
    [Collection:HsnCodesXmlCollection1]
        Data Source:File XML :"HsnData1.xml"
        XML Object Path : DATA : 1 :ROOT
        Client Only:Yes
    
    [#Field:GST ClassfnMst desc]
        Table:HsnTableColl1,NotApplicable
        Show Table:On Empty
    
    
    ;;if you dont want hsn codes then remove Hsntablecoll
    
    ;;if you dont sac codes then remove SacTableColl
    
    [Collection:HsnTableColl1]
    Title:$$LocaleString:"List of Hsn/Sac Descriptions"
    Align:Right
    Full Height:Yes
    Source Collection:HsnCodesXmlCollection1
    Fetch :Hsn
    Format:$Hsn,25
    
     

    Attached Files:



  8. gangstar

    gangstar Member


    Sir where we want to paste the hsn/sac.xml data
     


  9. teja varma

    teja varma Active Member


    in the tally folder(working directory)
     
    gangstar likes this.


  10. teja varma

    teja varma Active Member


    first you need to link descriptions with hsn/sac codes
    in the xml files i provided add '<DESC>description</DESC>' under each corresponding <HSN> tag like below..

    Code:
    <DATA>
    <HSN>12345678></HSN>
    <DESC>Description></DESC>
    </DATA>
    then you need desc also along with hsn and show description table at description field
    after entering description get the hsn code from collection by filtering out then desc collection with above entered description
    thats it....
     


  11. Frz

    Frz Member


    Small issue
    There are some codes with "0"before them
    like cheese is 0406.....

    Rgds
    Frz
     


  12. teja varma

    teja varma Active Member


    you have two ways to do that:
    1) you can write a script in any language to remove leading zero from hsc and sac from the xml files that i provided
    or
    2) you can use $$StringReplace function in tally to remove leading zero from hsn code but first you have to check weather there is a zero at beginning or not for this you can use $$StringPart function in tally
     


  13. tejeet

    tejeet Member


    dear sir,

    please develop & share the codes for linking hsn description with hsn code
     


  14. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Dear Tajeet,
    Just Try To Learn.
    This Is The Best Way.:)
     


  15. NiravMerchant

    NiravMerchant Active Member


    HI I have updated the code with HSN/SAC code along with Description, Kindly download and copy the attached file into tally folder - Xl and Module File
    Kindly check and revert
     


  16. NiravMerchant

    NiravMerchant Active Member


    Pls find the file
     

    Attached Files:

    tejeet likes this.


  17. sattam

    sattam Active Member


    As we entered hsn code from the table the description field should auto filed with description of that hsn code
     


  18. tejeet

    tejeet Member


    dear Nirav,
    i have copy hsn excel file in tally working folder, but tdl is not working, so please check & revert back
     


  19. Jenny

    Jenny Active Member


    Where is "XML" file?
     


  20. tejeet

    tejeet Member


    i have copy hsndata.xml file in tally working folder, but tdl is not working, so please check & revert back[/QUOTE]
     


  21. NiravMerchant

    NiravMerchant Active Member


    i hope all r tally developer
    i have posted 2 files one is zip file which u have to unzip and u will get xl file kindly copy the same in tally installed folder and add the add-on in tally product and feature

    it shd run

    even if any query i have shared the text file of add-on ?

    some body asking where is XML?
     


  22. teja varma

    teja varma Active Member



  23. Rohit Khedar

    Rohit Khedar Member


    I have 13000/ HSN with Desc but how to set this tipe if i set one by one so more time
    so tell plz any formula in xml so i can create minimum time
     


  24. teja varma

    teja varma Active Member


    see the Nirav Merchant's Code (above)
     


  25. Rohit Khedar

    Rohit Khedar Member


    i want this type as not Nirav Merchant

    <DATA>
    <HSN>12345678></HSN>
    <DESC>Description></DESC>
    </DATA>[/CODE]
     


Share This Page