Cash Receipt

Discussion in 'Requests' started by RAJESH BHANUSHALI, May 5, 2021.

    

  1. [#Menu : Gate Way of Tally]
    Add :Key Item : At End : "Cash Turnover " : L :Display: CashPayRecforAudit
    [Report:CashPayRecforAudit]
    Form:CashPayRecforAudit
    Full Screen:Yes


    [Form:CashPayRecforAudit]
    Part:CPRA Title Part, CPRA VchTitle
    Width : 100% Screen
    Height : 100% Screen
    Use:DSP Template

    [Part:CPRA Title Part]
    Line:CPRA Title Part, CPRA Title Part Period
    Horizontal Alignment:Centre
    Sync:Yes
    [Line:CPRA Title Part]
    Field:CPRA Title Part

    [Field:CPRA Title Part]
    Set as:"Cash Received"
    Style:Large Bold
    Border:sub totals
    [Line:CPRA Title Part Period]
    Field:CPRA Title Part Period

    [Field:CPRA Title Part Period]
    Set as:""
    [Part:CPRA VchTitle]
    Line:CPRA VchTitle, CPRA VchBody
    Repeat:CPRA VchBody:CPRA VchBody Aggr
    Border:Thin Box
    Sync:Yes
    Common Borders:Yes

    [Line:CPRA VchTitle]
    Field:CPRA SRNO, CPRA Particulars, CPRA GroupName, CPRA CashReceipt

    [Field:CPRA SRNO]
    Use:info field
    Info:"Sr No"
    Style:NORMAL BOLD
    [Field:CPRA Particulars]
    Use:info field
    Info:"Particulars"
    Width:30
    Style:NORMAL BOLD
    [Field:CPRA GroupName]
    Set as:GroupName
    Info:"Group Name"
    Width:15
    Style:NORMAL BOLD
    [Field:CPRA CashReceipt]
    Use:Amount Field
    Info:"Cash Receipt"
    Width:15
    Style:NORMAL BOLD
    [Line:CPRA VchBody]
    Field:CPRA SrNo, CPRA Particulars, CPRA GroupName, CPRA CashReceipt
    Local : Field : Default : Style : Normal Bold
    Local :Field:CPRA SrNo : Set as:$$Line
    Local :Field:CPRA Particulars:Set as:$PartyLedgerName
    Local :Field:CPRA GroupName:Set as:""
    Local :Field:CPRA CashReceipt:Set as:if $ledgername CONTAINS "Cash" then $Amount else ""
    [System:Formula]
    PartyName1:$LedgerName:Group:"Cash In Hand"
    [System:UDF]
    CPRA VchBody Aggr:Aggregate:6801

    [Collection : CPRA Rep Collection]
    Type : Vouchers
    Fetch : Date, Amount, VoucherTypeName, PartyLedgerName, VoucherNumber


    Please help with this i want to fetch Cash Received Partywise from all voucher type...
    Here i am unable to fetch any details.
    I am new with Reporting part.
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I would suggest...that before attempting new Reports etc....

    First you load up the SAMPLE.TCP in Developer....... learn about Collections, Aggregates and UDFs storages.........You need to have a minimum grasps of the basics first. Check out the sample code and learn about how to structure the same.

    From your comment... you want to have a Partywise report and aggregating all the Cash transactions to be displayed. However your code above is very very far from that requirement.
     



  3. will try sir
     



  4. Amit sir, I have try to done and succeed to the some extent

    Party name and Amount is coming properly but i want to do aggregate of it, and have also review some Sample TDL and followed it.
    But still not able to compute aggregate sum of total amount received ledger wise.
    and also not able to get group name.

    Please help me with this

    code is as follow
    Code:
    [#Menu        : Gate Way of Tally]
        Add    :Key Item    : At End : "Cash Turnover "    : L  :Display: CashPayRecforAudit
    
    
    [Report:CashPayRecforAudit]
        Form:CashPayRecforAudit
        Full Screen:Yes
           
       
    [Form:CashPayRecforAudit]
        Part:CPRA Title Part, CPRA VchTitle
        Width       : 100% Screen
        Height       : 100% Screen
        Use:DSP Template
       
    
    [Part:CPRA Title Part]
        Line:CPRA Title Part, CPRA Title Part Period
        Horizontal Alignment:Centre
       
    
    [Line:CPRA Title Part]
        Field:CPRA Title Part
       
    [Field:CPRA Title Part]
        Set as:"Cash Received"
        Style:Large Bold
        Border:sub totals
    
    [Line:CPRA Title Part Period]
        Field:CPRA Title Part Period
       
    [Field:CPRA Title Part Period]
        Set as:""
    [Part:CPRA VchTitle]
        Line:CPRA VchTitle, CPRA VchBody
        Repeat:CPRA VchBody:CPRA Rep Collection
        Border:Thin Box
       
        Common Borders:Yes
       
    [Line:CPRA VchTitle]
        Use:CPRA VchBody
    
        Local    : Field    : Default            : Type        : String
        Local    : Field    : Default             : Align        : Centre
        Local    : Field    : Default             : Style        : Normal Bold
        Local    : Field    : Default             : Border        : Thin Box
       
        Local    :Field        :CPRA SrNo                 :    Set as    :"Sr No"
        Local            :Field        :CPRA Particulars        :    Set as    :"Particulars"
        Local            :Field        :CPRA GroupName            :    Set as    :"Group Name"
        Local            :Field        :CPRA CashReceipt        :    Set as    :"Cash"
        Local            :Field        :CPRA CashReceipt        :    Width    :15
    
    [Line:CPRA VchBody]
    Field:CPRA SrNo, CPRA Particulars, CPRA GroupName, CPRA CashReceipt
       
    
    [Field:CPRA SRNO]
    Set as      : $$Line
    Width       : 3
    Align       : Centre
    Border      : Thin Right
    
    
    [Field:CPRA Particulars]
    Use         : Name Field
    Set as      : $ledgername
    Border      : Thin Right
    
    [Field:CPRA GroupName]
    Use         : Name Field
    Set            : $Parent
    Border      : Thin Right
    
    [Field:CPRA CashReceipt]
    Use         : Amount Field
    Set as      : $amount
    Width:15
    
    
       
    [Collection : CPRA Rep Collection]
        Type : Vouchers        : VoucherType
        Child Of    : $$VchTypeReceipt
        Belongs To    : Yes
        Walk        :    AllAccountingEntries
        By            :name:$ledgername
        Fetch : LedgerName, GroupName, Amount
       
        ;; Aggr Compute is computed based on the By Attribute and the values are stored in the Methods
        ;; specified. 
        Aggr Compute    : Amount    : Sum    : $Amount
        Keep Source         : No
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $Parent:Ledger:#CPRAParticulars --- for Group Name
     



  6. thank you sir, can you please help me solve one more query

     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Your collection is wrong..........

    You need to have a collection of Ledgers ... and maybe filter it for Debtors/Creditors only. ( for partywise )

    Make another collection for Receipt Vouchers....walk all entries..... and compute the SUM, if the LedgerName = Your FIELDLedgerName and it contains the Ledger having Cash Ledger.......and Aggr Compute that.

    Again refer to some of the samples in the Developer's sample folders.
     



  8. okkk sir, understood where i am going wrong will try to implement that

     



  9. [Collection : CPRA Rep Collection]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeReceipt
    Belongs To : Yes
    Walk : AllAccountingEntries
    By :name:$ledgername

    Filter : onlycashentry
    Fetch : LedgerName, GroupName, Amount


    [System:Formulas]
    onlycashentry: $$IsLedOfGrp:$ParentLedgerName:$$GroupCash

    sir with this i am getting only sales related entry by fileter where as i want all ledger (partiwise irrespective creditor, debtor, loans so no need of collection for this)
    but i am only getting entry related to sales..
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Really.... without a collection of Ledgers...... you will get Voucher-wise and not Party-wise/Ledger-wise.

    onlycashentry: $$IsLedOfGrp:$ParentLedgerName:$$GroupCash == Does this work for Single-entry and Double-entry modes?? Make some entries for Single and Double entry mode and check the results.
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Here is a SAMPLE for you...........So kindly follow the tips given in previous posts.

    Capture.PNG
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    From your collection..... you will be getting ALL receipt related entries...........not only SALES.........

    Make a dummy ledger under other group and pass Receipt entries and check it out.
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Aggregate of all Receipts ...check out the Red circled item in both photos.

    Capture.PNG

    Capture2.PNG
     



  14. with this actually first i want to try with voucher wise... Actually i am stuck here because bank entries are also coming in collection. Mainly i am stuck with that, that's the i am not making collection for ledger.

    in below code all receipt voucher are coming, i have try to make only for voucher involving cash group ledger. but still not able to do..
    have tried to learn from samples but not able to get much from it relating to sample. I feel making new report is biggest challenge in tdl making.

    please help to correct in below code

    [Collection : CPRA Rep Collection]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeReceipt
    Belongs To : Yes
    Walk : AllAccountingEntries
    By :name:$ledgername

    Filter : onlycashentry
    Fetch : LedgerName, GroupName, Amount

    Fetch : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
    Fetch : AllLedgerEntries.CashAllocations.*

    [System:Formulas]
    onlycashentry: $$IsVoucher:$$IsLedOfGrp:$ledgername:$$GroupCash
    ;;onlycashEntry: $$IsLedOfGrp:$ledgername:$$GroupDuties
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Okay..... Keep it on....Good luck. :):)
     



  16. sir actually alongwith cash, bank receipt also coming with the above mentioned collection..

    where i am gone wrong will you please tell me.
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Problem is with this...........

    [System:Formulas]
    onlycashentry: $$IsVoucher:$$IsLedOfGrp:$ledgername:$$GroupCash

    All Entries has Dr/Cr or multiple Dr/Cr ......... so which Ledger does your Formula refers to......... ?????
     


  18. Mukesh1001

    Mukesh1001 New Member


    Amit Siraji please help

    I am facing issue with Total Cash received value for multiple Cr / Dr entry. The code line is highlighted in red in below code.
    Please help me with any code error and guide me on this.

    Bank Received multiple DrCr  Total Error .jpg
    [#Menu : Gateway of TAlly]
    Add: Key Item: Cash Bank receipt Expenses :C: Display: Cash Bank receipt Expenses

    [Report: Cash Bank receipt Expenses]
    Use : DSP Template
    Form: Cash Bank receipt Expenses
    Variable : IsMultiPage, InNewPages, ColumnarDayBook, ExtractMode, ShowQtyExtract

    Set : VchTotalTrans : Yes

    Fetch Object : Voucher : VoucherID : *.* AllLedgerEntries.IsVchGroupCash, AllLedgerEntries.IsVchGroupBank,IsReceipt,IsPayment
    Variable : SV Print Orientation : String
    Variable : SVFromDate, SVToDate
    Set : SVFromDate : @@DSPFromDate
    Set : SVToDate : @@DSPToDate
    Fetch Object : Voucher : ##VoucherID : AllLedgerEntries.IsVchGroupCash, AllLedgerEntries.IsVchGroupBank
    ;===========================================================

    [Form: Cash Bank receipt Expenses]
    TOP Part : LV Title
    Part : CBreceiptExpenses,
    Part : CBreceiptExpensesTotal,CBLedDetails


    ; Delete : PageBreak
    ; Add : Page Break : DSP ClPageBreak,CBreceiptExpenses ; CB Receipt,CB Expenses ;CBLedDetails ;CBTDayBookTitles


    Height : 100 % Screen
    Width : 100 % Screen
    Space Left : 1
    Space Right : 1 mm
    Vertical Alignment : Centre
    Horizontal Alignment: Centre

    ;;************************ Buttons ************************

    Buttons : PrintButton, ExportButton, UploadButton, MailButton
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn3, BottomToolBarBtn4, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12
    Button : ExplodeFlag, ChangePeriod, ChangeCompany
    Add : Bottom Button : CBF12Config


    ;;************************ Part ************************

    [Part : CBReceiptExpenses]
    Part : CB Receipt Expenses1;,CBreceiptExpensesTotal
    Background : @@SV_DAYBOOK
    [Part : CB Receipt Expenses1]
    LEFT Part : CB Receipt
    RIGHT Part : CB Expenses
    Vertical: No

    ; Sync: Yes

    ;;************************************ Page Break ***************************************

    ; [Part: DYBK Op1PageBreak]
    ; Parts : DSP OpCompanyName, DSP OpReportTitle, main Title1
    ; Vertical: Yes
    ; Space Bottom : 0.5
    ; [Part : main Title1]
    ; Add : Left Part : PCB LeftPageBreak,PCB RightPageBreak
    ; Use : LEDVCH PrintConfigure
    ; [Part :pCB LeftPageBreak]
    ; Line : column Left titles,BCICrOpeningBalanceLne
    ; Use : Petty cash left body
    ; [Part :pCB RightPageBreak]
    ; Line : column right titles,RCP OpeningBalanceLne1

    ;;************************************ Page Break End ***************************************

    ;;************************ LEFT Part : BC Receipt ************************


    [Part : CB Receipt]
    Lines : CBReceiptHeadTitle, CBReceiptTitle, CBReceiptDetail
    ;Bottom Line : CBBankReceiptTotal,CBCashReceiptTotal,CBReceiptTotal
    ; Background : Light yellow
    ;Option : Small Size Part
    Scroll : Vertical
    Space Right : 2 mm
    Total : CBICrAmt ;: CBIAmountColl
    Repeat : CBReceiptDetail : CBReceiptcoll
    Invisible : Not $CBF12CBReceipt:Company:##SVCurrentCompany


    [Line : CBReceiptHeadTitle]
    Field : CBReceiptHeadTit

    [Field : CBReceiptHeadTit]
    Set as : "Bank/CASH RECEIVED"
    Full Width: Yes
    Align: Center
    Background: White
    Border : thin Box

    [Line : CBReceiptTitle]
    Field: CBISlNo., CBIDate, CBIName, CBINarr
    Right Field : CBIVchType, CBIVchNumber, CBICrAmt; CBIAmount
    Use : CBReceiptDetail
    ; Local: Field: Default : Lines : 1
    Local: Field : Default : Type : String
    Local: Field : Default : Style : Normal Bold
    Local: Field : Default : Align : Centre
    Local: Field: CBISlNo. : Set As : "S.No."
    Local: Field: CBIDate : Set As : "Date"
    Local: Field: CBIName : Set As : "PARTICULARS"
    Local: Field: CBINarr : Set As : "Narration"
    Local: Field: CBIVchType : Set As : "VCH Type"
    Local: Field: CBIVchNumber : Set As : "Vch No."
    Local: Field: CBICrAmt : Set as : "Amount"
    Border : Thin Bottom
    ;*********************
    [Line : CBReceiptDetail]

    Left Field: CBISlNo., CBIDate, CBIName, CBINarr
    Right Field : CBIVchType, CBIVchNumber, CBICrAmt ; CBIAmount
    Border:Thin Bottom

    [Field: CBISlNo.]
    Set as : $$Line
    Width : @@NumberWidth-3
    Align : Centre
    Border : Thin Left
    Style : normal
    Invisible: Not $CBF12CBISlNo:Company:##SVCurrentCompany

    [Field: CBIDate]
    Use: short Date field
    Type : Date
    Set as : $Date
    Width : @@ShortDateWidth+1
    Align : Right
    Border : Thin LEFT
    Style: normal

    [Field: CBIName]
    Use : Name Field
    Set as : $ledgername
    Width : @@ShortNameWidth+10
    ; Line : 0
    Border : Thin LEFT
    Style : Normal
    Invisible: Not $CBF12CBIName:Company:##SVCurrentCompany

    ; FullWidth : Yes

    Option : Alter on Enter
    Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers

    Option : AlterOnEnter : NOT $$IsRemoteCompany
    Option : Display On Enter : $$IsRemoteCompany AND $$IsVoucher
    Option : DisplayOnAltEnter : $$IsVoucher

    [Field:CBINarr]
    Use : Name Field
    Set as : $Narration
    Style : Small
    Border : Thin LEFT
    Lines : 0
    FullWidth : Yes
    Color:blue

    Invisible: Not $CBF12CBINarr:Company:##SVCurrentCompany

    [Field:CBIVchType]
    Use : Short Name Field
    Set as : $VoucherTypeName
    Width : @@NameWidth-7
    Align : Left
    Border : Thin LEFT
    Style : Small
    Invisible : Not $CBF12CBIVchType:Company:##SVCurrentCompany

    [Field:CBIVchNumber]
    Use : Name Field
    Set as : $VoucherNumber
    Width : @@ShortNameWidth-5
    Max : @@MaxNameWidth
    Align : LEFT
    Border : Thin Left
    Style : tiny
    Invisible: Not $CBF12CBIVchNumber:Company:##SVCurrentCompany

    [Field: CBICrAmt]
    Use: Amount Field
    Style : Normal ,Small
    Border : Thin Left Right
    Style : tiny
    Format : "DrCr"
    ; Set As :If $VchHasCashEntries Then $$AsCrAmt:$LedCrAmt Else 0 ;;-ok
    Set as : if NOT $$IsVoucher then @ForexVal else +
    if ##IsCCReport then $$AsCrAmt:mad:CCAmount else $$AsPositive:$$AsCrAmt:mad:LGAmt

    LGAmt : if ##IsGrpReport then $TotalGrpCrVchAmt else $TotalLedCrVchAmt
    CCAmount : if NOT ##IsCCBkup then $AllocCostCentreCrTotal else +
    if ##IsGrpBkup then $AllocCCGrpCrTotal else $AllocCCLedCrTotal
    ForexVal : if ##IsGrpReport then $$IfCr:$NettGrpForex else $$IfCr:$NettLedForex
    Style : if $$InPrintMode then "Normal" else "Normal Bold"
    Inactive : $$IsVoucher AND NOT ##IsCCReport AND @@ShowForex AND $$IsBaseCurrency:mad:LGAmt

    [System:Formulas]
    onlycashentry: $$IsVoucher:$$IsLedOfGrp:$ledgername:$$GroupCash
    onlyBankentry: $$IsVoucher:$$IsLedOfGrp:$LedgerName:##GroupBank
    IsVchCashBankAcctRE : $$IsCashBankLed

    ;;************************ RIGHT Part : CB Expenses ************************

    [Part : CB Expenses]
    Scroll : Vertical
    Lines : CBExpensesHeadTitle, CBExpensesTitle, CBExpensesTitleDetail ; CBExpensesOpBal,
    Repeat:CBExpensesTitleDetail : Expensescoll
    Invisible : Not $CBF12CBExpenses:Company:##SVCurrentCompany
    Total:CBEAmount
    [Line : CBExpensesHeadTitle]
    Field : CBExpensesHeadTitle
    [Field : CBExpensesHeadTitle]
    Set as : "Bank/CASH EXPENSES"
    Full Width: Yes
    Align: Center
    Background: White
    Border : thin Box

    [Line : CBExpensesTitle]

    ; Field: CBESlNo., CBEDate, CBEName, CBENarr
    ; Right Field : CBEVchType, CBEvchNum, CBEAmount
    Use : CBExpensesTitleDetail
    ; Local: Field: Default : Lines : 1
    Local: Field : Default : Type : String
    Local: Field : Default : Style : Normal Bold
    Local: Field : Default : Align : Centre
    Local: Field: CBESlNo. : Set As : "S.No."
    Local: Field: CBEDate : Set As : "Date"
    Local: Field: CBEName : Set As : "PARTICULARS"
    Local: Field: CBENarr : Set As : "Narration"
    Local: Field: CBEVchType : Set As : "VCH Type"
    Local: Field: CBEvchNum : Set As : "Vch No."
    Local: Field: CBEAmount : Set as : "Amount"
    Border : Thin Bottom

    ;*********************
    ; [Line : CBExpensesOpBal]
    ; Local:Field: CBESlNo. : Set As :""
    ; Right Fields : CBEAmount


    [Line : CBExpensesTitleDetail]
    Left Field: CBESlNo., CBEDate, CBEName, CBENarr
    Right Field : CBEVchType, CBEvchNum, CBEAmount
    Border:Thin Bottom
    ; Option : Alter On Enter
    Option : DisplayOnAltEnter : $$IsVoucher AND NOT $IsDeleted
    [Field: CBESlNo.]
    Set as : $$Line
    Width : @@NumberWidth-3
    Align : Centre
    Border : Thin Left
    Style : normal
    Invisible: Not $CBF12CBESlNo:Company:##SVCurrentCompany

    [Field: CBEDate]
    Use: short Date field
    Type : Date
    Set as : $Date
    Width : @@ShortDateWidth+1
    Align : Right
    Border : Thin LEFT
    Style: normal
    SetBy Condition :$Date:$$DDMMYYDateFormat : $Date:"-"
    [Field: CBEName]

    Use : Name Field
    Set as : $ledgername
    Width : @@ShortNameWidth+10
    ; Line : 0
    Border : Thin LEFT
    Style : Normal
    ; FullWidth : Yes
    Invisible: Not $CBF12CBEName:Company:##SVCurrentCompany

    Option : DisplayOnAltEnter : $$IsVoucher
    ; Option : Alter on Enter
    ; Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers
    Display : $$IsVoucher

    [Field:CBENarr]
    Use : Name Field
    Set as : $Narration
    Style : Small
    Border : Thin LEFT
    Lines : 0
    Color:blue
    FullWidth : Yes

    Invisible : Not $CBF12CBENarr:Company:##SVCurrentCompany

    [Field:CBEVchType]
    Use : Name Field
    Set as : $VoucherTypeName
    Width : @@NameWidth-5
    Align : Left
    Border : Thin LEFT
    Style : Small

    Invisible : Not $CBF12CBEVchtype:Company:##SVCurrentCompany


    [Field:CBEvchNum]
    Use : Short Name Field
    Set as : $VoucherNumber
    Width : @@ShortNameWidth-5
    Max : @@MaxNameWidth
    ; Width : 7% Page
    Align : LEFT
    Border : Thin Left
    Style : tiny
    Invisible: Not $CBF12CBEvchNum:Company:##SVCurrentCompany

    [Field: CBEAmount]

    Use: Amount Field

    Set As : $Amount ;$$FilterAmtTotal:AllLedgerEntries:ChBkEntries:$Amount
    Width : @@DSPAmtWidth+5
    Border : Thin Left Right
    Style : tiny

    [Collection: Expensescoll]
    Type : Vouchers : VoucherType
    Fetch : *.*,LedgerEntries.*
    Child Of : $$VchTypePayment
    ; Child of : $$VchTypePurchase or $$VchTypePayment
    Belongs To : Yes
    Filter : IsNotOptionalVch
    ; Fetch : FBTFromDate, FBTToDate, MasterId
    ; Fetch : Narration, Ledger, Date, DueDateOfPymt, Amount
    ClientOnly: Yes


    ;========================================= Part CB Receipt Expenses Total =============

    [Part : CBReceiptExpensesTotal]
    Left Part : CBReceiptTotal
    Right Part : CBExpensesTotal
    Horizontal Alignment: Centre
    Space Bottom : 2 mm
    Space Right : 1 mm
    Background : @@SV_DAYBOOK
    Option : Small Part

    [Part:CBReceiptTotal]
    Line : CBGRCashTitle,CBGRCash,CBGRBank,CBGRCashTot
    Border : Thin Box
    Space Right : 2 mm
    Invisible : Not $CBF12CBReceipt:Company:##SVCurrentCompany

    Total : CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany
    Local : Field : CBGrOpening : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany
    Local : Field : CBGrClosing : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany

    [Line:CBGRCashTitle]
    Field : CBGRTit ,CBGrOpening,CBGrClosing
    Local : Field : Default : Align : Center
    Local : Field : Default : Background : MenuTitleBGClr
    Local : Field : Default : Color : White
    Local : Field : Default : Style : Normal Bold
    Local : Field : CBGRTit : Info : "Group Name"
    Local : Field : CBGrOpening : Info : "Opening"
    Local : Field : CBGrClosing : Info : "Closing"

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Local: Field: Simple Prompt : Info : ""
    Local: Field: CBRECEIVEDCurr : Set as : ""
    ; Local: Field: CBRECEIVEDCurr : Background : Red
    Local : Field : CBRECEIVEDCurr :Background : Light yellow
    Local : Field : Simple Prompt : Background : Light yellow

    [Line:CBGRCash]

    Field : CBGRTit,CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Set as : "Cash Balance:"
    Local : Field : CBGrOpening : Set as : $OpeningBalance:Group:$$GroupCash:$$CurrentCompany ;If Not $$IsDr:$OpeningBalance:Group:$$GroupCash:$$CurrentCompany Then $OpeningBalance:Group:$$GroupCash:$$CurrentCompany Else "" ;$OpeningBalance:Group:$$GroupCash:$$CurrentCompany
    Local : Field : CBGrClosing : Set as : @@CashBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Total : CBCashRECEIVEDCurr : CBCashRECEIVEDcoll

    Local: Field: Simple Prompt : Info : "Cash Received:"
    Local: Field: CBRECEIVEDCurr : Set as : ($$CollAmtTotal:ReceiptvchsGroupCash:$amount)
    ; Local: Field: CBRECEIVEDCurr : Set as : ($$CollAmtTotal:CBReceiptcoll:$amount)

    Local: Field: CBRECEIVEDCurr : Background : Red
    Local: Field: Simple Prompt : Background : Light yellow

    [Line:CBGRBank]

    Field : CBGRTit,CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Set as : "Bank Balance: "
    Local : Field : CBGrOpening : Set as : $$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank) ; Bank Opening Amt ok ------------
    Local : Field : CBGrClosing : Set as : @@BankBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Total : CBRECEIVEDCurr : CBBankRECEIVEDcoll
    Local: Field: Simple Prompt : Info : "Bank Received:"
    Local: Field: CBRECEIVEDCurr : Set as : $$CollAmtTotal:ReceiptvchsGroupBank:$amount
    Local : Field : Simple Prompt : Background : Light yellow


    [Line:CBGRCashTot]
    Field : CBGRTit,CBGrOpening,CBGrClosing

    ; Local : Field : Default : Align : Right
    Local : Field : Default : Border : Totals
    Local : Field : CBGRTit : Set as : "Total:"
    Local : Field : CBGrOpening : Set as : $$Total:CBGrOpening ;($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) + $DebitOpeningBalance:Group:$$GroupCash - $CreditOpeningBalance:Group:$$GroupCash ;;GroupOpeningTotalAmt -ok
    Local : Field : CBGrClosing : Set as : $$Total:CBGrClosing ;If $$IsDr:mad:@BankBalance AnD $$IsDr:mad:@CashBalance then @@BankBalance+@@CashBalance else + @@CashBalance - @@BankBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr

    Local: Field: Default : Align : Right
    Local: Field: CBRECEIVEDCurr : Border : Totals
    Local: Field: Simple Prompt : Info : $$LocaleString:"Total:"
    Local: Field: CBRECEIVEDCurr : Set as : $$Total:CBICrAmt
    Local: Field: CBRECEIVEDCurr : Background : Green


    [Field:CBGRTit]
    Use : Name Field
    Align : Center
    Width : 14 ;@@LongWidth
    Style : Normal ;Bold
    Border : Thin Left Right


    [Field:CBGrOpening]
    Use : Amount Field
    Format : "DrCr"
    width : 17
    Border : Thin Right
    Color : IF $$IsDr:#CBGrOpening Then "Black" Else "Red"


    [Field:CBGrClosing]
    Use : Amount Field
    Format : "DrCr"
    width : 17
    Border : Thin Right
    Color : IF $$IsDr:#CBGrClosing Then "Black" Else "Red"


    [Field: CBRECEIVEDCurr]
    Use : Amount Field
    ; Width : 17
    Width :mad:@DSPAmtWidth+5
    Align : RIGHT
    ; Background : Red
    Format : "DrCr"

    [#Field: Simple Prompt]
    Width : 18
    Align : RIGHT

    ;=========================================================================================================================
    ;=============================================================================== test

    [Collection : CBReceiptcoll]
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeReceipt
    ; Child of : $$VchTypeSales
    Belongs To : Yes
    Filter : IsNotOptionalVch ;IsNotOptionalOrCancelled,IsNotRcptBankintVch ;;IsNotOptionalVch,IsNotRcptBankintVch
    Filter : NOTIsCashBankLed
    Fetch : Date, VoucherTypeName, VoucherNumber, Narration, Amount
    Fetch : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
    Fetch : AllLedgerEntries.BankAllocations.*

    ;;================================================================
    Type : Vouchers : VoucherType
    Child Of : $$VchTypeReceipt
    Belongs To : Yes
    Walk : AllAccountingEntries
    Fetch : LedgerName, GroupName, Amount
    Fetch : Date, Ledger, Amount, Narration, VoucherTypeName, VoucherNumber, MasterID
    Fetch : IsCashDetails
    Fetch : AllLedgerEntries.IsCashDetails
    Filter : IsNonCashBankGroups
    By :name:$ledgername
    Filter: CBReceipt


    [Collection : CBDebitCollection]
    Source Collection : CB Dybk Vouchers Of Company

    Walk : AllLedgerEntries

    Fetch : MasterId

    By : VoucherNumber : $VoucherNumber
    By : VoucherTypeName : $VoucherTypeName
    By : LedgerName : $LedgerName
    By : IsDeemedPositive : $IsDeemedPositive
    Compute : VchHasCashEntries: $..VchCashEntries

    AggrCompute : LedDrAmt : Sum : If $$IsDr:$Amount Then $Amount Else 0
    Aggr Compute: LedCrAmt : Sum : If Not $$IsDr:$Amount Then $Amount Else 0
    Filter : IsNonOptionalCancelledVchs
    Filter : CBDebitLedgersFilt


    ;=========================================================================================

    [Collection : CBICrAmt]
    Collection : ReceiptvchsGroupBank
    Collection : ReceiptvchsGroupCash
    Collection : ContravchsGroupCash

    [Collection : ReceiptvchsGroupBank]
    Collection : Receipt Vouchers, All Receipt Vouchers
    Type : Vouchers : group
    Childof : $$groupbank
    Filter : CBReceipt
    Fetch : Narration, Ledger, Date, DueDateOfPymt, Amount
    Compute : IsRecptVch : $$IsReceipt:##SVVoucherType

    [Collection : ReceiptvchsGroupCash]
    Type : Vouchers : group
    Childof : $$GroupCash
    Fetch : Amount
    Fetch : Narration, Ledger, Date,; DueDateOfPymt, Amount
    Filter : CBReceipt
    Compute : CBRecptVch : $$IsReceipt:##SVVoucherType




    [System:Formulas]

    ;=======
    CBReceipt : $$IsReceipt:$VoucherTypeName
    Contravchs : $$IsContra:$VoucherTypeName
    ChBkEntries : Not $LedgerName AND NOT $$IsDr:$Amount

    CBIsBankAccount : $IsBankAccount:Ledger:$LedgerName
    CBIsCashAccount : $IsCashAccount:Ledger:$LedgerName

    ;========== Test

    [#Object : Voucher]
    VchBankEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@CBIsBankAccount].LedgerName
    VchCashEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@CBIsCashAccount].LedgerName
    VchCashBankEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@IsCashBankLed].LedgerName
    ;------------------------------------------------------------------ Test

    ;[Collection : ContravchsGroupCash]
    ; Type : Vouchers : group
    ; Childof : $$GroupCash ;;$$GroupBankOD and
    ; Filter : Contravchs
    ; Fetch : Narration, Ledger, Date, DueDateOfPymt, Amount
    ; Fetch :Date, Ledger, Amount, Narration, VoucherTypeName, VoucherNumber, MasterI

    ;-------------------------------------------------------------Part : CBExpensesTotal--------------------------------------------------------------------------------------------
    [Part : CBExpensesTotal]
    Line : CBBankExpTot,CBCashExpTot,CBExpTot
    Border : Thin Box
    ; Width : 25% page ;107.5
    Space Left : 2
    Invisible : Not $CBF12CBExpenses:Company:##SVCurrentCompany

    [Line : CBBankExpTot]
    Right Field : Simple Prompt,AmountField
    Local: Field: Simple Prompt : Info : " Bank Paid:"
    Local: Field: AmountField : Set as : $$CollAmtTotal:paymentvchsGroupBank:$amount ;$CreditTotals:Group:$$GroupBank ;$$Total:CBEAmount - $$CollAmtTotal:paymentvchsGroupCash:$amount ;($$CollAmtTotal:ContravchsGroupBank:$amount-$CreditTotals:$$GroupBank) ;$$CollAmtTotal:paymentvchsGroupBank:$amount
    Local: Field: AmountField : Background : Red
    Local: Field: AmountField : Format : "DrCr" ;For Test

    [Line : CBCashExpTot]
    Right Field : Simple Prompt,AmountField
    Local: Field: Simple Prompt : Info : " Cash Paid:"
    ; Local: Field: AmountField : Set as : $CreditTotals:Group:$$GroupCash ;($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    ; Local: Field: AmountField : Set as : $$CollAmtTotal:Expensescoll:$amount ;($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    ; Local: Field: AmountField : Set as : ($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    Local: Field: AmountField : Set as : ($$CollAmtTotal:paymentvchsGroupCash:$amount) ;$$Total:CBEAmount - ($$CollAmtTotal:paymentvchsGroupBank:$amount) ;($$CollAmtTotal:ContravchsGroupCash:$amount-$CreditTotals:$$GroupCash)
    Local: Field: AmountField : Background : Red
    Local: Field: AmountField : Format : "DrCr" ;For Test

    [Line : CBExpTot]
    Right Field : Simple Prompt,AmountField
    Space Bottom : .25


    Local: Field: AmountField : Border : Totals
    Local: Field: Simple Prompt : Info : "Total Paid:"
    Local: Field: AmountField : Set as : $$Total:CBEAmount


    [Collection : PaymentvchsGroupBank]
    Type : Vouchers : group
    Childof : $$GroupBank
    Fetch : Amount
    Filter : CBPayment
    Filter : NonDeletedVoucher

    [Collection : PaymentvchsGroupCash]
    Type : Vouchers : group
    Childof : $$GroupCash
    Fetch : Amount
    Filter : CBPayment
    Filter : NonDeletedVoucher

    [Collection : PymtContravchsGroupCash]
    Type : Vouchers : group
    Childof : $$GroupCash
    Filter : Contravchs
    Fetch : Amount

    [System:Formula]
    CBPayment : $$IsPayment:$VoucherTypeName

    ;===========================================================================================================

    [System:Formula]
    CashBalance : $$NettAmount:($BSClosing:Group:"Cash-in-Hand"):($ForexClosing:Group:"Cash-in-Hand")
    BankBalance : $$NettAmount:($BSClosing:Group:"Bank Accounts"):($ForexClosing:Group:"Bank Accounts")
    LoanAssetTot : $$NettAmount:($BSClosing:Group:"Loans & Advances (Asset)"):($ForexClosing:Group:"Loans & Advances (Asset)")
    LoanAssetOpTot : $$NettAmount:($BSOpening:Group:"Loans & Advances (Asset)"):($ForexClosing:Group:"Loans & Advances (Asset)")

    ;================================================================================================================
    [Part : CBLedDetails]


    Left Part : CBLedDet
    Right Part : CBLoanLedDetails
    Horizontal Alignment: Centre
    Height : 25% Screen

    [Part : CBLedDet]
    Line : CBLedDetailsTL,CBLedDetails1,CBLedDetails;,CBLedAmtTotal ;CBLedDetailsTL
    Bottom Line : CBLedAmtTotal
    Repeat : CBLedDetails : CBBANKCASHColl
    Space Right : 3 mm
    Option : Small Size Part
    Scroll : Vertical ;Yes
    Invisible : Not $CBF12CBLedopCl:Company:##SVCurrentCompany
    Total: CBLedAmtOP, CBLedAMTCl
    [Line : CBLedDetailsTL]
    Field : Simple Field
    Local : Field : Default : FullWidth : Yes
    Local : Field : Simple Field : Set as : "Cash Bank Details on " + $$String:##SVFromDate + " To " + $$String:##SVCurrentDate ; + " " + " (" + $$String:##SVFromDate ;+ " " + "Cash Opening Balance : " + " " ;;+ if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Box
    Local : Field : Simple Field : Align : Center
    Local : Field : Simple Field : Style : Normal Bold

    [Line:CBLedDetails1]

    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOP,CBLedAmtCl
    Local : Field : Default : Background : Green
    Use : CBLedDetails

    Local: Field: Default : Border:Thin Left Top Bottom
    Local: Field: Default : Type : String
    Local: Field: Default : Align : Center
    Local: Field: Default : Style : Small Bold
    Local: Field: Default : Color : Black
    Local: Field: CBLedSno : Set as : "S.No."
    Local: Field: CBLedName : Set as : "Bank/Cash Ledger Name"
    Local: Field: CBLedName : Width : FullWidth : Yes
    Local: Field: CBLedAMTOP : Set as : "Opening"
    Local: Field: CBLedAMTCl : Set as : "Closing "

    [Line : CBLedDetails]

    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOP,CBLedAmtCl
    Border:Thin Bottom

    [Field : CBLedSno]
    Use : Number Field
    Set As : $$Line
    Align : Centre
    width : @@NumberWidth-1
    Border : Thin Left Right

    [Field : CBLedName]
    Use : Name Field
    Set As :$Name
    Align : Left
    Border : Thin Right
    FullWidth : Yes
    Width : 20 ;@@ShortNameWidth+10
    Style : Small
    Scroll : Vertical

    Option : Alter on Enter
    Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers

    [Field : CBLedAmtOP]
    Use:Amount Field
    ; Use : CBLoanLedAMTOP
    set as : if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Right
    Width : 20
    Format : "DrCr, No Zero"
    Style : Small ;Bold
    Color : IF $$IsDr:#CBLedAmtOP Then "Black" Else "Red"
    Align : Right


    [Field : CBLedAmtCl]

    Use : CBLoanLedAMTOP
    Set As : $ClosingBalance
    Color : IF $$IsDr:#CBLedAmtCl Then "Black" Else "Red"

    [Line : CBLedAmtTotal]
    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOpTot,CBLedAmtClTot

    Local: Field: Default : Style : Small Bold
    Local: Field: Default : Delete : Border
    Local: Field: CBLedAmtOpTot : Border : Flush Totals
    Local: Field: CBLedAmtClTot : Border : Flush Totals
    Local: Field: CBLedSno : Info : ""
    Local: Field: CBLedName : FullWidth :yes
    Local: Field: CBLedName : Set as : "Total :"
    Local: Field: CBLedName : Align : Right


    [Field : CBLedAmtOpTot]
    Use : CBLoanLedAMTOP
    set as : $$Total:CBLedAmtOP ;($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) - ($CreditOpeningBalance:Group:$$GroupCash) + ($$NettAmount:($DebitOpeningBalance:Group:$$GroupCash):($ForexOpeningDr:Group:$$GroupCash))
    Color : IF $$IsDr:#CBLedAmtOpTot Then "Black" Else "Red"

    [Field : CBLedAmtClTot]
    Use : CBLoanLedAMTOP
    set as : ($$NettAmount:($DebitClosingBalance:Group:$$GroupBank):($ForexClosingDr:Group:$$GroupBank)) - ($CreditClosingBalance:Group:$$GroupCash) + ($$NettAmount:($DebitClosingBalance:Group:$$GroupCash):($ForexClosingDr:Group:$$GroupCash))
    Color : IF $$IsDr:#CBLedAmtClTot Then "Black" Else "Red"


    [Field : CBLedAmtCrTot]
    Use : CBLedAmtCr
    Set As : $$CollAmtTotal:CBCashLedColl:$Amount
    Border : Totals
    Color : IF $$IsDr:#CBLedAmtCrTot Then "Black" Else "Red"

    [Collection : CBBANKCASHColl]
    Collection : CBBankLedColl
    Collection : CBCashLedColl

    [Collection : CBBankLedColl]

    Type : Ledger
    Child of : $$GroupBank
    Belongsto : yes
    Fetch : ClosingBalance, Name
    Sort : Default : $ClosingBalance, $Name
    Filter : NonEmptyClosingBalance ;;-code-ok

    [Collection : CBCashLedColl]

    Type : Ledger
    Child of : $$GroupCash
    Filter : NonEmptyClosingBalance ;;-code-ok
    Sort : Default : $ClosingBalance, $Name

    [System: Formula]

    ; ClosingStatusFilter : If NOT ##SVShowQtyVariance Then @@PositiveClosingBalance Else (@@NegativeClosingBalance OR $OrderPreclosureQty > 0)
    NonEmptyClosingBalance : NOT $$IsEmpty:$ClosingBalance
    ;;**********************************************************************************************************

    [Part : CBLoanLedDetails]

    Line : CBLoanLedDetailsTL,CBLoanLedDetails1,CBLoanLedDetails;,CBLoanLedATOTAL ;CBLoanLedDetailsTL
    Bottom Line : CBLoanLedATOTAL
    Repeat : CBLoanLedDetails : LoanLedColl
    Scroll : Vertical
    Option : Small Part
    Invisible : Not $CBF12CBLoanLed:Company:##SVCurrentCompany


    [Line : CBLoanLedDetailsTL]
    Border : Thin Box
    Field : Simple Field
    Local : Field : Default : FullWidth : Yes
    Local : Field : Simple Field : Set as : " Loans Details on " + $$String:##SVFromDate + " To " + $$String:##SVCurrentDate
    Local : Field : Simple Field : Align : Center
    Local : Field : Simple Field : Style : Normal Bold

    [Line:CBLoanLedDetails1]

    Local : Field : Default : Background : Green
    Use : CBLoanLedDetails

    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center
    Local : Field : Default : Border : Thin Top Bottom Right
    Local : Field : Default : Style : Small Bold
    Local : Field : CBLoanLedHeadSno : Set as : "S.No."
    Local : Field : CBLoanLedDetails : Set as : "Loans(Asset) Ledger Name"
    Local : Field : CBLoanLedAMTOP : Set as : "Opening"
    Local : Field : CBLoanLedAMTDR : Set as : "Closing"
    Option : Alter On Enter
    Option : DisplayOnAltEnter : $$IsVoucher AND NOT $IsDeleted

    [Line : CBLoanLedDetails]

    Field : CBLoanLedHeadSno,CBLoanLedDetails;,CBLoanLedAMTOP,CBLoanLedAMTDR,CBLoanLedAMTCR
    Right Field : CBLoanLedAMTOP,CBLoanLedAMTDR;,CBLoanLedAMTCR
    Border:Thin Bottom

    [Field : CBLoanLedHeadSno]
    Use : CBLedSno

    [Field : CBLoanLedDetails]
    Use : CBLedName
    Set As :$Name
    Width : 20
    Border : Thin Right
    Style : Normal
    FullWidth : Yes
    Format : "DrCr, No Zero"
    Scroll : Yes

    [Field : CBLoanLedAMTOP]
    Use:Amount Field
    set as : if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Right
    Width : 20
    Format : "DrCr, No Zero"

    [Field : CBLoanLedAMTDR]
    Use : Amount Field
    Set As : IF $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Border : Thin Right
    Width : 20 ;@@LongWidth+1
    Format : "Dr,Cr"

    [Field : CBLoanLedAMTCR]
    Use : Amount Field
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Width : 25 ;@@LongWidth+1
    Border : Thin Right
    Format : "Dr,Cr"

    [Line : CBLoanLedATOTAL]

    Field : CBLoanLedHeadSno,CBLoanLedDetails;,CBLoanLedAMTOPTot,CBLoanLedAMTDRTot;,CBLoanLedAMTCRTot
    Right Field : CBLoanLedAMTOPTot,CBLoanLedAMTDRTot

    Local : Field : CBLoanLedHeadSno : Info : ""
    Local : Field : CBLoanLedHeadSno : Delete : Border
    Local : Field : CBLoanLedDetails : Set as : "Total :"
    Local : Field : CBLoanLedDetails : Align : Right
    Local : Field : CBLoanLedHeadSno: Style : Normal Bold


    [Field : CBLoanLedAMTOPTot]
    Use : Amount Field
    set as : @@LoanAssetOpTot ;($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) - ($CreditOpeningBalance:Group:$$GroupCash) + ($$NettAmount:($DebitOpeningBalance:Group:$$GroupCash):($ForexOpeningDr:Group:$$GroupCash))
    Width : 20
    Border : Flush Totals
    Format : "Dr,Cr"


    [Field : CBLoanLedAMTDRTot]
    Use : Amount Field
    set as : @@LoanAssetTot
    Width : 20
    Border : Flush Totals
    Format : "Dr,Cr"


    [Field : CBLoanLedAMTCRTot]
    Use : Amount Field
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Width : @@LongWidth+1
    Border : Thin Bottom Right
    Format : "Dr,Cr"

    [Collection : LoanLedColl]

    Type : Ledger
    Child of : $$GroupAdvances
    Belongs To : Yes
    ; Child of : $$GroupSecuredLoans
    Fetch : ClosingBalance, Name
    Filter : NonEmptyClosingBalance
    Sort : Default : $ClosingBalance, $Name


    ;===================================== F12 Configuration -ok ==============================================

    [Button:CBF12Config]
    Key : F12
    Action : Alter : CBF12Config
    Title : Configure

    [Report:CBF12Config]
    Object : Company
    Form : CBF12Config

    [Form:CBF12Config]
    Top Part: CBF12Title
    Part : CBF12Config
    Full Width : No
    No Confirmation : Yes
    Space Bottom : 3 mm
    Space Left : 4 mm
    Space Right : 4 mm
    Space Top : 3 mm
    Option : Small Size Form
    ; Height : 50% Screen

    [Part:CBF12Title]
    Horizontal Align : Center
    Line : CBF12Title

    [Line:CBF12Title]
    Field : Simple Field
    Space Bottom : 3 mm
    Local:Field: Simple Field : Info : "CASH Bank REPORT"
    Local:Field: Simple Field : Align : Center
    Local:Field: Simple Field : Style : Normal Bold
    Local:Field: Simple Field : Border : Thin Bottom

    [Part:CBF12Config]
    Part:CBF12ConfigL
    Right Part:CBF12ConfigR

    [Part:CBF12ConfigL]
    Background : Light yellow
    Line : CBF12CBReceipt,CBF12CBISlNo,CBF12CBIName,CBF12CBINarr,CBF12CBIVchType,CBF12CBIVchNumber,CBF12CBGropCl,CBF12CBLedopCl;CBF12OpBal,

    [Line:CBF12CBReceipt]
    Field : Medium Prompt,CBF12CBReceipt
    Local:Field: Medium Prompt : Set as : "Show Bank CASH RECEIVED : "
    Space Bottom : 3 mm

    [Field:CBF12CBReceipt]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBReceipt

    [Line:CBF12CBISlNo]
    Field : Medium Prompt,CBF12CBISlNo
    Local:Field: Medium Prompt : Set as : "Show S No. : "
    Space Bottom : 1 mm

    [Field:CBF12CBISlNo]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBISlNo

    [Line:CBF12OpBal]
    Field : Medium Prompt,CBF12OpBal
    Local:Field: Medium Prompt : Set as : "Show Opening Balance : "
    Space Bottom : 1 mm

    [Field:CBF12OpBal]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12OpBal

    [Line:CBF12CBIName]
    Field : Medium Prompt,CBF12CBIName
    Local:Field: Medium Prompt : Set as : "Show Income PARTICULARS : "
    Space Bottom : 1 mm

    [Field:CBF12CBIName]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIName

    [Line:CBF12CBINarr]
    Field : Medium Prompt,CBF12CBINarr
    Local:Field: Medium Prompt : Set as : "Show Income Narration : "
    Space Bottom : 1 mm

    [Field:CBF12CBINarr]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBINarr


    [Line:CBF12CBIVchNumber]
    Field : Medium Prompt,CBF12CBIVchNumber
    Local:Field: Medium Prompt : Set as : "Show Income Vch No. : "
    Space Bottom : 3 mm

    [Field:CBF12CBIVchNumber]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIVchNumber

    [Line:CBF12CBIVchType]
    Field : Medium Prompt,CBF12CBIVchType
    Local:Field: Medium Prompt : Set as : "Show Income Vch type : "
    Space Bottom : 1 mm

    [Field:CBF12CBIVchType]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIVchType

    [Line:CBF12CBGropCl]
    Field : Medium Prompt,CBF12CBGropCl
    Local:Field: Medium Prompt : Set as : "Show Group Opening Closing : "
    Space Bottom : 3 mm

    [Field:CBF12CBGropCl]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBGropCl

    [Line:CBF12CBLedopCl]
    Field : Medium Prompt,CBF12CBLedopCl
    Local:Field: Medium Prompt : Set as : "Show Ledger Opening Closing : "
    Space Bottom : 3 mm

    [Field:CBF12CBLedopCl]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBLedopCl
    ;=================================================
    [Part:CBF12ConfigR]
    Line : CBF12CBExpenses,CBF12CBESlNo,CBF12CBEName,CBF12CBENarr,CBF12CBEVchType,CBF12CBEvchNum,CBF12CBLoanLed

    [Line:CBF12CBExpenses]
    Field : Medium Prompt,CBF12CBExpenses
    Local:Field: Medium Prompt : Set as : "Show Bank/CASH EXPENSES : "
    Space Bottom : 3 mm

    [Field:CBF12CBExpenses]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBExpenses

    [Line:CBF12CBESlNo]
    Field : Medium Prompt,CBF12CBESlNo
    Local:Field: Medium Prompt : Set as : "Show S No. : "
    Space Bottom : 1 mm

    [Field:CBF12CBESlNo]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBESlNo

    [Line:CBF12CBEName]
    Field : Medium Prompt,CBF12CBEName
    Local:Field: Medium Prompt : Set as : "Show Exp. PARTICULARS : "
    Space Bottom : 1 mm

    [Field:CBF12CBEName]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEName

    [Line:CBF12CBENarr]
    Field : Medium Prompt,CBF12CBENarr
    Local:Field: Medium Prompt : Set as : "Show Exp. Narration : "
    Space Bottom : 1 mm

    [Field:CBF12CBENarr]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBENarr


    [Line:CBF12CBEVchtype]
    Field : Medium Prompt,CBF12CBEVchtype
    Local:Field: Medium Prompt : Set as : "Show Exp. Vch type : "
    Space Bottom : 1 mm

    [Field:CBF12CBEVchtype]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEVchtype

    [Line:CBF12CBEvchNum]
    Field : Medium Prompt,CBF12CBEvchNum
    Local:Field: Medium Prompt : Set as : "Show Exp. Vch No. : "
    Space Bottom : 8 mm

    [Field:CBF12CBEvchNum]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEvchNum

    [Line:CBF12Opening]
    Field : Medium Prompt,CBF12Opening
    Local:Field: Medium Prompt : Set as : "Show Group Opening Bal. : "
    Space Bottom : 1 mm

    [Field:CBF12Opening]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12Opening

    [Line:CBF12CBLoanLed]
    Field : Medium Prompt,CBF12CBLoanLed
    Local:Field: Medium Prompt : Set as : "Show Loan Ledger Opening-Closing : "
    Space Bottom : 1 mm

    [Field:CBF12CBLoanLed]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBLoanLed



    [Line:CBF12Closing]
    Field : Medium Prompt,CBF12Closing
    Local:Field: Medium Prompt : Set as : "Show Closing Bal. : "
    Space Bottom : 1 mm

    [Field:CBF12Closing]
    Use : Logical Field Invisible : Not $CBF12CBReceipt:Company:##SVCurrentCompany
    Invisible : Not $CBF12CBExpenses:Company:##SVCurrentCompany
    Set as : $$Value
    Storage : CBF12Closing

    [System:UDF]
    CBF12CBReceipt : Logical : 5898
    CBF12CBExpenses : Logical : 5899
    CBF12OpBal : Logical : 5900
    CBF12CBISlNo : Logical : 5901

    CBF12CBIName : Logical : 5902
    CBF12CBINarr : Logical : 5903
    CBF12CBIVchType : Logical : 5904
    CBF12CBIVchNumber : Logical : 5905
    ; CBF12FaxFlag : Logical : 5906

    CBF12CBGropCl : Logical : 5907
    CBF12CBLedopCl : Logical : 5908

    CBF12CBESlNo : Logical : 5909
    CBF12CBEName : Logical : 5910
    CBF12CBENarr : Logical : 5911
    CBF12CBEVchType : Logical : 5912
    CBF12CBEvchNum : Logical : 5913

    CBF12CBLoanLed : Logical : 5914

    ;======================================================
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Set As : $$FilterAmtTotal:AllLedgerEntries:ChBkEntries:$Amount --- for right side (Payment)

    Do same for receipts.... just change the Filter condition.
     


  20. Mukesh1001

    Mukesh1001 New Member


    upload_2021-7-14_9-23-57.png


    Sirji Cash Bank Total ok But Narration Not Desplay


    [#Menu : Gateway of TAlly]
    Add: Key Item: Cash Bank receipt Expenses :C: Display: Cash Bank receipt Expenses

    [Report: Cash Bank receipt Expenses]
    Use : DSP Template
    Form: Cash Bank receipt Expenses
    Variable : IsMultiPage, InNewPages, ColumnarDayBook, ExtractMode, ShowQtyExtract

    Set : VchTotalTrans : Yes

    Fetch Object : Voucher : VoucherID : *.* AllLedgerEntries.IsVchGroupCash, AllLedgerEntries.IsVchGroupBank,IsReceipt,IsPayment
    ; Variable : SV Print Orientation : String
    Variable : SVFromDate, SVToDate
    Set : SVFromDate : @@DSPFromDate
    Set : SVToDate : @@DSPToDate
    Fetch Object : Voucher : ##VoucherID : AllLedgerEntries.IsVchGroupCash, AllLedgerEntries.IsVchGroupBank
    ;===========================================================

    ;************************
    [Form: Cash Bank receipt Expenses]
    TOP Part : LV Title
    Part : CBreceiptExpenses,
    Part : CBreceiptExpensesTotal,CBLedDetails
    Page Break : DYBK ClPageBreak, DYBK OpPageBreak


    ; Delete : PageBreak
    ; Add : Page Break : DSP ClPageBreak,CBreceiptExpenses ; CB Receipt,CB Expenses ;CBLedDetails ;CBTDayBookTitles

    Height : 100 % Screen
    Width : 100 % Screen
    Space Left : 1
    Space Right : 1 mm
    Vertical Alignment : Centre
    Horizontal Alignment: Centre

    ;;************************ Buttons ************************

    Buttons : PrintButton, ExportButton, UploadButton, MailButton
    Bottom Toolbar Buttons : BottomToolBarBtn1, BottomToolBarBtn3, BottomToolBarBtn4, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12
    Button : ExplodeFlag, ChangePeriod, ChangeCompany
    Add : Bottom Button : CBF12Config


    ;;************************ Part ************************

    [Part : CBReceiptExpenses]
    Part : CB Receipt Expenses1;,CBreceiptExpensesTotal
    Background : @@SV_DAYBOOK

    [Part : CB Receipt Expenses1]
    LEFT Part : CB Receipt
    RIGHT Part : CB Expenses
    Vertical: No
    ; Sync: Yes

    ;;************************************ Page Break ***************************************

    [Part: DYBK Op1PageBreak]
    Parts : DSP OpCompanyName, DSP OpReportTitle, main Title1
    Vertical: Yes
    Space Bottom : 0.5
    [Part : main Title1]
    Add : Left Part : PCB LeftPageBreak,PCB RightPageBreak
    Use : LEDVCH PrintConfigure
    [Part :pCB LeftPageBreak]
    Line : column Left titles,BCICrOpeningBalanceLne
    Use : Petty cash left body
    [Part :pCB RightPageBreak]
    Line : column right titles,RCP OpeningBalanceLne1

    ;;************************************ Page Break End ***************************************

    ;;************************ LEFT Part : BC Receipt ************************

    [Part : CB Receipt]
    Lines : CBReceiptHeadTitle, CBReceiptTitle, CBReceiptDetail
    ;Bottom Line : CBBankReceiptTotal,CBCashReceiptTotal,CBReceiptTotal
    ; Background : Light yellow
    ;Option : Small Size Part
    Scroll : Vertical
    Space Right : 2 mm
    Total : CBICrAmt, CBICashAmt, CBIBankAmt
    Repeat : CBReceiptDetail : CBReceiptcoll
    Invisible : Not $CBF12CBReceipt:Company:##SVCurrentCompany

    [Line : CBReceiptHeadTitle]
    Field : CBReceiptHeadTit

    [Field : CBReceiptHeadTit]
    Set as : "Bank/CASH RECEIVED"
    Full Width: Yes
    Widh : @@LongWidth
    Align: Center
    Background: White
    Border : thin Box

    [Line : CBReceiptTitle]
    Field: CBISlNo., CBIDate, CBIName, CBINarr
    Right Field : CBIVchType, CBIVchNumber, CBICrAmt, CBICashAmt, CBIBankAmt
    Use : CBReceiptDetail
    ; Local: Field: Default : Lines : 1
    Local: Field : Default : Type : String
    Local: Field : Default : Style : Normal Bold
    Local: Field : Default : Align : Centre
    Local: Field: CBISlNo. : Set As : "S.No."
    Local: Field: CBIDate : Set As : "Date"
    Local: Field: CBIName : Set As : "PARTICULARS"
    Local: Field: CBINarr : Set As : "Narration"
    Local: Field: CBIVchType : Set As : "VCH Type"
    Local: Field: CBIVchNumber : Set As : "Vch No."
    Local: Field: CBICrAmt : Set as : "Amount"
    Local: Field: CBICashAmt : Set as : "CASHAmount"
    Local: Field: CBIBankAmt : Set as : "BankAmount"
    Border : Thin Bottom
    ;*********************
    [Line : CBReceiptDetail]

    Left Field: CBISlNo., CBIDate, CBIName, CBINarr
    Right Field : CBIVchType, CBIVchNumber, CBICrAmt, CBICashAmt, CBIBankAmt
    Border:Thin Bottom
    ;======================================================================================
    [Field : CBICashAmt]
    Use : Amount Field
    Set as : If $VchHasCashEntries Then $$AsCrAmt:$LedCrAmt Else 0
    Format : "DrCr, No Zero"
    Invisible : Yes
    [Field : CBIBankAmt]
    Use : Amount Field
    Set as : If Not $VchHasCashEntries Then $$AsCrAmt:$LedCrAmt Else 0
    Format : "DrCr, No Zero"
    Invisible : Yes
    ;=========================================
    [Field: CBISlNo.]
    Set as : $$Line
    Width : @@NumberWidth-3
    Align : Centre
    Border : Thin Left
    Style : normal
    Invisible: Not $CBF12CBISlNo:Company:##SVCurrentCompany

    [Field: CBIDate]
    Use: short Date field
    Type : Date
    Set as : $Date
    Width : @@ShortDateWidth+1
    Align : Right
    Border : Thin LEFT
    Style: normal

    [Field: CBIName]
    Use : Name Field
    Set as : $ledgername
    Width : @@ShortNameWidth+10
    ; Line : 0
    Border : Thin LEFT
    Style : Normal
    Invisible: Not $CBF12CBIName:Company:##SVCurrentCompany

    ; FullWidth : Yes

    Option : Alter on Enter
    Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers

    Option : AlterOnEnter : NOT $$IsRemoteCompany
    Option : Display On Enter : $$IsRemoteCompany AND $$IsVoucher
    Option : DisplayOnAltEnter : $$IsVoucher

    [Field:CBINarr]
    Use : Name Field
    Set as : $Narration
    Style : Small
    Border : Thin LEFT
    Lines : 0
    ; FullWidth : Yes
    Color:blue
    ; Indent : 2

    Invisible: Not $CBF12CBINarr:Company:##SVCurrentCompany

    [Field:CBIVchType]
    Use : Short Name Field
    Set as : $VoucherTypeName
    Width : @@NameWidth-7
    Align : Left
    Border : Thin LEFT
    Style : Small
    Invisible : Not $CBF12CBIVchType:Company:##SVCurrentCompany

    [Field:CBIVchNumber]
    Use : Name Field
    Set as : $VoucherNumber
    Width : @@ShortNameWidth-5
    Max : @@MaxNameWidth
    Align : LEFT
    Border : Thin Left
    Style : tiny
    Invisible: Not $CBF12CBIVchNumber:Company:##SVCurrentCompany

    [Field: CBICrAmt]
    Use: Amount Field
    Style : Normal ,Small
    Border : Thin Left Right
    Style : tiny
    Format : "DrCr"
    Set As : @LedSetAmt
    LedSetAmt : If $$IsEmpty:$LedDrAmt Then $LedCrAmt Else $LedDrAmt
    ;========================================================================
    [Collection : CBReceiptcoll]

    Source Collection : CB Dybk ReceiptVouchers Of Company
    ; Walk : LedgerEntries
    Walk : AllLedgerEntries
    Fetch : MasterId, Date, Narration
    Fetch : AllLedgerEntries.*


    By : VoucherNumber : $VoucherNumber
    By : VoucherTypeName : $VoucherTypeName
    By : LedgerName : $LedgerName
    By : IsDeemedPositive : $IsDeemedPositive
    Compute : VchHasCashEntries: $..VchCashEntries

    Compute : VchDate : $Date
    AggrCompute : LedDrAmt : Sum : If $$IsDr:$Amount Then $Amount Else 0
    Aggr Compute: LedCrAmt : Sum : If Not $$IsDr:$Amount Then $Amount Else 0

    Filter : CBCreditLedgersFilt

    ;;************************ RIGHT Part : CB Expenses ************************

    [Part : CB Expenses]
    Scroll : Vertical
    Lines : CBExpensesHeadTitle, CBExpensesTitle, CBExpensesTitleDetail ; CBExpensesOpBal,
    Repeat:CBExpensesTitleDetail : Expensescoll
    Invisible : Not $CBF12CBExpenses:Company:##SVCurrentCompany
    Total:CBEAmount, CBECashAmt, CBEBankAmt

    [Line : CBExpensesHeadTitle]
    Field : CBExpensesHeadTitle
    [Field : CBExpensesHeadTitle]
    Set as : "Bank/CASH EXPENSES"
    Full Width: Yes
    Align: Center
    Background: White
    Border : thin Box

    [Line : CBExpensesTitle]

    ; Field: CBESlNo., CBEDate, CBEName, CBENarr
    ; Right Field : CBEVchType, CBEvchNum, CBEAmount
    Use : CBExpensesTitleDetail
    ; Local: Field: Default : Lines : 1
    Local: Field : Default : Type : String
    Local: Field : Default : Style : Normal Bold
    Local: Field : Default : Align : Centre
    Local: Field: CBESlNo. : Set As : "S.No."
    Local: Field: CBEDate : Set As : "Date"
    Local: Field: CBEName : Set As : "PARTICULARS"
    Local: Field: CBENarr : Set As : "Narration"
    Local: Field: CBEVchType : Set As : "VCH Type"
    Local: Field: CBEvchNum : Set As : "Vch No."
    Local: Field: CBEAmount : Set as : "Amount"
    Local: Field: CBECashAmt : Set as : "CASHAmt"
    Local: Field: CBEBankAmt : Set as : "BankAmt"
    Border : Thin Bottom

    ;*********************

    [Line : CBExpensesTitleDetail]
    Left Field: CBESlNo., CBEDate, CBEName, CBENarr
    Right Field : CBEVchType, CBEvchNum, CBEAmount, CBECashAmt, CBEBankAmt
    Border:Thin Bottom
    ; Option : Alter On Enter
    ;Option : DisplayOnAltEnter : $$IsVoucher AND NOT $IsDeleted
    ;======================================================================================
    [Field : CBECashAmt]
    Use : Amount Field
    Set as : If $VchHasCashEntries Then $$AsDrAmt:$LedDrAmt Else 0
    Format : "DrCr, No Zero"
    Invisible : Yes
    [Field : CBEBankAmt]
    Use : Amount Field
    Set As : If Not $VchHasCashEntries Then $LedDrAmt Else 0
    Format : "DrCr, No Zero"
    Invisible : Yes
    ;=========================================





    [Field: CBESlNo.]
    Set as : $$Line
    Width : @@NumberWidth-3
    Align : Centre
    Border : Thin Left
    Style : normal
    Invisible: Not $CBF12CBESlNo:Company:##SVCurrentCompany

    [Field: CBEDate]
    Use: short Date field
    Type : Date
    Set as : $Date
    Width : @@ShortDateWidth+1
    Align : Right
    Border : Thin LEFT
    Style: normal

    [Field: CBEName]

    Use : Name Field
    Set as : $ledgername ;$Name ;
    Width : @@ShortNameWidth+10
    ; Line : 0
    Border : Thin LEFT
    Style : Normal
    ; FullWidth : Yes
    Invisible: Not $CBF12CBEName:Company:##SVCurrentCompany

    Option : Alter on Enter
    Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers

    Option : AlterOnEnter : NOT $$IsRemoteCompany
    Option : Display On Enter : $$IsRemoteCompany AND $$IsVoucher
    Option : DisplayOnAltEnter : $$IsVoucher


    [Field:CBENarr]
    Use : Name Field
    Set as : $Narration
    Style : Small
    Border : Thin LEFT
    Lines : 0
    Color:blue
    FullWidth : Yes

    Invisible : Not $CBF12CBENarr:Company:##SVCurrentCompany

    [Field:CBEVchType]
    Use : Name Field
    Set as : $VoucherTypeName
    Width : @@NameWidth-5
    Align : Left
    Border : Thin LEFT
    Style : Small

    Invisible : Not $CBF12CBEVchtype:Company:##SVCurrentCompany


    [Field:CBEvchNum]
    Use : Short Name Field
    Set as : $VoucherNumber
    Width : @@ShortNameWidth-5
    Max : @@MaxNameWidth
    ; Width : 7% Page
    Align : LEFT
    Border : Thin Left
    Style : tiny
    Invisible: Not $CBF12CBEvchNum:Company:##SVCurrentCompany

    [Field: CBEAmount]

    Use: Amount Field
    ; Set As : $$FilterAmtTotal:AllLedgerEntries:ChBkEntries:$Amount ;ok
    Set As : If $VchHasCashEntries Then $LedDrAmt Else 0
    Width : @@DSPAmtWidth+5
    Border : Thin Left Right
    Style : tiny
    Format : "DrCr, No Zero"
    ;===========================
    Set As : @LedSetAmt
    LedSetAmt : If $$IsEmpty:$LedDrAmt Then $LedCrAmt Else $LedDrAmt

    ;========================================================================test

    ;===================================Collection: Expensescoll
    [Collection: Expensescoll]
    Source Collection : CB Dybk Payment Vouchers Of Company
    Walk : AllLedgerEntries
    Fetch : AllLedgerEntries.*
    Fetch : MasterId, Date, Narration

    By : VoucherNumber : $VoucherNumber
    By : VoucherTypeName : $VoucherTypeName
    By : LedgerName : $LedgerName
    By : IsDeemedPositive : $IsDeemedPositive
    Compute : VchHasCashEntries: $..VchCashEntries
    AggrCompute : LedDrAmt : Sum : If $$IsDr:$Amount Then $Amount Else 0
    Aggr Compute: LedCrAmt : Sum : If Not $$IsDr:$Amount Then $Amount Else 0
    Filter : CBDebitLedgersFilt

    ;========================================= Part CB Receipt Expenses Total =============




    [Part : CBReceiptExpensesTotal]
    Left Part : CBReceiptTotal1
    Right Part : CBExpensesTotal
    Horizontal Alignment: Centre
    Space Bottom : 2 mm
    Space Right : 1 mm
    Background : @@SV_DAYBOOK
    ;Option : Small Part
    [Part : CBReceiptTotal1]
    Left Part : CBGRCash
    Space Right : 3 mm
    Fixed : Yes
    Horizontal Alignment: Centre
    [Part : CBReceiptTotal]
    Width : 40% page ;107.5
    Border : Thin Box
    Background : Light yellow
    Total : CBReceiptTotal
    Space Left : 5 mm
    ;Space Right : 3 mm



    ;=============================================================================== test
    [Collection : CB Dybk ReceiptVouchers Of Company]
    Type : Voucher
    Filter : CBDayBookReceiptVouchers
    Compute : IsRecptVch : $$IsReceipt:##SVVoucherType

    [Collection : CB Dybk Payment Vouchers Of Company]
    Type : Voucher
    Fetch : Narration, Ledger, Date
    Filter : CBDayBookPaymentVouchers
    ; Filter : IsNonOptionalCancelledVchs
    Compute : IsPymntVchType : $$IsPayment:$VoucherTypeName
    [System : Formula]
    TALLYBUSYIsCashLedgers : $IsCashAccount:Ledger:$LedgerName
    CBDayBookPaymentVouchers : $$IsPayment:$VoucherTypeName
    CBDayBookReceiptVouchers : $$IsReceipt:$VoucherTypeName ;AND +
    ; $$IsEmpty:$AllLedgerEntries[1, (@@TALLYBUSYIsCashLedgers:Ledger:$LedgerName)].LedgerName

    CBIsBankAccount : $IsBankAccount:Ledger:$LedgerName ; ok
    CBIsCashAccount : $IsCashAccount:Ledger:$LedgerName ; ok


    TotalGrpDrVchAmt1 : $$OrigVchGrpDrTotal:$$GroupCash
    LedVchDrBal : Sum : if NOT $$IsDr:$Amount Then $$AsCrAmt:$$Negative:$Amount Else $$AsAmount:"0"
    LedVchCrBal : Sum : if $$IsDr:$Amount Then $$AsDrAmt:$$Negative:$Amount Else $$AsAmount:"0"
    ; CBLedgerNarrFltr : NOT $$IsEmpty:$Narration ;AND ((NOT $$IsDr:$Amount AND @@IsSales) OR ($$IsDr:$Amount AND @@IsPurchase))
    [#Object : Voucher]
    VchBankEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@CBIsBankAccount].LedgerName
    VchCashEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@CBIsCashAccount].LedgerName
    VchCashBankEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@IsCashBankLed].LedgerName

    VchCashEntries : Not $$IsEmpty:$AllLedgerEntries[1, @@TALLYBUSYIsCashLedgers].LedgerName
    DaybookAmount : $AllLedgerEntries[1,@@TALLYBUSYIsCashLedgers].Amount
    ;=================================================================


    ;=========================================================================================

    [Collection : CBICrAmt]
    Collection : ReceiptvchsGroupBank
    Collection : ReceiptvchsGroupCash
    Collection : ContravchsGroupCash

    [Collection : ReceiptvchsGroupBank]
    Object : Group:$$GroupBank
    Collection : Receipt Vouchers, All Receipt Vouchers
    Type : Vouchers : group
    Childof : $$groupbank
    Fetch : AllLedgerEntries.*
    Filter : CBReceipt
    Fetch : Narration, Ledger, Date, DueDateOfPymt, Amount
    Compute : IsRecptVch : $$IsReceipt:##SVVoucherType
    ;===========================================================================================
    [Collection : ReceiptvchsGroupCash]
    Object : Group:$$GroupCash

    Collection : CB Dybk ReceiptVouchers Of Company
    Type : Vouchers : group
    Childof : $$GroupCash
    Fetch : AllLedgerEntries.*
    Fetch : MasterId, Date, Narration
    Fetch : Name, OpeningBalance, ClosingBalance, DebitTotals, CreditTotals
    Fetch : Amount
    ; Fetch : Narration, Ledger, Date, DueDateOfPymt, Amount
    ; Filter : TotalCashAmount ;
    Filter : CBDayBookReceiptVouchers ;CBReceipt, DaybookAmount;CBCreditLedgersFilt ;CBDebitLedgersFilt ;CBReceipt
    Compute : IsRecptVch : $$IsReceipt:##SVVoucherType
    Compute : SecondLedger : $AllLedgerEntries[2].LedgerName
    Compute : DaybookAmount : $AllLedgerEntries[1].Amount

    Aggr Compute : DrGroupExtract : Sum :If $$IsDr:$Amount Then $Amount Else 0
    Aggr Compute : CrGroupExtract : Sum :If NOT $$IsDr:$Amount Then $Amount Else 0
    Filter : CBDayBookReceiptVouchers
    Fetch : Date, VoucherTypeName, VoucherNumber, Narration


    [System:Formulas]
    ; CBReceipt : $$IsReceipt:$VoucherTypeName
    CBReceipt : $$IsReceipt:$VoucherTypeName Or $$IsPayment:$VoucherTypeName AND +
    $$IsEmpty:$AllLedgerEntries[1, (@@TALLYBUSYIsCashLedgers:Ledger:$LedgerName)].LedgerName
    Contravchs : $$IsContra:$VoucherTypeName
    ChBkEntries : Not $LedgerName AND NOT $$IsDr:$Amount

    CBCreditLedgersFilt : Not $IsDeemedPositive
    CBDebitLedgersFilt : $IsDeemedPositive
    DaybookAmount : $AllLedgerEntries[1,@@TALLYBUSYIsCashLedgers].Amount
    DrGroupExtract : Sum :If $$IsDr:$Amount Then $Amount Else 0
    CrGroupExtract : Sum :If NOT $$IsDr:$Amount Then $Amount Else 0

    IsDrAmt : $$IsDr:$Amount
    IsCrAmt : NOT $$IsDr:$Amount


    ;------------------------------------------------------------------ Test
    ; TotalCashAmount : $$FilterAmtTotal:AllLedgerEntries:ForPartyLedgerName:$Amount
    ; ForPartyLedgerName : $LedgerName = $PartyLedgerName


    ;-------------------------------------------------------------Part : CBExpensesTotal--------------------------------------------------------------------------------------------
    [Part : CBExpensesTotal]
    Line : CBBankExpTot,CBCashExpTot,CBExpTot
    Border : Thin Box
    Space Left : 2
    Invisible : Not $CBF12CBExpenses:Company:##SVCurrentCompany

    [Line : CBBankExpTot]
    Right Field : Simple Prompt,AmountField
    Local: Field: Simple Prompt : Info : " Bank Paid:"
    Local: Field: AmountField : Set as : $$Total:CBEBankAmt
    ; Local: Field: AmountField : Set as : $$CollAmtTotal:paymentvchsGroupBank:$amount ;$CreditTotals:Group:$$GroupBank ;$$Total:CBEAmount - $$CollAmtTotal:paymentvchsGroupCash:$amount ;($$CollAmtTotal:ContravchsGroupBank:$amount-$CreditTotals:$$GroupBank) ;$$CollAmtTotal:paymentvchsGroupBank:$amount
    Local: Field: AmountField : Format : "DrCr" ;For Test
    Local: Field: AmountField : Background : Red


    [Line : CBCashExpTot]
    Right Field : Simple Prompt,AmountField
    Local: Field: Simple Prompt : Info : " Cash Paid:"
    Local: Field: AmountField : Set as : $$Total:CBECashAmt
    ; Local: Field: AmountField : Set as : $CreditTotals:Group:$$GroupCash ;($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    ; Local: Field: AmountField : Set as : $$CollAmtTotal:Expensescoll:$amount ;($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    ; Local: Field: AmountField : Set as : ($$CollAmtTotal:pymtContravchsGroupCash:$amount-$CreditTotals:$$GroupCash) ;$$CollAmtTotal:paymentvchsGroupCash:$amount ;
    ; Local: Field: AmountField : Set as : ($$CollAmtTotal:paymentvchsGroupCash:$amount) ;$$Total:CBEAmount - ($$CollAmtTotal:paymentvchsGroupBank:$amount) ;($$CollAmtTotal:ContravchsGroupCash:$amount-$CreditTotals:$$GroupCash)
    ; Local: Field: AmountField : Background : Red
    Local: Field: AmountField : Format : "DrCr" ;For Test

    [Line : CBExpTot]
    Right Field : Simple Prompt,AmountField
    Space Bottom : .25


    Local: Field: AmountField : Border : Totals
    Local: Field: Simple Prompt : Info : "Total Paid:"
    Local: Field: AmountField : Set as : $$Total:CBEAmount
    Local: Field: AmountField : Format : "DrCr" ;For Test
    Local: Field: AmountField : Background : Green
    ;============================================================================
    [Collection : PaymentvchsGroupBank]
    Type : Vouchers : group
    Childof : $$GroupBank
    Fetch : Amount
    Filter : CBPayment
    Filter : NonDeletedVoucher

    [Collection : PaymentvchsGroupCash]
    Type : Vouchers : group
    Childof : $$GroupCash
    Fetch : Amount
    Filter : CBPayment
    Filter : NonDeletedVoucher

    [Collection : PymtContravchsGroupCash]
    Type : Vouchers : group
    Childof : $$GroupCash
    Filter : Contravchs
    Fetch : Amount

    [System:Formula]
    CBPayment : $$IsPayment:$VoucherTypeName

    ;===========================================================================================================

    [System:Formula]
    CashBalance : $$NettAmount:($BSClosing:Group:"Cash-in-Hand"):($ForexClosing:Group:"Cash-in-Hand")
    BankBalance : $$NettAmount:($BSClosing:Group:"Bank Accounts"):($ForexClosing:Group:"Bank Accounts")
    LoanAssetTot : $$NettAmount:($BSClosing:Group:"Loans & Advances (Asset)"):($ForexClosing:Group:"Loans & Advances (Asset)")
    LoanAssetOpTot : $$NettAmount:($BSOpening:Group:"Loans & Advances (Asset)"):($ForexClosing:Group:"Loans & Advances (Asset)")

    ;;;============= CashBank
    [Part:CBGRCash]
    Line : CBGRCashTitle,CBGRCash,CBGRBank,CBGRCashTot
    Border : Thin Box
    Invisible : Not $CBF12CBReceipt:Company:##SVCurrentCompany

    Total : CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany
    Local : Field : CBGrOpening : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany
    Local : Field : CBGrClosing : Invisible : Not $CBF12CBGropCl:Company:##SVCurrentCompany

    [Line:CBGRCashTitle]
    Field : CBGRTit ,CBGrOpening,CBGrClosing
    Local : Field : Default : Align : Center
    Local : Field : Default : Background : MenuTitleBGClr
    Local : Field : Default : Color : White
    Local : Field : Default : Style : Normal Bold
    Local : Field : CBGRTit : Info : "Group Name"
    Local : Field : CBGrOpening : Info : "Opening"
    Local : Field : CBGrClosing : Info : "Closing"

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Local: Field: Simple Prompt : Info : ""
    Local: Field: CBRECEIVEDCurr : Set as : ""
    Local : Field : CBRECEIVEDCurr :Background : Light yellow
    Local : Field : Simple Prompt : Background : Light yellow

    [Line:CBGRCash]

    Field : CBGRTit,CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Set as : "Cash Balance:"
    Local : Field : CBGrOpening : Set as : $OpeningBalance:Group:$$GroupCash:$$CurrentCompany ;If Not $$IsDr:$OpeningBalance:Group:$$GroupCash:$$CurrentCompany Then $OpeningBalance:Group:$$GroupCash:$$CurrentCompany Else "" ;$OpeningBalance:Group:$$GroupCash:$$CurrentCompany
    Local : Field : CBGrClosing : Set as : @@CashBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Total : CBCashRECEIVEDCurr : CBCashRECEIVEDcoll

    Local: Field: Simple Prompt : Info : "Cash Received:"
    Local: Field: CBRECEIVEDCurr : Set as : $$Total:CBICashAmt
    Local: Field: CBRECEIVEDCurr : Background : Red
    Local: Field: Simple Prompt : Background : Light yellow

    [Line:CBGRBank]

    Field : CBGRTit,CBGrOpening,CBGrClosing
    Local : Field : CBGRTit : Set as : "Bank Balance: "
    Local : Field : CBGrOpening : Set as : $$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank) ; Bank Opening Amt ok ------------
    Local : Field : CBGrClosing : Set as : @@BankBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr
    Total : CBRECEIVEDCurr : CBBankRECEIVEDcoll
    Local: Field: Simple Prompt : Info : "Bank Received:"
    Local: Field: CBRECEIVEDCurr : Set as : $$Total:CBIBankAmt ;$$CollAmtTotal:ReceiptvchsGroupBank:$amount
    Local : Field : Simple Prompt : Background : Light yellow


    [Line:CBGRCashTot]
    Field : CBGRTit,CBGrOpening,CBGrClosing

    Local : Field : Default : Border : Totals
    Local : Field : CBGRTit : Set as : "Total:"
    Local : Field : CBGrOpening : Set as : ($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) + $DebitOpeningBalance:Group:$$GroupCash - $CreditOpeningBalance:Group:$$GroupCash ;;GroupOpeningTotalAmt -ok
    Local : Field : CBGrClosing : Set as : If $$IsDr:mad:@BankBalance AnD $$IsDr:mad:@CashBalance then @@BankBalance+@@CashBalance else + @@CashBalance - @@BankBalance

    Right Fields : Simple Prompt,CBRECEIVEDCurr

    Local: Field: Default : Align : Right
    Local: Field: CBRECEIVEDCurr : Border : Totals
    Local: Field: Simple Prompt : Info : $$LocaleString:"Total:"
    Local: Field: CBRECEIVEDCurr : Set as : $$Total:CBICrAmt
    Local: Field: CBRECEIVEDCurr : Background : Green

    [Field:CBGRTit]
    Use : Name Field
    Align : Center
    Width : 14 ;@@LongWidth
    Style : Normal ;Bold
    Border : Thin Left Right

    [Field:CBGrOpening]
    Use : Amount Field
    Format : "DrCr"
    width : 17
    Border : Thin Right
    Color : IF $$IsDr:#CBGrOpening Then "Black" Else "Red"
    ; Space Right : 5 mm

    [Field:CBGrClosing]
    Use : Amount Field
    Format : "DrCr"
    width : 17
    Border : Thin Right
    Color : IF $$IsDr:#CBGrClosing Then "Black" Else "Red"

    [Field: CBRECEIVEDCurr]
    Use : Amount Field
    Width :mad:@DSPAmtWidth+5
    Align : RIGHT
    ; Background : Red
    Format : "DrCr"
    ;=========================================================================================================================
    [Part : CBLedDetails]


    Left Part : CBLedDet
    Right Part : CBLoanLedDetails
    Horizontal Alignment: Centre
    Height : 25% Screen

    [Part : CBLedDet]
    Line : CBLedDetailsTL,CBLedDetails1,CBLedDetails;,CBLedAmtTotal ;CBLedDetailsTL
    Bottom Line : CBLedAmtTotal
    Repeat : CBLedDetails : CBBANKCASHColl
    Space Right : 3 mm
    Option : Small Size Part
    Scroll : Vertical ;Yes
    Invisible : Not $CBF12CBLedopCl:Company:##SVCurrentCompany
    Total: CBLedAmtOP, CBLedAMTCl
    [Line : CBLedDetailsTL]
    Field : Simple Field
    Local : Field : Default : FullWidth : Yes
    Local : Field : Simple Field : Set as : "Cash Bank Details on " + $$String:##SVFromDate + " To " + $$String:##SVCurrentDate ; + " " + " (" + $$String:##SVFromDate ;+ " " + "Cash Opening Balance : " + " " ;;+ if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Box

    [Line:CBLedDetails1]

    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOP,CBLedAmtCl
    Local : Field : Default : Background : Green
    Use : CBLedDetails

    Local: Field: Default : Border:Thin Left Top Bottom
    Local: Field: Default : Type : String
    Local: Field: Default : Align : Center
    Local: Field: Default : Style : Small Bold
    Local: Field: Default : Color : Black
    Local: Field: CBLedSno : Set as : "S.No."
    Local: Field: CBLedName : Set as : "Bank/Cash Ledger Name"
    Local: Field: CBLedName : Width : FullWidth : Yes
    Local: Field: CBLedAMTOP : Set as : "Opening"
    Local: Field: CBLedAMTCl : Set as : "Closing "

    [Line : CBLedDetails]

    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOP,CBLedAmtCl
    Border:Thin Bottom

    [Field : CBLedSno]
    Use : Number Field
    Set As : $$Line
    Align : Centre
    width : @@NumberWidth-1
    Border : Thin Left Right

    [Field : CBLedName]
    Use : Name Field
    Set As : $Name
    Align : Left
    Border : Thin Right
    FullWidth : Yes
    Width : 20 ;@@ShortNameWidth+10
    Style : Small
    Scroll : Vertical

    Option : Alter on Enter
    Alter : Ledger
    Variable: Ledger Name
    Display : Ledger Vouchers

    [Field : CBLedAmtOP]
    Use:Amount Field
    ; Use : CBLoanLedAMTOP
    set as : $OpeningBalance ; ;if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Right
    Width : 20
    Format : "DrCr, No Zero"
    Style : Small ;Bold
    Color : IF $$IsDr:#CBLedAmtOP Then "Black" Else "Red"
    Align : Right
    Background : Green

    [Field : CBLedAmtCl]

    Use : CBLoanLedAMTOP
    Set As : $ClosingBalance
    Color : IF $$IsDr:#CBLedAmtCl Then "Black" Else "Red"
    ; Border : Thin Left Right
    ; Format : "DrCr, No Zero"
    ; Width : 20


    [Line : CBLedAmtTotal]


    ; Field : CBLedSno,CBLedName,CBLedAmtOpTot,CBLedAmtClTot

    Field : CBLedSno,CBLedName,
    Right Field : CBLedAmtOpTot,CBLedAmtClTot
    Local: Field: Default : Style : Small Bold
    Local: Field: Default : Delete : Border
    Local: Field: CBLedAmtOpTot : Border : Double Bottom
    Local: Field: CBLedAmtClTot : Border : Double Bottom
    Local: Field: CBLedSno : Info : ""
    Local: Field: CBLedName : FullWidth :yes
    Local: Field: CBLedName : Set as : "Total :"
    Local: Field: CBLedName : Align : Right


    [Field : CBLedAmtOpTot]
    Use : CBLoanLedAMTOP

    set as : ($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) - ($CreditOpeningBalance:Group:$$GroupCash) + ($$NettAmount:($DebitOpeningBalance:Group:$$GroupCash):($ForexOpeningDr:Group:$$GroupCash))
    Color : IF $$IsDr:#CBLedAmtOpTot Then "Black" Else "Red"

    [Field : CBLedAmtClTot]
    Use : CBLoanLedAMTOP
    set as : ($$NettAmount:($DebitClosingBalance:Group:$$GroupBank):($ForexClosingDr:Group:$$GroupBank)) - ($CreditClosingBalance:Group:$$GroupCash) + ($$NettAmount:($DebitClosingBalance:Group:$$GroupCash):($ForexClosingDr:Group:$$GroupCash))
    Color : IF $$IsDr:#CBLedAmtClTot Then "Black" Else "Red"


    [Field : CBLedAmtCrTot]
    Use : CBLedAmtCr
    Set As : $$CollAmtTotal:CBCashLedColl:$Amount
    Border : Totals
    Color : IF $$IsDr:#CBLedAmtCrTot Then "Black" Else "Red"

    [Collection : CBBANKCASHColl]
    Collection : CBBankLedColl
    Collection : CBCashLedColl

    [Collection : CBBankLedColl]

    Type : Ledger
    Child of : $$GroupBank
    Belongsto : yes
    Fetch : Closing Balance, Opening Balance, Name
    By : LedgerName : $LedgerName
    Sort : Default : $ClosingBalance, $Name
    ; Filter : NonEmptyClosingBalance ;;-code-ok
    ; Filter : CBLedForexEmpty

    [Collection : CBCashLedColl]

    Type : Ledger
    Child of : $$GroupCash
    Belongsto : yes

    Fetch : Closing Balance, Opening Balance, Name
    Compute : ClosingBalance: $ClosingBalance:Group:$Parent
    ;Filter : CBNonEmptyLedgers
    Filter : NonEmptyBalance

    [System: Formula]


    NonEmptyBalance : NOT $$IsEmpty:$OpeningBalance
    NonEmptyClosingBalance : NOT $$IsEmpty:$ClosingBalance
    ; CBNonEmptyLedgers : NOT $$IsEmpty:mad:@AllLedOpening OR NOT $$IsEmpty:$DebitTotals OR NOT $$IsEmpty:$CreditTotals
    ; CBNonEmptyLedgers : NOT $$IsEmpty:mad:@AllLedClosing OR @@AllLedOpening ;OR NOT $$IsEmpty:$DebitTotals OR NOT $$IsEmpty:$CreditTotals




    Local : Collection: Ledger : Filter : NonEmptyLedgers, ExcludeGroup
    ;;**********************************************************************************************************

    [Part : CBLoanLedDetails]

    Line : CBLoanLedDetailsTL,CBLoanLedDetails1,CBLoanLedDetails;,CBLoanLedATOTAL ;CBLoanLedDetailsTL
    Bottom Line : CBLoanLedATOTAL
    Repeat : CBLoanLedDetails : LoanLedColl
    Scroll : Vertical
    Option : Small Part
    Invisible : Not $CBF12CBLoanLed:Company:##SVCurrentCompany


    [Line : CBLoanLedDetailsTL]
    Border : Thin Box
    Field : Simple Field
    ; Local : Field : Default : FullWidth : Yes
    Local : Field : Simple Field : Set as : "Cash, Bank and Loans Details and on " + $$String:##SVCurrentDate ; + " " + " (" + $$String:##SVFromDate ;+ " " + "Cash Opening Balance : " + " " ;;+ if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance

    [Line:CBLoanLedDetails1]

    Local : Field : Default : Background : Green
    Use : CBLoanLedDetails

    Local : Field : Default : Type : String
    Local : Field : Default : Align : Center
    Local : Field : Default : Border : Thin Top Bottom Right
    Local : Field : Default : Style : Small Bold
    Local : Field : CBLoanLedHeadSno : Set as : "S.No."
    Local : Field : CBLoanLedDetails : Set as : "Loans(Asset) Ledger Name"
    Local : Field : CBLoanLedAMTOP : Set as : "Opening"
    Local : Field : CBLoanLedAMTDR : Set as : "Closing"
    Option : Alter On Enter
    Option : DisplayOnAltEnter : $$IsVoucher AND NOT $IsDeleted

    [Line : CBLoanLedDetails]

    Field : CBLoanLedHeadSno,CBLoanLedDetails;,CBLoanLedAMTOP,CBLoanLedAMTDR,CBLoanLedAMTCR
    Right Field : CBLoanLedAMTOP,CBLoanLedAMTDR;,CBLoanLedAMTCR
    Border:Thin Bottom

    [Field : CBLoanLedHeadSno]
    Use : CBLedSno

    [Field : CBLoanLedDetails]
    Use : CBLedName
    Set As :$Name
    Width : 20
    Border : Thin Right
    Style : Normal
    FullWidth : Yes
    Format : "DrCr, No Zero"
    Scroll : Yes

    [Field : CBLoanLedAMTOP]
    Use:Amount Field
    set as : if NOT ##DSPWithOpening then 0 else if $$ParentPeriodFrom < @@DSPFromDate then $$FromValue:$$ParentPeriodFrom:$$ToValue:mad:@DSPFromDateLessOne:$ClosingBalance else $OpeningBalance
    Border : Thin Right
    Width : 20
    Format : "DrCr, No Zero"

    [Field : CBLoanLedAMTDR]
    Use : Amount Field
    Set As : IF $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Border : Thin Right
    Width : 20 ;@@LongWidth+1
    Format : "Dr,Cr"

    [Field : CBLoanLedAMTCR]
    Use : Amount Field
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Width : 25 ;@@LongWidth+1
    Border : Thin Right
    Format : "Dr,Cr"

    [Line : CBLoanLedATOTAL]
    ; Use : CBLoanLedDetails
    Field : CBLoanLedHeadSno,CBLoanLedDetails;,CBLoanLedAMTOPTot,CBLoanLedAMTDRTot;,CBLoanLedAMTCRTot
    Right Field : CBLoanLedAMTOPTot,CBLoanLedAMTDRTot

    Local : Field : CBLoanLedHeadSno : Info : ""
    Local : Field : CBLoanLedHeadSno : Delete : Border
    Local : Field : CBLoanLedDetails : Set as : "Total :"
    Local : Field : CBLoanLedDetails : Align : Right


    [Field : CBLoanLedAMTOPTot]
    Use : Amount Field
    set as : @@LoanAssetOpTot ;($$NettAmount:($DebitOpeningBalance:Group:$$GroupBank):($ForexOpeningDr:Group:$$GroupBank)) - ($CreditOpeningBalance:Group:$$GroupCash) + ($$NettAmount:($DebitOpeningBalance:Group:$$GroupCash):($ForexOpeningDr:Group:$$GroupCash))
    Width : 20
    Border : Double Bottom
    Format : "Dr,Cr"


    [Field : CBLoanLedAMTDRTot]
    Use : Amount Field
    set as : @@LoanAssetTot
    Width : 20
    Border : Double Bottom
    Format : "Dr,Cr"


    [Field : CBLoanLedAMTCRTot]
    Use : Amount Field
    Set As : If Not $$IsDr:$ClosingBalance then $ClosingBalance Else ""
    Width : @@LongWidth+1
    Border : Thin Bottom Right
    Format : "Dr,Cr"

    [Collection : LoanLedColl]

    Type : Ledger
    Child of : $$GroupAdvances
    Belongs To : Yes
    ; Child of : $$GroupSecuredLoans
    Fetch : ClosingBalance, Name
    ; Filter : NonEmptyClosingBalance
    Filter : NonEmptyBalance
    Sort : Default : $ClosingBalance, $Name

    ;===================================== F12 Configuration -ok ==============================================

    [Button:CBF12Config]
    Key : F12
    Action : Alter : CBF12Config
    Title : Configure

    [Report:CBF12Config]
    Object : Company
    Form : CBF12Config

    [Form:CBF12Config]
    Top Part: CBF12Title
    Part : CBF12Config
    Full Width : No
    No Confirmation : Yes
    Space Bottom : 3 mm
    Space Left : 4 mm
    Space Right : 4 mm
    Space Top : 3 mm
    Option : Small Size Form
    ; Height : 50% Screen

    [Part:CBF12Title]
    Horizontal Align : Center
    Line : CBF12Title

    [Line:CBF12Title]
    Field : Simple Field
    Space Bottom : 3 mm
    Local:Field: Simple Field : Info : "CASH Bank REPORT"
    Local:Field: Simple Field : Align : Center
    Local:Field: Simple Field : Style : Normal Bold
    Local:Field: Simple Field : Border : Thin Bottom

    [Part:CBF12Config]
    Part:CBF12ConfigL
    Right Part:CBF12ConfigR

    [Part:CBF12ConfigL]
    Background : Light yellow
    Line : CBF12CBReceipt,CBF12CBISlNo,CBF12CBIName,CBF12CBINarr,CBF12CBIVchType,CBF12CBIVchNumber,CBF12CBGropCl,CBF12CBLedopCl;CBF12OpBal

    [Line:CBF12CBReceipt]
    Field : Medium Prompt,CBF12CBReceipt
    Local:Field: Medium Prompt : Set as : "Show Bank CASH RECEIVED : "
    Space Bottom : 3 mm

    [Field:CBF12CBReceipt]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBReceipt

    [Line:CBF12CBISlNo]
    Field : Medium Prompt,CBF12CBISlNo
    Local:Field: Medium Prompt : Set as : "Show S No. : "
    Space Bottom : 1 mm

    [Field:CBF12CBISlNo]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBISlNo

    [Line:CBF12OpBal]
    Field : Medium Prompt,CBF12OpBal
    Local:Field: Medium Prompt : Set as : "Show Opening Balance : "
    Space Bottom : 1 mm

    [Field:CBF12OpBal]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12OpBal

    [Line:CBF12CBIName]
    Field : Medium Prompt,CBF12CBIName
    Local:Field: Medium Prompt : Set as : "Show Income PARTICULARS : "
    Space Bottom : 1 mm

    [Field:CBF12CBIName]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIName

    [Line:CBF12CBINarr]
    Field : Medium Prompt,CBF12CBINarr
    Local:Field: Medium Prompt : Set as : "Show Income Narration : "
    Space Bottom : 1 mm

    [Field:CBF12CBINarr]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBINarr


    [Line:CBF12CBIVchNumber]
    Field : Medium Prompt,CBF12CBIVchNumber
    Local:Field: Medium Prompt : Set as : "Show Income Vch No. : "
    Space Bottom : 3 mm

    [Field:CBF12CBIVchNumber]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIVchNumber

    [Line:CBF12CBIVchType]
    Field : Medium Prompt,CBF12CBIVchType
    Local:Field: Medium Prompt : Set as : "Show Income Vch type : "
    Space Bottom : 1 mm

    [Field:CBF12CBIVchType]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBIVchType


    [Line:CBF12CBGropCl]
    Field : Medium Prompt,CBF12CBGropCl
    Local:Field: Medium Prompt : Set as : "Show Group Opening Closing : "
    Space Bottom : 3 mm

    [Field:CBF12CBGropCl]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBGropCl

    [Line:CBF12CBLedopCl]
    Field : Medium Prompt,CBF12CBLedopCl
    Local:Field: Medium Prompt : Set as : "Show Ledger Opening Closing : "
    Space Bottom : 3 mm

    [Field:CBF12CBLedopCl]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBLedopCl
    ;=================================================
    [Part:CBF12ConfigR]
    Line : CBF12CBExpenses,CBF12CBESlNo,CBF12CBEName,CBF12CBENarr,CBF12CBEVchType,CBF12CBEvchNum,CBF12CBLoanLed

    [Line:CBF12CBExpenses]
    Field : Medium Prompt,CBF12CBExpenses
    Local:Field: Medium Prompt : Set as : "Show Bank/CASH EXPENSES : "
    Space Bottom : 3 mm

    [Field:CBF12CBExpenses]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBExpenses

    [Line:CBF12CBESlNo]
    Field : Medium Prompt,CBF12CBESlNo
    Local:Field: Medium Prompt : Set as : "Show S No. : "
    Space Bottom : 1 mm

    [Field:CBF12CBESlNo]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBESlNo


    [Line:CBF12CBEName]
    Field : Medium Prompt,CBF12CBEName
    Local:Field: Medium Prompt : Set as : "Show Exp. PARTICULARS : "
    Space Bottom : 1 mm

    [Field:CBF12CBEName]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEName

    [Line:CBF12CBENarr]
    Field : Medium Prompt,CBF12CBENarr
    Local:Field: Medium Prompt : Set as : "Show Exp. Narration : "
    Space Bottom : 1 mm

    [Field:CBF12CBENarr]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBENarr


    [Line:CBF12CBEVchtype]
    Field : Medium Prompt,CBF12CBEVchtype
    Local:Field: Medium Prompt : Set as : "Show Exp. Vch type : "
    Space Bottom : 1 mm

    [Field:CBF12CBEVchtype]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEVchtype

    [Line:CBF12CBEvchNum]
    Field : Medium Prompt,CBF12CBEvchNum
    Local:Field: Medium Prompt : Set as : "Show Exp. Vch No. : "
    Space Bottom : 8 mm

    [Field:CBF12CBEvchNum]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBEvchNum

    [Line:CBF12Opening]
    Field : Medium Prompt,CBF12Opening
    Local:Field: Medium Prompt : Set as : "Show Group Opening Bal. : "
    Space Bottom : 1 mm

    [Field:CBF12Opening]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12Opening

    [Line:CBF12CBLoanLed]
    Field : Medium Prompt,CBF12CBLoanLed
    Local:Field: Medium Prompt : Set as : "Show Loan Ledger Opening-Closing : "
    Space Bottom : 1 mm

    [Field:CBF12CBLoanLed]
    Use : Logical Field
    Set as : $$Value
    Storage : CBF12CBLoanLed


    [System:UDF]
    CBF12CBReceipt : Logical : 5898
    CBF12CBExpenses : Logical : 5899
    CBF12OpBal : Logical : 5900
    CBF12CBISlNo : Logical : 5901

    CBF12CBIName : Logical : 5902
    CBF12CBINarr : Logical : 5903
    CBF12CBIVchType : Logical : 5904
    CBF12CBIVchNumber : Logical : 5905

    CBF12CBGropCl : Logical : 5907
    CBF12CBLedopCl : Logical : 5908

    CBF12CBESlNo : Logical : 5909
    CBF12CBEName : Logical : 5910
    CBF12CBENarr : Logical : 5911
    CBF12CBEVchType : Logical : 5912
    CBF12CBEvchNum : Logical : 5913

    CBF12CBLoanLed : Logical : 5914

    ;======================================================
     


Share This Page