Excel Import Nor working properly

Discussion in 'Tally Integration' started by Partha Mondal, Aug 7, 2019.

    
  1. Partha Mondal

    Partha Mondal Member


    Dear all

    I am new in tdl. Code is working. All the Excel field is imported successful but Voucher Number field is not imported.

    Can anybody help me...


    ;;-------------- Om Sai Ram

    [#Menu : Gateway of Tally]
    Add : Item : Before : @@locQuit : "IMPORT RECEIPT......" : Call : Receipt Import ;;TO ADD MENU ITEM FOR IMPORTING THE LEDGERS

    [Variable : Receipt SVExcelPath]

    Type : String
    Default : ""
    Persist : Yes

    [System : Variable]

    Receipt SVExcelPath : ""

    [System : Formula]

    ReceiptExcelFilePath : "D:\ImportVouchers.xls"

    [Collection : Excel Receipt]

    ODBC : "Driver={Microsoft Excel Driver (*.xls)};DBQ= " + @@ReceiptExcelFilePath
    SQL : "Select * from [RECEIPTVCH$]"

    [Collection : Receipt Import]

    Source Collection : Excel Receipt
    Fetch : *.*

    Compute : RPDate : $_1
    Compute : RPNarration : $_2
    Compute : RPDebitName : $_3
    Compute : RPDebitAmt : $_4
    Compute : RPCreditName : $_5
    Compute : RPCreditAmt : $_6
    Compute : RPVoucherNo : $_7

    [System : Formula]


    RPDate : $$Date:(($$StringPart:$RPDate:8:2) + "-" + +
    ($$StringPart:$RPDate:5:2) + "-" + +
    ($$StringPart:$RPDate:0:4))


    [Function : Receipt Import]

    Variable : ProgressCount : Number
    Variable : Counter : Number
    Variable : VoucherTypeName : String
    Variable : RPVoucherNo : Number

    Variable : RPDate : Date
    Variable : RPDebitName : String
    Variable : RPDebitAmt : Amount
    Variable : RPCreditName : String
    Variable : RPCreditAmt : String
    Variable : RPNarration : String

    00 : Set : Counter : 0
    10 : Query Box : "Import Receipt Voucher ?":Yes:No
    20 : SET : ProgressCount : 1

    30 : IF : NOT ($$NumItems:ReceiptImport> 0)
    40 : RETURN
    50 : END IF

    60 : START PROGRESS : ($$NumItems:ReceiptImport) : "Importing" : " Receipt Vouchers"

    70 : SET : SVViewName : $$SysName:AccVchView

    90 : If : $$LastResult

    80 : Walk Collection : ReceiptImport

    101 : Set : RPDate : $$String:$RPDate
    102 : Set : RPDebitName : $$String:$RPDebitName
    103 : Set : RPDebitAmt : $$String:$RPDebitAmt
    107 : Set : RPCreditName : $$String:$RPCreditName
    108 : Set : RPCreditAmt : $$String:$RPCreditAmt
    113 : Set : RPNarration : $$String:$RPNarration
    114 : Set : RPVoucherNo : $$String:$RPVoucherNo

    120 : NEW OBJECT : Voucher

    129 : Set Value : VoucherNumber : ##RPVoucherNo
    130 : SET VALUE : Date : @@RPDate
    140 : SET VALUE : VoucherTypeName : $$VchTypeReceipt
    150 : Set Value : PARTYLEDGERNAME : ##RPDebitName
    155 : Set Value : NARRATION : ##RPNarration

    160 : SET VALUE : ISINVOICE : No

    170 : Insert Collection Object: Ledger Entries

    180 : SET TARGET : LedgerEntries
    190 : SET VALUE : LEDGERNAME : ##RPDebitName
    200 : SET VALUE : Amount : ##RPDebitAmt
    210 : SET VALUE : ISDEEMEDPOSITIVE : "No"

    220 : Set Target : ..

    230 : Insert Collection Object: Ledger Entries

    240 : SET TARGET : LedgerEntries
    250 : SET VALUE : LEDGERNAME : ##RPCreditName
    260 : SET VALUE : Amount : ##RPCreditAmt
    265 : SET VALUE : ISDEEMEDPOSITIVE : "Yes"

    330 : SET VALUE : PersistedView : ##SVViewName
    340 : CREATE TARGET
    350 : SHOW PROGRESS : ##ProgressCount
    360 : SET : ProgressCount : ##ProgressCount + 1
    380 : END WALK
    385 : Increment : Counter
    390 : Msg Box : "Status" : "Receipt Vouchers Imported \n successfully!!! "
    370 : End If
    400 : Return
     

    Attached Files:



  2. Vijay Shetye

    Vijay Shetye Member


    Please Check whether Voucher Number is set to Manual Numbering is Voucher Type Master if it set as automatic the no voucher number will not be posted
     


Share This Page