MUltiple Entry

Discussion in 'Free Source Codes' started by CHANDRESH GAUR, Feb 17, 2020.

    

  1. Dear Experts ,

    I am making an tdl regarding Auto-entry From sales Voucher..In narration Part I am added 1 logical field
    after yes it will upon a subform in which in selecting ledger & amount then Auto-entry of journal will passsed.. its working , but when i am repeating ledger name line ,, i.e. if i want to pass multiple entry it will not work..


    Pls check this


    [#Part: DBLLINE Narration]
    Add : Line : Before : Vch Narrprompt : RENT
    [Line: RENT]

    Left Fields : Medium Prompt,VCH rentPass
    Local : Field : Medium Prompt : Set as :"PASS ENTRY : "

    [Field: VCH rentPass]
    Use : Logical Field
    Storage : rentPass
    Set Always : Yes
    Show Table : always
    Sub Forms : Vch rent Info :$$Value
    [Report: VchRentInfo]
    Forms : Vch rent Info
    [Form: VchRentInfo]
    Top Parts : Vch rent Info
    Height: 45% page
    width: 55 % page
    On : Form Accept : Yes : Form Accept
    On : Form Accept : Yes : CALL : RentVchCreate

    [Part: Vch rent Info]
    Top Lines : RENTLED;,RAMT
    Local : Line : Default : Space top : 1
    ;Repeat:RENTLED:cl
    Scroll:Vertical
    Break On:$$IsEmpty:$RAMT
    [Line: RENTLED]
    Left Fields : Medium Prompt,Name Field
    Right Field:amt
    Local : Field : Medium Prompt : Set as :" RTO LEDGER :"
    Local : Field : Name Field : Table : INCM,end of list
    Local : Field : Name Field : Storage:LEDE1
    Local : Field : Name Field : Show Table : Always

    [Field:amt]
    Use:amount field
    Set as:$$Value
    Storage:RAMT

    [System: UDF]
    rentPass : Logical:902:yes
    LEDE1 : String:9011:yes
    RAMT : Amount:10068:yes
    cl:Aggregate:10075

    [Collection: INCM]
    Type: Ledger
    ;ChildOf: $$GroupIndirectExpenses
    BelongsTo: Yes
    Title:"LEDGER"

    [Function: RentVchCreate]

    Variable : COMMLEDGER : String
    Variable : PartyAmount : Amount
    Variable:BROKER:String
    Variable:VCH:String
    Variable:DT:Date
    010 : Set : COMMLEDGER : $PARTYNAME
    020 : Set : PartyAmount : $RAMT
    030:Set:BROKER:$LEDE1;$LEDE1
    030W:Set:VCH:$VOUCHERNUMBER
    045A:Set:DT:$DATE

    10a : New Object:voucher
    20a : SET : SVViewName : $$SysName:AcctgVchView
    30a : SET VALUE : PersistedView : ##SVViewName
    33a : Set Value : VOUCHERNUMBER : 45
    40a : Set Value : Date : $$date:$DATE;"1.5.2014"
    50a : Set Value : VOUCHERTYPENAME : $$VchTypeJournal
    60a : Set Value : PARTYLEDGERNAME : ##COMMLEDGER
    70a : Insert Collection Object:ALLLEDGERENTRIES
    80a : Set Value : LEDGERNAME : ##COMMLEDGER
    90a : Set Value : ISDEEMEDPOSITIVE : No
    100 : Set Value : ISPARTYLEDGER : Yes
    110 : Set Value : AMOUNT : ##PartyAmount;$$AsAmount:1*-1
    170 : Insert Collection Object:BILLALLOCATIONS
    180 : Set Value : NAME : ##VCH
    190 : Set Value : BILLTYPE : "AGST REF"
    200 : Set Value : AMOUNT : ##PartyAmount;$$AsAmount:1*-1
    210 : Set Target:...
    220 : Insert Collection Object:ALLLEDGERENTRIES
    230 : Set Value : LEDGERNAME : ##BROKER
    240 : Set Value : ISDEEMEDPOSITIVE : Yes
    250 : Set Value : AMOUNT : ##PartyAmount;$$AsAmount:1
    260 : Set Target:..
    270 :CREATE TARGET
    370: Do If:$$LastResult:Msg Box:"Status":" Voucher Created Successfully!!"
     


  2. kosi

    kosi Member


    Solution needed for this code please
     


Share This Page