i want tdl for stock item master import

Discussion in 'General Discussions' started by rke, Apr 10, 2020.

    
  1. rke

    rke Member


    i want tdl stock item master import aatched xl file
     

    Attached Files:



  2. rke

    rke Member


    /************* StockItem Import ******************/

    [Report : GST Item Import]

    Form : GSTItem Updation
    Title : $$LocaleString:"Stock Item Master Import"
    Auto : Yes

    [Form : GSTItem Updation]

    No Confirm : Yes
    Space Top : 1
    Space Left : 1
    Space Right : 1
    Space Bottom : 1
    Option : Small Size Form
    Full Width : No
    Full Height : No
    Vertical Align : Centre

    Parts : GSTItem Updation Title, GSTItem Updation Details

    On : Form Accept : Yes : CALL : GSTItem Updation
    Button : GST Stockitem Template Button

    [Part : GSTItem Updation Title]

    Lines : GSTItem Updation , GSTItem Updation Info

    [Line : GSTItem Updation]

    Fields : Form Sub Title
    Space Bottom : 0.25
    Local : Field : Form Sub Title : Info : $$LocaleString:"Stock Item Import"

    [Line : GSTItem Updation Info]

    Field : Simple Field
    Space Bottom : 0.75
    Local : Field : Simple Field : Info : $$LocaleString:"(Only Specific Excel Format is Supported)"
    Local : Field : Simple Field : Full Width : Yes
    Local : Field : Simple Field : Align : Centre

    [Part : GSTItem Updation Details]

    Lines : GST Item Import Date, GST Item Import FileName, GST Item Import SheetName
    Local : Line : Default : Space Top : 1 MMS
    Local : Line : Default : Space Bottom : 1 MMS

    [Line : GST Item Import Date]

    Field : Medium Prompt, GST Item Import Date
    Local : Field : Medium Prompt : Info : "Applicable Date"

    [Field : GST Item Import Date]

    Use : Uni Date Field
    Set as : $$Date:"01-07-2017"

    [Line : GST Item Import FileName]

    Field : Medium Prompt, GST Item Import FileName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Import File Name (Excel) :"

    [Field : GST Item Import FileName]

    Use : Name Field
    Set as : "D:\Tally.ERP9\gst master\GSTStockItemMaster.xlsx"
    Width : @@NarrWidth
    Full Width : Yes

    [Line : GST Item Import SheetName]

    Field : Medium Prompt, GST Item Import SheetName
    Local : Field : Medium Prompt : Info : $$LocaleString:"Sheet Name:"

    [Field : GST Item Import SheetName]

    Use : Name Field
    Set as : "Sheet1"
    Width : @@NarrWidth
    Full Width : Yes

    [Collection : GST Item Import Excel]

    ODBC : "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + @@SLItemMasterExcelPath
    SQL : "Select * from [Sheet1$]"

    [Collection : GST Item Import Coll]

    Source Collection : GST Item Import Excel
    Fetch : *.*
    Compute : NSITEMNAME : $_1
    Compute : NSALIAS : $_2
    Compute : NSPARTNO : $_3
    Compute : NSDESCRIPTION : $_4
    Compute : NSUNDER : $_5
    Compute : NSCATEGORIES : $_6
    Compute : NSUNITS : $_7
    Compute : NSGSTApplicable : $_8
    Compute : NSHSNDesc : $_9
    Compute : NSHSNCode : $$Number:$_10
    Compute : NSCalculationtype : $_11
    Compute : NSTAXABILITY : $_12
    Compute : NSRevcharge : $_13
    Compute : NSNONGSTGoods : $_14
    Compute : NSIneligible : $_15
    Compute : NSValuationType : $_16
    Compute : NSSGSTRate : $$Number:$_17
    Compute : NSValuationType : $_18
    Compute : NSCGSTRate : $$Number:$_19
    Compute : NSValuationType : $_20
    Compute : NSIGSTRate : $$Number:$_21
    Compute : NSValuationType : $_22
    Compute : NSCess : $$Number:$_23
    Compute : NSTypeofsupply : $_24
    Compute : NSIncltax : $_25
    Compute : NSQuantity : $_26
    Compute : NSRatePer : $_27
    Compute : NSValue : $_18
    Format : $NSStockItemName
    Title : " List of Stockitem"

    ;;-------------- Item Creation

    [Function : GSTItem Updation]

    Variable : RCnt : Number
    Variable : CCnt : Number
    Variable : APTotRCount : Number : 2
    Variable : APFilePath : String
    Variable : SPShetName : String
    Variable : GSTItemName : String

    Variable : GSTItmGrp : String

    001 : Set : APFilePath : #GSTItemImportFileName
    005 : Set : SPShetName : #GSTItemImportSheetName

    010 : Open File : ##APFilePath : Excel : Read
    020 : Set Active Sheet : ##SPShetName

    022 : While : Not $$IsEmpty:($$FileReadCell:##APTotRCount:1)
    023 : Increment : APTotRCount
    024 : End While

    040 : Start Progress : ##APTotRCount : ##SVCurrentCompany : "GST Items Updation" : "Please Wait..."
    041 : Set : RCnt : 2

    042 : While : Not $$IsEmpty:($$FileReadCell:##RCnt:1)

    045 : Set : GSTItmGrp : $$FileReadCell:##RCnt:2
    G01 : If : $$IsEmpty:$Name:StockGroup:##GSTItmGrp
    G02 : Call: GSTItem Group
    G03 : End If

    U01 : If : $$IsEmpty:$Name:Unit:($$FileReadCell:##RCnt:3)
    U02 : Call: GSTItem Units
    U03 : End If

    044 : Set : GSTItemName : $$FileReadCell:##RCnt:1

    051 : NEW OBJECT : Stock Item : ##GSTItemName : Yes
    053 : Set Value : NAME : $$FileReadCell:##RCnt:1
    M45 : Log : ##GSTItemName
    055 : Set Value : Parent : $$FileReadCell:##RCnt:2
    057 : Set Value : BASEUNITS : $$FileReadCell:##RCnt:3

    059 : Set Value : GSTAPPLICABLE : " Applicable"
    061 : Set Value : GSTTYPEOFSUPPLY : If $$IsEmpty:$$FileReadCell:##RCnt:14 Then "" Else $$FileReadCell:##RCnt:14

    071 : INSERT COLLECTION OBJECT : GSTDETAILS
    073 : Set Value : APPLICABLEFROM : $$Date:#GSTItemImportDate
    075 : Set Value : CALCULATIONTYPE : "On Value"
    077 : Set Value : HSNCODE : If $$IsEmpty:$$FileReadCell:##RCnt:5 Then "" Else $$FileReadCell:##RCnt:5
    079 : Set Value : HSN : If $$IsEmpty:$$FileReadCell:##RCnt:4 Then "" Else $$FileReadCell:##RCnt:4
    081 : Set Value : TAXABILITY : If $$IsEmpty:$$FileReadCell:##RCnt:7 Then "" Else $$FileReadCell:##RCnt:7
    082 : Set Value : ISREVERSECHARGEAPPLICABLE : If $$IsEmpty:$$FileReadCell:##RCnt:8 Then "" Else $$FileReadCell:##RCnt:8
    083 : Set Value : ISNONGSTGOODS : If $$IsEmpty:$$FileReadCell:##RCnt:6 Then "" Else $$FileReadCell:##RCnt:6
    085 : Set Value : GSTINELIGIBLEITC : If $$IsEmpty:$$FileReadCell:##RCnt:9 Then "" Else $$FileReadCell:##RCnt:9
    087 : Set Value : InclusiveTax : If $$IsEmpty:$$FileReadCell:##RCnt:15 Then "" Else $$FileReadCell:##RCnt:15

    091 : INSERT COLLECTION OBJECT : STATEWISEDETAILS
    093 : Set Value : STATENAME : $$SysName:Any

    121 : INSERT COLLECTION OBJECT : RATEDETAILS
    123 : Set Value : GSTRATEDUTYHEAD : "State Tax"
    125 : Set Value : GSTRATEVALUATIONTYPE : "Based on Value"
    127 : Set Value : GSTRATE : If $$IsEmpty:$$FileReadCell:##RCnt:10 Then "" Else $$Number:($$FileReadCell:##RCnt:10)
    129 : Set Target : ..

    111 : INSERT COLLECTION OBJECT : RATEDETAILS
    113 : Set Value : GSTRATEDUTYHEAD : "Central Tax"
    115 : Set Value : GSTRATEVALUATIONTYPE : "Based on Value"
    117 : Set Value : GSTRATE : If $$IsEmpty:$$FileReadCell:##RCnt:11 Then "" Else $$Number:($$FileReadCell:##RCnt:11)
    119 : Set Target : ..

    095 : INSERT COLLECTION OBJECT : RATEDETAILS
    097 : Set Value : GSTRATEDUTYHEAD : "Integrated Tax"
    099 : Set Value : GSTRATEVALUATIONTYPE : "Based on Value"
    101 : Set Value : GSTRATE : If $$IsEmpty:$$FileReadCell:##RCnt:12 Then "" Else $$Number:($$FileReadCell:##RCnt:12)
    103 : Set Target : ..

    131 : INSERT COLLECTION OBJECT : RATEDETAILS
    133 : Set Value : GSTRATEDUTYHEAD : "Cess"
    135 : Set Value : GSTRATEVALUATIONTYPE : "Based on Value"
    137 : Set Value : GSTRATE : If $$IsEmpty:$$FileReadCell:##RCnt:13 Then "" Else $$Number:($$FileReadCell:##RCnt:13)
    139 : Set Target : ..
    150 : Set Target : ..
    151 : Set Target : ..

    160 : Alter Target

    166 : Increment : RCnt
    168 : Show Progress : ##RCnt
    170 : End While
    162 : Msg Box : "Message" : "GST Stock Item Master Imported Successfully !!!"

    ;; For Item Groups Creation

    [Function : GSTItem Group]

    Variable : GSTItemGroup : String

    051 : If : $$IsEmpty:$Name:StockGroup:($$FileReadCell:##RCnt:2)
    052 : Call : GSTItem Main Group
    053 : End If

    ;; For Item Main Groups Creation

    [Function : GSTItem Main Group]

    052 : New Object : Stock Group
    053 : Set Value : Name : $$FileReadCell:##RCnt:2
    054 : Set Value : ISADDABLE : "Yes"
    055 : Set Value : PARENT : " Primary"
    056 : Create Target

    ;; -------------- Unit Create

    [Function : GSTItem Units]

    062 : New Object : UNIT
    063 : Set Value : Name : $$FileReadCell:##RCnt:3
    064 : Set Value : ISSIMPLEUNIT : "Yes"
    065 : Create Target
     


  3. rke

    rke Member


    can any one correct this tdl as per xls file attached i am new in tdl
     


Share This Page