Import Payment Voucher from Excel to Tally via ODBC but it is not taking the multiple billallocation

Discussion in 'Tally Integration' started by Rohin, Dec 2, 2013.

    
?

/* Import Payment Voucher from Excel to Tally via ODBC but it is not taking the multiple bill allo.

  1. 1. Bill Allocation in payment Entry

    0 vote(s)
    0.0%
  2. 2. Bill Allocation in payment Entry against 2 bill number.

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. Rohin

    Rohin New Member


    /* Import Payment Voucher from Excel to Tally via ODBC but it is not taking the multiple bill allocations, Please Help me and also correct the code also.
    It is taking the 1st batch allocation but the send one is not showing. And also the type is showing 'New ref' but it should be show 'Agst Ref.' Because i am declaring in this code is 'Agst Ref.' */

    [#Menu : Gateway Of Tally]
    Add : Key Item : At End : Excel To Tally : E : CALL : Test

    [Function : Test]
    0001 : Call : Test1

    [Function : Test1]
    ;Variable : Counter : Number

    001 : Walk Collection : VouOdbcColl

    002 : If : $VchType = "Payment"

    003 : New Object : Voucher
    004 : Set Value : Date : $$Date:(($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date
    005 : Set Value : VoucherNumber : $VchNum
    006 : Set Value : VoucherTypeName : $VchType
    007 : Set Value : Effectivedate : $$Date:(($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date
    007A : Set value : Narration : $VchNarr

    008 : Walk Collection : DrLedColl
    009 : Insert Collection Object : Ledger Entries
    010 : Set Value : LedgerName : $TSLedger
    ;;010A: MSG BOX : "DR LED" : $TSLedger
    011 : Set Value : IsDeemedPositive : Yes
    ;;011A: MSG BOX: "DR AMOUNT" : $TSDebitAmt
    012 : Set Value : Amount : -1 * $$AsAmount:$TSDebitAmt

    ;0188 : Walk Collection : DrbillallColl
    ;004549 : Accept Object : Ledger Entries
    178 : Insert Collection Object : BillAllocations
    ;00 : SET : Counter : 0
    177 : Set Value : BILLTYPE : "Agst Ref"
    176 : Set Value : Name : $TSAgstNo
    179 : Set Value : AMOUNT : -1 * $$AsAmount:$TSAgstAmt
    ;01 : INCREMENT : Counter
    ;02 : Return
    0181 : Set Target : ..
    01856561 : Set Target : ..

    0189 : End Walk


    015 : Walk Collection : CrLedColl
    016 : Insert Collection Object : Ledger Entries
    017 : Set value : LedgerName : $TSLedger
    018 : Set value : IsDeemedPositive : No
    019 : Set Value : Amount : $$AsAmount:$TSCreditAmt
    020 : Set Target : ..
    021 : End Walk

    022 : Create Target
    023 : MSG Box : "Led" : "Payment Voucher is Created"
    024 : End If

    102 : If : $VchType = "Receipt"

    103 : New Object : Voucher
    104 : Set Value : Date : $$Date:(($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date
    105 : Set Value : VoucherNumber : $VchNum
    106 : Set Value : VoucherTypeName : $VchType
    107 : Set Value : Effectivedate : $$Date:(($$StringPart:$TSDate:8:2 +"/"+ $$StringPart:$TSDate:5:2 + "/"+$$StringPart:$TSDate:0:4));;"1-Apr-2012";;$Date
    107A : Set value : Narration : $VchNarr

    108 : Walk Collection : CrLedColl
    109 : Insert Collection Object : Ledger Entries
    110 : Set Value : LedgerName : $TSLedger
    ;;010A: MSG BOX : "DR LED" : $TSLedger
    111 : Set Value : IsDeemedPositive : No
    ;;011A: MSG BOX: "DR AMOUNT" : $TSDebitAmt
    112 : Set Value : Amount : $$AsAmount:$TSCreditAmt
    ;113 : Set Target : ..
    ;114 : End Walk
    ;004 : Walk Collection : BillColl

    180 : Set Target : ..
    158 : End Walk


    115 : Walk Collection : DrLedColl
    116 : Insert Collection Object : Ledger Entries
    117 : Set value : LedgerName : $TSLedger
    118 : Set value : IsDeemedPositive : Yes
    119 : Set Value : Amount : -1 * $$AsAmount:$TSDebitAmt
    120 : Set Target : ..
    121 : End Walk

    122 : Create Target
    123 : MSG Box : "Led" : "Receipt Voucher is Created"
    124 : End If

    125 : End Walk

    [Collection: BillAllocations]
    Type : Voucher
    Fetch : *, BillAllocations.*

    [Collection: VouOdbcColl]
    ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls"
    SQL : "Select * From [Sheet2$]"
    Sql Object : StkItemOdbcObj
    ;Filter : UnFilter

    [Collection: DrLedColl]
    ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls"
    SQL : "Select * From [Sheet2$]"
    Sql Object : StkItemOdbcObj
    Filter : DrLedFilter
    ;Filter : BillAlcFilter

    [Collection: CrLedColl]
    ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls"
    SQL : "Select * From [Sheet2$]"
    Sql Object : StkItemOdbcObj
    Filter : CrLedFilter

    [Collection: DrbillallColl]
    ODBC : "Driver= {Microsoft Excel Driver (*.xls)};DBQ= D:\TDL_FILES\Tdl Files\BlackLaptop\item.xls"
    SQL : "Select * From [Sheet2$]"
    Sql Object : StkItemOdbcObj
    Filter : BillAlcFilter



    [Object : StkItemOdbcObj]
    TSDate : $_1
    VchNum : $_2
    VchType: $_3
    TSLedger : $_4
    TSAgstNo: $_5
    TSAgstAmt: $_6
    TSDebitAmt : $_7
    TSCreditAmt : $_8
    VchNarr : $_9
    VchNum1: $_10
    [System: Formula]

    DrLedFilter :$VchNum = $$ReqObject:$VchNum And Not $$IsEmpty:$TSDebitAmt
    CrLedFilter :$VchNum = $$ReqObject:$VchNum And Not $$IsEmpty:$TSCreditAmt
    BillAlcFilter : Not $$IsEmpty:$TSAgstAmt ANd $VchNum = $$ReqObject:$VchNum
     

    Attached Files:



  2. vyadav

    vyadav Member


    Same problem in Credit Note Import , how to solve this problem

     


Share This Page