import batch and serial no

Discussion in 'Tally Developer' started by KUSHAL BAROT26, Feb 8, 2022.

    
  1. KUSHAL BAROT26

    KUSHAL BAROT26 New Member


    hello experts
    i need help regarding passing the purchase voucher entry how can i import the batch details using excel sheet.
    plz suggest me any sample code regarding this so that i can get the idea about this
    plz help
     



  2. Hi .. in the sample of Tally the same is given already you can use the same

    [Function: DateRange and TgtObject]

    10 : SET FILE LOG ON

    20 : NEW OBJECT : Voucher
    30 : SET : SVViewName : $$SysName:InvVchView

    40 : SET VALUE : Date : $$Date:"01-05-2010"
    50 : SET VALUE : VoucherTypeName : "Purchase Order"
    60 : SET VALUE : VoucherNumber : "xxx"
    70 : SET VALUE : PartyLedgerName : "Test Party"
    80 : SET VALUE : IsInvoice : Yes
    90 : SET VALUE : Reference : "Test"

    100 : INSERT COLLECTION OBJECT : LEDGER ENTRIES
    110 : SET VALUE : LedgerName : "Test Party"
    120 : SET VALUE : IsDeemedPositive : Yes
    130 : SET VALUE : Amount : -1000
    140 : SET TARGET : ..

    150 : INSERT COLLECTION OBJECT : INVENTORY ENTRIES
    160 : SET VALUE : StockItemName : "Item 1"
    170 : SET VALUE : IsDeemedPositive : No
    171 : SET VALUE : ActualQty : ($$TgtObject:($$AsQty:"10")) * -1
    172 : SET VALUE : BilledQty : ($$TgtObject:($$AsQty:"10")) * -1
    173 : SET VALUE : Rate : ($$TgtObject:($$AsRate:"100"))
    180 : SET VALUE : Amount : 1000

    190 : INSERT COLLECTION OBJECT : BATCH ALLOCATIONS

    ;; Field & Method of Type Due Date cannot accept values directly
    ;; and there was no Type casting function available like $$Date,
    ;; $$String, etc. This function has been introduced to convert
    ;; any Type to Date Range Type which can be imported to Field
    ;; of Type Due Date

    ;; DateRange Function accepts 3 parameters
    ;; i) Number of Days/Months/Weeks/Years or Date
    ;; ii) From Date
    ;; iii)Logical value denoting inclusion of current date

    ;; TgtObject Function evaluates the parameter in context of Target Object

    200 : SET VALUE : OrderDueDate : $$DateRange:"10 Days":($$TgtObject:$Date):True
    210 : SET VALUE : GodownName : "Main Location"
    220 : SET VALUE : BatchName : "Test"
    230 : SET VALUE : OrderNo : "Test"
    240 : SET VALUE : ActualQty : ($$TgtObject:($$AsQty:"10")) * -1
    250 : SET VALUE : BilledQty : ($$TgtObject:($$AsQty:"10")) * -1
    260 : SET VALUE : Rate : ($$TgtObject:($$AsRate:"100"))
    270 : SET VALUE : Amount : ($$TgtObject:($$AsAmount:"1000"))
    280 : SET TARGET : ..

    290 : INSERT COLLECTION OBJECT : ACCOUNTING ALLOCATIONS
    300 : SET VALUE : LedgerName : "Purchase"
    310 : SET VALUE : Amount : 1000
    320 : SET TARGET : ...

    330 : SET VALUE : PersistedView : ##SVViewName
    340 : CREATE TARGET
    350 : MSGBOX : "Status" : "Created a Purchase Order!!"
    360 : SET FILE LOG OFF
    370 : RETURN

    ;; End-of-File
     
    KUSHAL BAROT26 likes this.


  3. KUSHAL BAROT26

    KUSHAL BAROT26 New Member


    thank you sir for your suggestion:):)
     


  4. Happy Kumar Verma

    Happy Kumar Verma New Member


    Hello sir,
    Most welcome for getting support, I have an another question regarding this my question is that, how can i entered multiple batches with breakup of quantity from total quantity of inventory item, can share any idea for this.
    If you getting this then i am very thankful.
     
    gangstar likes this.


Share This Page