Tally Chapter 104 TDL for Bulk Payment Entry By Rajiv Mishra Computer Class

 TDL CODE









--------------CODE STARTS HERE -------------------



[#Menu: Gateway of Tally]   

   

    Add    : Item   : "Bulk Payment Entry" : Alter : CphSales EntryRpt

   

    [Report : CphSales EntryRpt]

       

        Form    : CphSales EntryFrm

        Title   : $$LocaleString:"Bulk Payment Entry"

        Object    : Company

       

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

       

               

        [Form : CphSales EntryFrm]

           

            Part         : Form SubTitle, CphSales CrLedPrt, CphSales DrLedPrt

            Width        : 100% Page

            Height        : 100% Page

            Space Left    : 0.25

            Space Right    : 0.25   

            Horizontal Align: Left

           

            Local        : Field    : Form SubTitle    : Info        : "Bulk Payment Entry"

           

            On        : Form Accept : yes        : Form Accept

            On         : Form Accept : yes     : Call     : CphSale BulkAutoEntry




;; Sales Credit Part ;;                           

;;------------------------------------------------------------------------------------------           

           

                [Part : CphSales CrLedPrt]


                 Line : CphSales CrLedLne

               

               

                    [Line : CphSales CrLedLne]

   

                        Field    : Medium Prompt, CphSales CrLedFld                       

                        Local    : Field    : Medium Prompt    : Info    : $$LocaleString:"Credit Ledger"

                        Space Bottom    : 0.50

                       


                        [Field    : CphSales CrLedFld]

                           

                            Type        : String

                            Use            : Name Field

                            Table        : CashBank LedgersExtract

                            Storage        : RBCBLedgerName

                            Show Table    : Always

                            Case        : Title Case

                            Width        : 50

                            Align        : Left

                            Border        : Thin Box

                           

                           

   



;; Sales Debit Part ;;                           

;;------------------------------------------------------------------------------------------                       


            [Part : CphSales DrLedPrt]

               

                Line     : CphSales DrLedTtleLne, CphSales DrLedDetlsLne

                Repeat    : CphSales DrLedDetlsLne : CphSalesCollection

                Scroll            : Vertical

                Common Border    : Yes

                Break On        : $$IsEndOfList:$PartyLedgerName

               

               

                    [Line : CphSales DrLedTtleLne]

                       

                        Use        : CphSales DrLedDetlsLne       

                       

                        Local    : Field    : Default                    : Inactive    : No

                        Local    : Field    : Default                    : Delete    : Storage

                        Local    : Field    : Default                    : Type        : String                       

                        Local    : Field    : Default                    : Style        : Normal

                       

                        Local    : Field    : CphSales SerialNoFld        : Info        : $$LocaleString:"Sno."

                       

                        Local    : Field    : CphSales DateFld            : Info        : $$LocaleString:"Date"

                       

                        Local    : Field    : CphSales DebitLedgerFld    : Info        : $$LocaleString:"Debit Ledger"

                       

                        Local    : Field    : CphSales DrAmountFld        : Info        : $$LocaleString:"Amount"

   

                        Local    : Field    : CphVchNarration            : Info        : $$LocaleString:"Narration"

                       

                        Local    : Field    : CphChequeNo                : Info        : $$LocaleString:"Cheque No"

                       

                        Border    : Thin TopBottom

                        Delete    : Space Top

                                               


                [Line    : CphSales DrLedDetlsLne]

                   

                    Field        : CphSales SerialNoFld, CphSales DateFld, CphSales DebitLedgerFld, CphSales DrAmountFld, CphChequeNo, CphVchNarration

                   

                    Border:Thin Left

                    Space Top    : 0.25

                   


                    [Field    : CphSales SerialNoFld]

                       

                        Use          : Short Name Field

                        Width        : @@SymWidth

                        Set as       : $$Line

                        Skip         : Yes

                                           

                       


                    [Field    : CphSales DateFld]

                       

                        Type        :     Date

                        Use            :    Short Date Field

                        Storage        :    Date

                        Set as        :    $$PrevObj:$Date                       ; Line added

                        Set Always    :    Yes                       ; Line added

                        Width        :     @@ShortWidth

                       


                    [Field    : CphSales DebitLedgerFld]

                       

                        Type        :     String

                        Use            :     Name Field

                        Table        :     All Ledger, EndOfList       

                        Keys        : Create Ledger, Alter Ledger

                        Storage        :     PartyLedgerName

                        ;;Set as        :     $Name

                        Show Table    :     Always

                        Case        :     Title Case

                        Width    :     @@NameWidth

                        Align        :     Left

                        Inactive    :     $$IsEndOfList:$PartyLedgerName        ;;$$IsEndOfList:$Name    ;;$$IsEmpty:$Name

                       


                       


                    [Field    : CphSales DrAmountFld]

                       

                        Type        :     Amount

                        Use            :    Amount Field

                        Storage        :    Amount

                        ;;Set as        :   $Amount

                        Width        :     @@AmountWidth

                        Inactive    :     $$IsEndOfList:$PartyLedgerName        ;$$IsEndOfList:$Name;;$$IsEmpty:$Name

                           

                       

                    [Field:CphVchNarration]

                        Use:Voucher Narration Field

                        Storage:Narration

                        Key                 : PrevVchNarration, PrevLedNarration

                        Full WidthWidth:Yes

                        Inactive    :     $$IsEndOfList:$PartyLedgerName        ;$$IsEndOfList:$Name;;$$IsEmpty:$Name

                       

                    [Field:CphChequeNo]

                        Use            : Name Field

                        Width        : @@shortwidth

                        Storage        : CheNumUDf

                        Inactive    :     $$IsEndOfList:$PartyLedgerName        ;$$IsEndOfList:$Name;;$$IsEmpty:$Name

                                               


[Collection: CphSalesCollection]

       

    Title         : "Bulk Payment Entry"

    Type        : CphSales BulkEntry : Company

    Child Of    : ##SVCurrentCompany

                   

                       

                       


[System: UDF]


    CphSales BulkEntry         : Aggregate : 41071

    Date                    : Date        : 41072

    PartyLedgerName            : String    : 41073

    Amount                    : Amount    : 41074

    RBCBLedgerName            : String    : 41075

    CheNumUDf                : String    : 41076

    Narration                : String    : 41077





;; Bulk Auto Entry ;;

;;-----------------------------------------------------------------------------------------------------------------------


[Function: CphSale BulkAutoEntry]


;; Procedural Block

   

    Variable : CphDate             : Date   

    Variable : CphDrLedgerName     : String

    Variable : CphCrLedgerName     : String

    Variable : CphAmount        : Amount

    VARIABLE : ChqNo            : String

    VARIABLE : Narration        : String

    ;Variable:    ChqDate            :Date


    ;;Variable : CphNoofEntry        : Number:1   

    Variable     : Counter         : Number: 1

   

    001 :     Start Batch Post        : 10

    ;;003 :     SET : Counter           : 0 

    005 :     START PROGRESS          : ($$NumItems:CphSalesCollection)   : "Creating Vouchers" : @@CmpMailName : "Creating Payment Vouchers ..."

    007 :     WALK COLLECTION         : CphSalesCollection    ;;Sales Info

    ;;000 :   SET : CphNoofEntry         : $$Line:##CphNoofEntry ;; Counter

    010 :     SET : CphDate            : $$Date:$Date

    020 :     SET : CphDrLedgerName   : $PartyLedgerName

    030 :     SET : CphCrLedgerName   : #CphSalesCrLedFld

    040 :     SET : CphAmount            : $$AsAmount:$Amount   

    041    :    Set    : ChqNo                : #CphChequeNo

    042    :    Set    :    Narration        : $Narration

    ;043 :   Set:    ChqDate            : $$Date:$Date

   

   

    ;040a:   WHILE : ##CphNoofEntry >= 1

    050    :     SET             :     SVViewName            : $$SysName:AcctgVchView

   

   

    060    :     NEW OBJECT        :     Voucher   

    070    :     SET VALUE         :    Date                   : ##CphDate   

    080    :     SET VALUE        :     VoucherTypeName        : $$VchTypePayment


   

    090    :    SET VALUE         :    Narration             : $Narration

    100    :    SET VALUE         :    Narration             : "Cheque No :" + $CheNumUDf +" ,  Against Bill No :"+$Narration



;;----------------------------------------------------------------------------

;;Debit Entry

    110    :    INSERT COLLECTION OBJECT : AllLedgerEntries

    110a:    SET TARGET        : LedgerEntries

    120    :    SET VALUE         : Ledger Name            : ##CphDrLedgerName

    ;130

    140    :    SET VALUE         : IsDeemedPositive         : "Yes"   

    141    :    SET VALUE         : Amount                : ##CphAmount * (-) 1     ;##CphAmount

    150    :     SET TARGET        : ..


    150a  :    LOG : $$String:##CphDrLedgerName ;+ $$String:#CphAmount + "Dr"

    ;150b  :    LOG : ##CphCrLedgerName + $$String:#CphAmount + "Cr"

   

;----------------------------------------------------------------------------

;;Credit Entry

    160    :    INSERT COLLECTION OBJECT :  AllLedgerEntries

    160a:     SET TARGET        : LedgerEntries

    170    :    SET VALUE         : Ledger Name              :   ##CphCrLedgerName

    180    :    SET VALUE         : Amount                :     ##CphAmount * (-) 1 ;##CphAmount

    190    :    SET VALUE         : IsDeemedPositive         :   "No"

    ;200    :     SET TARGET        : ..

   

    ;200a:    LOG : $$String:##CphCrLedgerName ;+ $$String:#CphAmount + "Cr"

;-----------------------------------------------------------------------------------

    ;Bank Allocations

    201    :     IF                            : ($$IsLedOfGrp:$RBCBLedgerName:$$GroupBank OR $$IsLedOfGrp:$RBCBLedgerName:$$GroupBankOD)

    202    :    SET TARGET        : LedgerEntries[$$LoopIndex]

    203    :    SET                : BankLedgerAmount                    : $Amount

    209 :          INSERT COLLECTION OBJECT                : BankAllocations

    210    :            WALK            : BankAllocations

    211 :                SET TARGET    : BankAllocations[$$LoopIndex]

    220 :                SET VALUE        : Date                            : $$Owner:$$Owner:$Date

    230    :                SET VALUE        : TransactionType               :$$LocaleString:"Cheque"

    ;235:                SET VALUE        : BankName            : $RBCBLedgerName

    240    :                SET VALUE        : InstrumentNumber                :$$Owner:$$Owner:$ChqNumUDF

    250    :               SET VALUE         : InstrumentDate                :$$String:##CphDate

    260    :                SET VALUE        : PAYMENTFAVOURING      :$$String:##CphDrLedgerName

    270    :                 SET VALUE        : Amount                :(##CphAmount) *-1

    280    :                 SET TARGET        : ...

    281    :            End Walk   

    290    :                 SET TARGET        : ..

    300    :     END IF

   

;-----------------------------------------------------------------------------------

    310    :   SET VALUE         : PersistedView : ##SVViewName

    ;310a:     CALL             : CphSave Target Sales

    320    :   CREATE TARGET

   

    ;;330    :     SET             : CphDate            : ##CphDate

    340 :     INCREMENT         : Counter

    350a:     SHOW PROGRESS     : ##Counter

    360    :     END WALK   

    370    :     MSGBOX             : " Message Box " : "Thank You for Using this TDL for Bulk Payment"

    380 :     END PROGRESS

    390 :   DISPLAY            : CphPayment Daybook

    ;390    :     LOG : ">>>Voucher Created on "+$$String:$$Machinedate + " @ " + $$String:$$MachineTime + ">>>>>"

    400    :   RETURN

    410 :    End Batch Post


/*

[Function: CphSave Target Sales]

   

    10 : Save Target

*/



;; End-of-File



[Report: CphPayment  Daybook]


    Use        : Daybook

    Set        : VoucherTypeName    : "Payment"

    Set        : SVFromDate        : $$FinYearBeg:##StartDate:$StartingFrom:Company:##SVCurrentCompany

    Set        : SVToDate            : $$FinYearEnd:##StartDate:$StartingFrom:Company:##SVCurrentCompany

           

    Local    : Collection        : Default    : Add    : Filter    : Prov Filter




---------------CODE ENDED HERE-----------------------

टिप्पणियाँ

इस ब्लॉग से लोकप्रिय पोस्ट

Tally Chapter 153 TDL for Custom List of Stock Item By Rajiv Mishra Computer Class

Tally Chapter 105 TDL for Receipt contra Payment BULK Entry by Rajiv Mishra Computer Class

TDL CODE for New Column in Invoice by Rajiv Mishra Computer class