Only Ledgerwise PostdatedFlag vouchers

Discussion in 'Free Source Codes' started by kapil22, Dec 11, 2022.

    
  1. kapil22

    kapil22 Member


    Dear Experts,
    please help in this code.....


    Code:
    [#Table: GTCommonReports]
        add: object: GTVchRmdObject
    [Object: GTVchRmdObject]
        Use: GoToReportObj
        Name: $$LocaleString:"1Voucher Reminder"
        CurrentReport: VoucherReminder
    [Report: VoucherReminder]
        Title: $$LocaleString:"Voucher Reminder"
        Use: DSPTemplate
        Form: VoucherReminder
        Variables:     SVCurrentCompany, SVFromDate, SVToDate,
        VARiables:    GroupName
        Set:     IsCCReport    :    Yes
        Set:     Is Day Book     :     Yes
    [Form: VoucherReminder]
        Parts:         VoucherReminder
        Button:     ExplodeFlag, F2ChangePeriod, ChangeCompany
        button        : ChangeGroupParent
        width:         100% page
        height:        100% page
        Space Top:         if $$InPrintMode then ##SVSpaceTop  else 0.05 inches
        Space Bottom:     if $$InPrintMode then 0.5  else 0    inches
        Space Left:         if $$InPrintMode AND $$InPixelMode then 0.5  else 0 inches
        Space Right:         if $$InPrintMode AND $$InPixelMode then 0.25 else 0 inches
    [Part: VoucherReminder]
        Line: VoucherReminder
        Repeat: VoucherReminder: LedgersPostdated
        Scroll: Vertical
    [Line: VoucherReminder]
        Field: VoucherReminder, VoucherReminder2
        Explode: VoucherReminderExplode
        ;Remove if: $$IsEmpty:#VoucherReminder2
    [Field: VoucherReminder]
        Use: Namefield
        Set as: $Name
        Full Width: Yes
        Color: blue
        Border: ThickBottom
    [Field: VoucherReminder2]
        ;Use: NameField
        ;Use: AmountField
        Set as: ""
        Color: blue
        Border: ThickBottom
    [Part: VoucherReminderExplode]
        Line: VoucherReminderExplode
        Repeat: VoucherReminderExplode: VouchersPostdated
        Scroll: Vertical
    [Line: VoucherReminderExplode]
        Field: DSP VchMasterID, DSPVchDate,DSPVchType, DSPVchNumber, DSPVchAccount, NameField, AmountField
        Border: FullThinBottom
        Local: Field: DSPVchDate: Style: "SmallBold"
        Local: Field: DSPVchDate: Color: "Red"
        Local: Field: DSPVchType: Width: 16
        Local: Field: DSPVchType: Style: "TinyBold"
        Local: Field: DSPVchNumber: Width: 14
        Local: Field: DSPVchNumber: Align: Left
        Local: Field: DSPVchNumber: Style: "TinyBold"
        Local: Field: DSPVchAccount: Set as: $Narration
        Local: Field: DSPVchAccount: Style: "Tiny"
        Local: Field: DSPVchAccount: Line: 2
        Local: Field: NameField: Set as: $VCHSupportingUDF
        Local: Field: NameField: Style: "Tiny"
        Local: Field: NameField: Color: "Red"
        Local: Field: NameField: Width: 40
        Local: Field: NameField: Line: 2   
        Local: Field: AmountField: Set as: $Amount
    [System: Formula]
        FilterGroup: $$IsBelongsTo:##GroupName
    [Collection: LedgersPostdated]
        Source Collection: LedgersGroupAdvance, LedgersGroupCreditor
        Fetch: Name, Parent, MasterId, DebitTotals, CreditTotals
        Sort: @@Default: $Name
    [Collection: LedgersGroupAdvance]
        Type: Ledger
        Child Of: $$GroupAdvances
        BelongsTo: Yes
        Filter: FilterGroup
        Fetch: Name, Parent, MasterId
    [Collection: LedgersGroupCreditor]
        Type: Ledger
        Child Of: $$GroupSundryCreditors
        BelongsTo: Yes
        Filter: FilterGroup
        Fetch: Name, Parent, MasterId
    [Collection: VouchersPostdated]
        Type: Vouchers: Ledger
        ChildOf: #VoucherReminder
        BelongsTo: Yes
        Filter: IsPostdated
        Fetch: MasterID, Date, LedgerName, VoucherTypeName, VoucherNumber, Amount, Narration, PartyLedgerName
     


  2. kapil22

    kapil22 Member


    Dear Expert,

    how to remove blank ledger who doesn't have postdatedflag vouchers.
     


  3. kapil22

    kapil22 Member


    Can any one help?
    not getting value by "CollectionFieldByKey"
    here is the code applied.
    thanks


    Code:
    [Field: VRLedgerFldName]
        Use: Namefield
        Set as: $LedgerName
        Full Width: Yes
        Color: blue
        Border: ThickBottom
    [Field: VRLedgerFldAmount]
        Use: AmountField
        Set as: $$ReportObject:$$CollectionFieldByKey:$LedgerAmount:#VRLedgerFldName:VouchersPostdatedSearch
        Color: blue
        Border: ThickBottom
    
    [Collection: VouchersPostdated]
        Type: Vouchers: Ledger
        Child Of: #VRLedgerFldName
        BelongsTo: Yes
        Filter: IsPostdated
        Fetch: MasterID, Date, LedgerName, VoucherTypeName,
        Fetch: VoucherNumber, Amount, Narration, PartyLedgerName,
        Fetch: VCHSupportingUDF
    [Collection: VouchersPostdatedSearch]
        Source Collection: VouchersPostdated
        Walk: AllLedgerEntries
        by: LedgerName: $LedgerName
        AGGRcompute: Amount:    Sum:    $Amount
        Search Key: $LedgerName
     


Share This Page