How to Generate Automatic Entries?

Discussion in 'Tally Developer' started by Sohail Khan, Apr 21, 2021.

    
  1. Sohail Khan

    Sohail Khan Member


    Dear Experts,
    Kindly Guide me how to Generate Automatic Cash Expenses Based on this Report.
    Is there any sample available for it?

    [​IMG]
     


  2. Sohail Khan

    Sohail Khan Member


    Code:
    [Function: Create_Vouchers]
    
    ;;VariableBlock
        Variable    : CashLedger    : String
        Variable    : CashAmount    : Amount
        Variable    : VchType        : String
        Variable    : VchCostCentre    : String
        Variable    : VchDate        : Date   
        Variable    : VCHAmount        : Amount
        Variable    : VoucherTypeName    : String
    
    
    
        01    : SET FILE LOG ON
        02    : WALK COLLECTION    : Unloading
    
        30  :   SET             : SVViewName         : $$SysName:AcctgVchView
        35  :   SET                : SV VoucherType    : $$VchTypePayment
        40    :     NEW OBJECT        : Voucher
        50    :     SET VALUE        : Date                : $Date
        70    :     SET VALUE        : VoucherTypeName    : $$VchTypePayment
    
        80    :     INSERT COLLECTION OBJECT            : LedgerEntries
        100    :    SET VALUE        : LedgerName        : "Unloading Charges (Purchase Inward)"
        110    :     SET VALUE        : Is Deemed Positive: "YES"
        120    :     SET VALUE        : Amount            : $$Negative:$MYAmount
        130    :     SET TARGET        : ..
    
        140    :     INSERT COLLECTION OBJECT            : LedgerEntries
        150    :     SET TARGET        : LedgerEntries
        160    :    SET VALUE        : LedgerName        : "Cash"
        170    :     SET VALUE        : Is Deemed Positive: "NO"
        180    :     SET VALUE        : Amount            : $MYAmount
        190    :     SET TARGET        : ..
        200 :   SET VALUE       : PersistedView     : ##SVViewName
        205    :     End Walk
        210    :     CREATE TARGET
    
        260    : RETURN
    I am only Able to Create One Entry With this, the Last Date Entry is being created. Please Help me Experts.
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In ERP9 have a look at the Code of Multi-master creation.........

    Have a look at the Function it calls at the end of FORM and you will get your idea for the above.
     


  4. Sohail Khan

    Sohail Khan Member


    Thank you amit sir. I used data source selected lines and now it is working
     


Share This Page