Filter Ledger

Discussion in 'Free Source Codes' started by A Sam, Jan 28, 2022.

    
  1. A Sam

    A Sam Member


    Hi,

    How to filter ledger group based on voucher type

    if vouchertype=payment then group 1, and group2 and group 3
    else if vouchertype=Receipt then group 4, and group5 and group 36
    else vouchertype=Contra then group bank or group cash

    thanks
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In the PART where you use the repeat for Collection...........
    Use SWITCH to use different collections....the collection where the filters are s per your needs.
     


  3. A Sam

    A Sam Member



    [Field : MultiVch VchTypeFld ]
    Type : String
    Table : MultiVchTypeFld, EndOfList
    Use : Name Field
    Set always : Yes
    Storage : MultiVchVchTypeFld
    ;Set always : Yes
    Show Table : Always
    Case : Title Case
    Width : 10
    Align : Left

    [Collection: MultiVchTypeFld]
    Title : $$LocaleString:"Voucher Types"
    Collection : Contra Vouchers
    Collection : Payment Vouchers
    Collection : Receipt Vouchers
    Collection : Journal Vouchers
    Fetch : Name, ActualVoucherType
    Format : $$Name, 10



    [Field : MultiVch DebitLedgerFld]
    Type : String
    Use : Name Field
    Table : MultiVch DebitLed, EndOfList
    Storage : PartyLedgerName
    ;;Set as: $Name
    Show Table : Always
    Case : Title Case
    Width : 25
    Align : Left
    Inactive: $$IsEndOfList:$PartyLedgerName


    [Collection: MultiVch DebitLed]

    Title : "List of Ledgers"
    Type : Ledge
    Belongs To : Yes
    Format : $Name,30
    Align : Right
    Full Height : Yes
    Filter : RecVch

    [System : Formula]

    RecVch: If $$IsPayment:$VoucherTypeName Then $$IsLedOfGrp:$PartyLedgerName:$$GroupCash OR $$IsLedOfGrp:$PartyLedgerName:$$GroupBank Else +
    If $$IsReceipt:$VoucherTypeName Then $$IsLedOfGrp:$PartyLedgerName:$$GroupDirectExpenses OR $$IsLedOfGrp:$PartyLedgerName:$$GroupIndirectExpenses Else +
    If $$IsContra:$VoucherTypeName Then ...... Else +
    if $$IsJournal:$VoucherTypeName Then.....


    ?????
     


Share This Page