Follow up

Discussion in 'Tally Developer' started by kosi, May 21, 2021.

    
  1. kosi

    kosi Member


    Member

    Hello Learned Programmers
    I need help.
    i want the function to create sales entry by debiting all ledgers under ' SUNDRY DEBTORS' and crediting 'SALES LEDGER ACCOUNTS' but its giving error in the calculator panel. the sales ledger is credited correctly but ledgers under sundry debtors is my problem. the codes are below.
    pictures are attached
    please help me


    [#Menu: Gateway of Tally]

    Add : Item : "Multiple Sales Entry" : Alter : MultiSaleRep

    [Report : MultiSaleRep]

    Form : MultiSaleRep
    Object : Company

    ;Fetch Collection: Sales Support Ledgers Extract, Party Ledgers Extract


    [form:MultiSaleRep]
    Height:100% Screen
    Width:100% Screen
    Button:Refresh TDL
    Part:MultiSaleRepCrPart,MultiSaleRep
    On : Form Accept : yes : Form Accept
    On : Form Accept : yes : Call : CphSale BulkAutoEntry;MultipleSalesEntryFun

    ;;first part
    [Part:MultiSaleRepCrPart]
    Background:red
    Line:MultiSaleRepLinPartoneDate,MultiSaleRepLinPartone
    [Line:MultiSaleRepLinPartoneDate]
    Right Field:DatF,DatF1
    Local:Field:DatF:Info:""

    [Field:DatF]

    [Field:DatF1]
    ;Type : Date
    Use : Short Date Field
    ;Storage : Date
    ;Width:mad:@ShortWidth
    Skip:Yes

    [Line:MultiSaleRepLinPartone]
    Field:CrF,CrF1,CrF2
    Local:Field:CrF:Info:"Date"
    Local:Field:CrF1:Info:"Dr Ledger"
    Local:Field:CrF2:Info:"Cr Ledger"

    [field:CrF]
    Skip:Yes
    Space Left:5

    [field:CrF1]
    Space Left:3

    [Field:CrF2]



    [Collection:SalesLedgersColl]
    Title:List Of Sales Ledgers
    Type:ledger
    Child Of:$$GroupSales



    [Part:MultiSaleRep]
    Line:AmtLin,DebitLin
    Repeat:DebitLin:CphSalesCollection
    Scroll:Vertical
    Break On: $$IsEndOfList:$DebitLin1Storage;$PartyLedgerName


    [Collection: CphSalesCollection]

    Title : "Bulk Sales Entry"
    Type : CphSales BulkEntry : Company
    Child Of : ##SVCurrentCompany



    [line:AmtLin]
    Right Field:AmtLin
    Local:Field:AmtLin:Info:"Amount"
    [Field:AmtLin]
    Use:Short Name Field
    Align:Right

    [Line:DebitLin]
    Border:THICK BOX
    Field:DebitLin,Datefld,DebitLin1,CrLedFld
    Right Field:AmtField
    Local:Field:DebitLin:Info:"Dr"

    [Field:DebitLin]


    [Field:Datefld]
    Type : Date
    Use : Short Date Field
    Storage : Date


    [Field:DebitLin1]
    Type:String
    Width:mad:@ShortWidth
    Table:SundDebtLedgres,EndOfList
    Show Table:Always
    Storage:DebitLin1Storage


    ;;afsdfsgvsdgssssssssssssssssssssssssssssssssssssssssssssssssssssssss

    [Field:CrLedFld]
    Type:String
    Use:Name Field
    Table:SalesLedgersColl;,Endoflist
    Show Table:Always
    Storage:CrLedFldStorage
    Inactive : $$IsEndOfList:$DebitLin1Storage

    [Field:AmtField]
    Type:Amount
    Use:Amount Field
    Storage:Amount
    Inactive : $$IsEndOfList:$DebitLin1Storage





    [System:UDF]
    CphSales BulkEntry : Aggregate : 41071
    Date:Date:41072
    CrLedgerNameFldStorage:String:41073
    DebitLin1Storage:String:41074
    CrLedFldStorage:String:41075
    Amount:Amount:41076


    [Collection:SundDebtLedgres]
    Title:"List Of Sundry Debtors"
    Type:Group;Ledger
    ;Child Of:$$GroupSundryDebtors
    ;Belongs to : yes
    ;Format : $Name,30
    Align:Center






    ;[Function:MultipleSalesEntryFun]

    [Function: CphSale BulkAutoEntry]

    ;; Procedural Block

    Variable : CphDate : Date
    Variable : CphCrLedgerName : String
    Variable : CphDrLedgerName : String
    Variable : CphAmount : Amount

    Variable : Counter : Number: 1

    001 : Start Batch Post : 10
    005 : START PROGRESS : ($$NumItems:CphSalesCollection) : "Creating Vouchers" : @@CmpMailName : "Creating Sales Vouchers ..."
    007 : WALK COLLECTION : CphSalesCollection ;;Sales Info
    ;010 : SET : CphDate : $$Date:$Date
    010 : SET : CphDate :$Date


    020 : SET : CphCrLedgerName : $CrLedFldStorage
    030 : SET : CphDrLedgerName : $DebitLin1Storage


    040 : SET : CphAmount :$Amount



    060:NEW OBJECT : Voucher
    070: SET VALUE : Date : ##CphDate
    080:SET VALUE : VoucherTypeName : $$VchTypeSales
    080a:LOG : $$String:##CphDate




    120 : SET VALUE : Ledger Name : ##CphDrLedgerName
    140 : SET VALUE : IsDeemedPositive : "Yes"
    141 : SET VALUE : Amount : ##CphAmount * (-1) ;##CphAmount
    ;150 : SET TARGET : ..

    150a : LOG : $$String:##CphDrLedgerName

    ;----------------------------------------------------------------------------
    ;;Credit Entry
    160 : INSERT COLLECTION OBJECT : AllLedgerEntries
    ;160a: SET TARGET : LedgerEntries
    170 : SET VALUE : Ledger Name : ##CphCrLedgerName
    180 : SET VALUE : Amount : ##CphAmount ;##CphAmount
    190 : SET VALUE : IsDeemedPositive : "No"
    ;200 : SET TARGET : ..
    200a : LOG : $$String:##CphCrLedgerName


    220 : CREATE TARGET
    240 : END WALK
    260 : END PROGRESS
     


  2. gangstar

    gangstar Member


    Bro write a collection for sundry debtors filtering the ledgers

    [Field:DebitLin1]
    Type:String
    Width:mad:@ShortWidth
    Table:CustomerTable, EndOfList
    Show Table:Always
    Storage:DebitLin1Storage

    [Collection:CustomerTable]
    Type:Ledger
    Child Of:"Sundry Debtors"
    Belongs To:Yes

    have a nice day
     


  3. kosi

    kosi Member


    My brother, still not working.
    Your collection type is ledger.
    I need to select 'sundry debtors' (Group) at the field I'm pulling customer table( Table:CustomerTable) and u are using ledger collection there.

    I actually want to select sundry debtors at collection field and if say 10 ledgers are under sundry debtors, I want all the 10 ledgers debited automatically at once. in just one sales voucher captured.

    PROGRAMMERS, ANY IDEA ON HOW TO SOLVE THIS PROBLEM.
     
    Last edited: May 23, 2021



  4. you need to create function for that, then call the functions in above entry.
    Your form design will also be change, instead selecting ledger you have to select the group.
     


  5. kosi

    kosi Member



    Thanks so much my brother.
    Yes the problem is an idea of that function. My form design is selecting group and not ledger. U can see it bellow.


    [Collection:SundDebtLedgres]
    Title:"List Of Sundry Debtors"
    Type:Group;Ledger
    ;Child Of:$$GroupSundryDebtors
    ;Belongs to : yes
    ;Format : $Name,30
    Align:Center

    The problem is that special function creation. If u have sample function codes, it will help me a lot. The purpose is more like making a batch invoice codes.

    LEARNED PROGRAMMERS, ANY ONE WITH AN IDEA OF MAKING BATCH INVOICE CODES.
     


  6. kosi

    kosi Member



    ANY UPDATE ?
     


  7. kosi

    kosi Member



    Any update so far?
     


Share This Page