4 in 1 -- Ledger Display

Discussion in 'Free Source Codes' started by Amit Kamdar, Jan 15, 2021.

    
  1. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Enjoy the Code.......... one of my finest.... ;):)

    Code:
    ;****************************************************************************
    ;********** MENU & LEDGER SELECTION *****************************************
    ;****************************************************************************
    
    [#Menu : Account Books]
        Add    : Item    : After : @@locLedger    : Ledger 4-in-1 Display : Display Collection : Monthly Ledger Fi1
        Add : Item    : Before : @@locGroupSummary        : Blank
    
    [Collection : Monthly Ledger Fi1]
        Use                : List of Ledgers
        Variable        : LedgerName
        Report            : LedgerDisplayFi1
        Trigger            : Fi1LedgerName
        Fetch            : Name, Parent
        Filter            : IsLedgerDrsCrs
    
    [Report : Fi1 Ledger Name]
        Use             : Collection Variable
        Local   : Line     : Collection Variable : Field : Fi1 Ledger Name
        Local   : Field    : MV Title            : Info  : $$LocaleString:"Select Debtors / Creditors Ledger"
              
        [Field : Fi1 Ledger Name]
            Use         : Name Field
            Key         : Create Ledger
            Modifies    : LedgerName
            Table       : Fi1 List of Ledger
            Show Table  : Always
            CommonTable : Yes
      
    [Collection : Fi1 List of Ledger]
        Use                : List of Ledgers
        Fetch            : Name, Parent
        Delete          : Format
        Add : Format     : $Name, 40
        Add    : Format     : $Parent, 30
        Filter            : IsLedgerDrsCrs
       
    [System : Formula]
        IsLedgerDrsCrs     : $$IsGrpofGrp:$Parent:$$GroupSundryDebtors OR $$IsGrpOfGrp:$Parent:$$GroupSundryCreditors
    
       
       
    ;****************************************************************************
    ;********** 4 in 1 LEDGER DISPLAY -- REPORT & FORM **************************
    ;****************************************************************************
       
    [Report : LedgerDisplayFi1]
        Use                : Ledger Vouchers
        Delete            : Form            : Ledger Vouchers
        Form            : LedgerDisplayFi1
        Title            : $$LocaleString:"4-in-1 Ledger Display"
        Print Set        : Report Title        : If NOT $$IsEmpty:$Name Then $Name Else ##LedgerName
        Variable         : SVFromDate, SVToDate
        Set             : SVFromDate     : $$SystemPeriodFrom
        Variable        : LedgerName
        Variables        : DSP AgeByDueDate, DSP HasColumnTotal, DSP HasMultiLevel, DSP NotScaleable, DSP ShowMonthly
        Variables        : ExplodeFlag, In NewPages, LedgerName
        Variables        : Is BillWiseReport, Is CCReport, Is ForexReport, Is GrpBillReport, Is GrpReport, Is LedgerReport, Is MultiPage, Is VchTypeReport, IsTDSOutstandingReport
        Variables        : Show BillRange, Show BillType, Show ContactDetails, Show DaysByBillDate, Show Forex, Show Reminders
        Variables        : SV Budget, SV CurrentCompany, SV SortMethod, SV Variance
        Variable        : ShowRunBalance
        Variable        : IsDisplayReport, DSPWithOpening
        Variable        : ShowOpBillAmt, ExplodeNarrFlag, ShowDueOnPrompt, ShowOverdueOfBill, BillwithOrder
        Local            : Variable    : LedgerName: Table    : Ledger OutstandingsExtract
        Variable        : ShowLedParent
        Set                : DSP HasColumnTotal    : No
        Set               : DSP HasMultiLevel      : No
        Set             : DSP NotScaleable       : Yes
        Set                : DSP ShowMonthly        : No
        Set                : Is BillWiseReport      : Yes
        Set                 : Is GrpBillReport       : No
        Set             : Is LedgerReport        : Yes
        Set             : Is MultiPage           : No
        Set             : Show ContactDetails    : No
        Set                : IsTDSOutstandingReport: No
        Set                : SV Sort Method        : @@Default
        Set                : IsDisplayReport         : $$InDisplayMode
        Set                : ShowOpBillAmt            : Yes
        Set               : ShowDueOnPrompt        : Yes
        Set               : ShowOverdueOfBill     : Yes
        Set               : ShowDaysByBillDate     : No
        Set               : ShowReminders         : No
        Set               : ShowInterest             : No
        Set               : ShowRunBalance         : Yes
        Set               : Is ForexReport         : No
       
    [Form : LedgerDisplayFi1]
        Parts            : LedgerAccPart
        Parts            : LedgerBillPart
        Parts            : LedgerAge
    
        Height          : 100% Screen
        Width           : 100% Screen
        Buttons            : PrintButton, ExportButton, MailButton, UploadButton
        Button          : ExplodeFlag, F2ChangePeriod, ChangeCompany, ChangeItem, /*LedgerChange,*/ +
                            LED Daily, LED Monthly, Direct Columnar, LED BillWise, Fi1Contact Details
        BottomButton    : BlankButton, ToggleDueDays, RunBalOnOff, SetDates, BlankButton1, BlankButton2, BlankButton3, BlankButton4,+
                            Fi1 LEDVCH Configure, FilterButton, ValueButton
        Bottom Toolbar Buttons     : BottomToolBarBtn1, BottomToolBarBtn2_EditVch, BottomToolBarBtn3, BottomToolBarBtn4, BottomToolBarBtn5, BottomToolBarBtn6,+
                        BottomToolBarBtn7, BottomToolBarBtn8, BottomToolBarBtn9, BottomToolBarBtn10, BottomToolBarBtn11, BottomToolBarBtn12
        Local           : Button        : ValueButton         : Inactive     : Yes
         Local            : Button        : BottomToolBarBtn6    : Inactive    : NOT $$Allow:Create:Vouchers
         Local            : Button        : BottomToolBarBtn7    : Inactive  : NOT $$Allow:Create:Vouchers    
        Local           : Button        : Change Company     : Delete    : Action
        Local            : Button        : Change Company    : Add        : Action List    :  ChangeCompanyWindow, ChangeLedgerName
        Local            : Button        : FilterButton        : Delete    : Action
        Local            : Button        : FilterButton        : Add        : Action List    :  SetFilterVar, OpenFilterWindow
        Keys            : ChangePeriod
        Space Top       : If $$InPrintMode Then ##SVSpaceTop Else 0 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
        Set                : SVPrintCMPConfirmDate        : @@DSPToDate    
    
       
    [System : Formula]
        LedDateWidth    : 6
        LedLedgerWidth    : 100 - @@LedDateWidth - @@LedVchType - @@LedVchNum - @@WithRunBal
        LedVchType        : 10
        LedVchNum        : 14
        LedAmount        : 10
        WithRunBal        : If ##ShowRunBalance Then (@@LedAmount * 3) Else (@@LedAmount * 2)
       
    
    ;****************************************************************************
    ;********** NORMAL LEDGER (TOP PART) ****************************************
    ;****************************************************************************
    
    [Part :    LedgerAccPart]
        Parts            : Fi1LV Title, Fi1LV Body,
        Vertical        : Yes
       
    [Part: Fi1LV Title]
        Option      : DB PrnTitle        : @@InPrintORExcelExportMode
        Option      : Fi1LV ScrTitle    : NOT @@InPrintORExcelExportMode
    
    [!Part: Fi1LV ScrTitle]
        Line        : Fi1LV Title, Fi1LV Details
           
            [Line  : Fi1LV Title]
                Field       : Fi1LV Title,
                Right Field : DSP MainDateTitle
                Local       : Field : DSPMainDateTitle    : Width        : 20% Screen
               
                [Field: Fi1LV Title]
                    Fields  : Simple Prompt, Name Field
                    Full Width   : Yes
                    Local   : Field : Simple Prompt : Info      : If NOT ##InNewPages AND @@IsHTMLFormat Then "" Else $$LocaleString:$$SysName:Ledger
                    Local   : Field : Simple Prompt : Width     : 9
                    Local   : Field : Name Field    : Set as    : If NOT ##InNewPages AND @@IsHTMLFormat Then "" Else If NOT $$IsEmpty:$Name Then $Name Else #LedgerName
                    Local   : Field : Name Field    : Style     : Large Bold
                    Local   : Field : Name Field    : Full Width: Yes
                   
                [Field: Fi1LEDMailName]
                    Use                : Name Field
                    Set as            : $EMail:Ledger:##LedgerName
                    Set always        : Yes
                    Variable        : SVMailTo
                    Width            : 20.1% screen
    
            [Line  : Fi1LV Details]
                Field       : Fi1FullAddress
                Right Field : Fi1GSTNo, Fi1MobileNo
                Local       : Field : Fi1FullAddress    : Full Width: Yes
                Local       : Field : Fi1GSTNo            : Width        : 28% Screen
                Local       : Field : Fi1MobileNo        : Width        : 12% Screen
                Border        : Thin Top
               
                [Field : Fi1FullAddress]
                    Use            : Name Field
                    Set As        : $STPartyFullAdd + " " + $StateName + " - " + $PinCode:Ledger:##LedgerName
    
                [Field : Fi1GSTNo]
                    Use            : Name Field
                    Set As        : "GST No. : " + $PARTYGSTIN:Ledger:##LedgerName + " ( " + $GSTRegistrationType:Ledger:##LedgerName + " )"
    
                [Field : Fi1MobileNo]
                    Use            : Name Field
                    Set As        : "Cell : " + $LedgerMOBILE:Ledger:##LedgerName
                   
    [Part : Fi1LV VchTitle]
        Line        : Fi1LV VchTitle
           
        [Line: Fi1LV VchTitle]
            Line    : Fi1 DSP VchAccTitles
    
            [Line: Fi1 DSP VchAccTitles]
                Left Fields     : Fi1DSP VchDateTitle, Fi1DSP VchAcctTitle,
                Right Fields    : Fi1DSP VchTypeTitle, Fi1DSP VchNumberTitle, Fi1DSP VchDrTitle, Fi1DSP VchCrTitle, Fi1DSP VchLedBalTitle
                Border          : Thin Top Bottom                   
                Option            : Excel DB Title1 Bills             : $$InExportMode AND ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode) AND NOT (($$IsServiceTaxOn AND @@IsSTTaxenabledDate_Vch) AND $$IsTDSOn AND NOT ##OnlyInvVouchers)       
                Option            : Excel DB Title1                    : $$InExportMode AND NOT ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode)
                Option            : Excel DB Title1 ServiceTax Bills    : $$InExportMode AND ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode) AND (($$IsServiceTaxOn AND @@IsSTTaxenabledDate_Vch) AND $$IsTDSOn AND NOT ##OnlyInvVouchers)       
    
                [Field: Fi1DSP VchDateTitle]
                    Use         : Short Date Title Field
                    Info        : $$LocaleString:"Date"
                    Align       : Centre
                    Width        : @@LedDateWidth % Screen
    
                [Field: Fi1DSP VchAcctTitle]
                    Use         : Name Title Field
                    Info        : $$LocaleString:"Particulars"
                    Widespaced    : Yes
                    Indent      : 4
                    Style       : Normal Bold
                    Full Width  : Yes
                    Width        : @@LedLedgerWidth % Screen
       
                [Field: Fi1DSP VchTypeTitle]
                    Use         : Short Name Title Field
                    Width       : @@LedVchType % Screen
                    Info        : $$LocaleString:"Voucher Type"
                    Align       : Centre
    
                [Field: Fi1DSP VchNumberTitle]
                    Use         : Short Name Title Field
                    Width       : @@LedVchNum % Screen
                    Info        : $$LocaleString:"Voucher No."
                    Align       : Centre
                    Invisible   : (##BankRecMode OR NOT $$InPixelMode OR (($$InExportMode OR $$InPrintMode) AND NOT ##ExplodeVNum))
    
                [Field: Fi1DSP VchDrTitle]
                    Use         : Amount Title Field
                    Info        : $$LocaleString:"Debit"
                    Align       : Centre
                    Style       : Normal Bold
                    Width        : @@LedAmount % Screen
    
                [Field: Fi1DSP VchCrTitle]
                    Use         : Amount Title Field
                    Info        : $$LocaleString:"Credit"
                    Align       : Centre
                    Style       : Normal Bold
                    Width        : @@LedAmount % Screen
    
                [Field: Fi1DSP VchLedBalTitle]
                    Use            : Amount Title Field
                    Set as        : $$LocaleString:"Balance"
                    Widespaced    : Yes
                    Align        : Centre
                    Width        : @@LedAmount % Screen
                    Invisible    : NOT ##ShowRunBalance OR NOT (##SVSortMethod = @@Default)
    
    [Part : Fi1LV Body]
        Sync            : No
        Lines           : Fi1LV VchTitle, Fi1DSP VchOpBal, Fi1DSP VchDetail
        Repeat          : Fi1DSP VchDetail : Vouchers of Ledger
        Bottom Line        : Fi1DSP VchTotalAmt, Fi1LedTotals
        Total           : Fi1DSP VchCrAmt, Fi1DSP VchDrAmt
        Scroll          : Vertical
        Page Break      : Fi1LV ClPageBreak, Fi1LV OpPageBreak
        Space Top       : if $$InPrintMode then 0.5 else 0
        Space Bottom    : if $$InPrintMode then 0.5 else 0
        Balancing       : Yes
        Option            : UpdatePageIndex        : ##IsMultiPage AND ##InNewPages AND $$UpdatePageIndex:#LedgerName
        Local    : Field : Fi1DSP VchType : Set as  : if NOT $$IsVoucher then "" else +
                                                    if NOT $$InPixelMode then $AdditionalName:VoucherType:$VoucherTypeName else $Name:VoucherType:$VoucherTypeName
        Local        : Part    : Default    : Float    : Yes
       
        [Line: Fi1DSP VchOpBal]
            Field            : Fi1DSP VchDate, Fi1DSP VchLedAccount
            Right Fields    : Fi1DSP VchType, Fi1DSP VchNumber, Fi1DSP VchDrOpAmt, Fi1DSP VchCrOpAmt, Fi1DSP VchLedBalance
            Local           : Field : Fi1DSP VchDate        : Set As    : if $$IsVoucher OR $IsForexLine then @@BalancingStart else @@DSPFromDate
            Local           : Field : Fi1DSP VchLedAccount    : Set As    : $$LocaleString:"Opening Balance"
            Local           : Field : Fi1DSP VchLedAccount    : SpaceLeft    : 3
            Local           : Field : Fi1DSP VchLedAccount    : Delete    : Border
            Local           : Field : Fi1DSP VchLedAccount    : Style        : Normal Bold
            Local           : Field : Fi1DSP VchLedAccount    : Widespaced: Yes
            Local           : Field : Fi1DSP VchLedBalance    : InActive    : Yes
            Invisible       : (NOT ##ShowRunBalance OR NOT ##DSPWithOpening OR NOT (##SVSortMethod = @@Default)) OR ##BankRecMode
           
        [Line: Fi1DSP VchDetail]
            Next Page           : NOT $$DoExplosionsFit OR (($$LineNumber = $$LastLineNumber) AND $$IsLastOfSet)
            Fields              : Fi1DSP VchDate
            Right Fields        : DSP VchSuppleCount, Fi1DSP VchType, Fi1DSP VchNumber, DSP VchMasterID
            Keys                : Delete Line Object, Cancel Line Object
            Keys                : Line Insert Voucher, Line Append Voucher, Line Duplicate Voucher
            Local               : Key   : Delete Line ObjectEx     : Inactive : NOT $$CanDelete OR NOT $$Allow:Alter:BackDatedVouchers
            Local               : Key   : Delete Line Object     : Inactive : NOT $$CanDelete OR (NOT $$Allow:Alter:Vouchers) OR (NOT $$Allow:Alter:BackDatedVouchers)
            Local               : Key   : Cancel Line Object     : Inactive : NOT $$CanCancel OR (NOT $$Allow:Alter:Vouchers) OR (NOT $$Allow:Alter:BackDatedVouchers)
            Local               : Key   : Line Object Display AltEnter    : Inactive : (NOT $$Allow:Display:BackDatedVouchers) AND ($Date < ($$Date:(@@PayVchLastVchDate) - @@DaysOfBackDatedVch))
            Space Top           : if NOT $$IsSiblingExploded then 0 else if $$InPrintMode then 0.5 else 0.25
            Explode                : DBExplodeForFetch        :(##IsDaybook OR ##IsLedgerReport OR ##IsGrpReport) AND ($$KeyExplode And $$DBExplodeKeyFetch)
            Option              : Fi1DSP VchAccDetail      : NOT ##IsDayBook AND (##IsLedgerReport OR ##IsGrpReport OR ##IsCCReport)
            Option              : DSP ExplVchNumber     : NOT $$InPixelMode AND ##ExplodeVNum
            Option              : Italics Line            : $$IsVoucher AND ($IsDeleted OR $IsOptional OR ($$IsMemo:$VoucherTypeName) OR ($$IsRevJrnl:$VoucherTypeName) OR (##TallyAudit AND $IsAuditModified))
            Option              : Alter On Enter        : $$IsVoucher AND NOT $IsDeleted
            Option              : DisplayOnAltEnter     : $$IsVoucher AND NOT $IsDeleted
            Option                : DisplayOnEnter        : NOT $$IsVoucher
            Option              : DSP VchToolBarVariableSet
            Local    : Field        : Fi1DSP VchDate        : Style        : Small
            Local   : Field     : VCHCURRENCY Forex     : Type       : Amount
            Local   : Field     : VCHCURRENCY Forex     : Format     : if @@ShowForex then "ShowBaseSymbol" else "Forex,Currency"
            Local   : Field     : VCHCURRENCY Forex     : Width      : 0
            Local   : Field     : VCHCURRENCY Rate      : Width      : 0
            Local   : Line      : VCHBILL ExplLine      : Delete     : Explode
            Local   : Line      : VCHCURRENCYExplLine   : Indent     : @@DBIndentByLevel
            Local   : Line      : VCHBILL ExplLine      : Indent     : @@DBIndentByLevel
            Local   : Line      : VCHCSTCAT ExplLine    : Indent     : @@DBIndentByLevel
            Local   : Line      : VCHCST ExplLine       : Indent     : @@DBIndentByLevel
            Local   : Line      : STKALL Details        : Indent     : @@DBIndentByLevel
            Local   : Line      : STKALL Details        : Delete     : Explode : STKALL ActualQty
            Local   : Line      : STKALL Details        : Delete     : Explode : VCHCSTAlloc Explosion
            Local   : Line      : STKALL Details        : Add        : Explode : VCHCSTAlloc Explosion : @@DBInvAllCstExplodable
           
            [Field: Fi1DSP VchDate]
                Use         : Uni Date Field
                Set as      : if NOT $$IsVoucher then @@DSPToDate else +
                              if NOT $$InPrintMode OR ##IsDayBook then $Date else +
                              if $$LineNumber = $$FirstLineNumber then $Date else +
                              if $$PrevLineVisible AND $$PrevLine:$Date = $Date then $Date else $Date
                Style       : Normal
                Align       : Right
                Alter       : Voucher           : $$IsVoucher AND NOT $IsDeleted
                Display     : VCH Display       : $$IsVoucher AND NOT $IsDeleted          
                Width       : @@LedDateWidth % Screen
    
            [Field: Fi1DSP VchType]
                Use         : Short Name Field
                Width       : @@LedVchType % Screen
                Set as      : if NOT $$IsVoucher then "" else  if NOT $$InPixelMode then $AdditionalName:VoucherType:$VoucherTypeName else $Name:VoucherType:$VoucherTypeName
                Style       : Small Bold
                Variable    : DSPVchTypeName
                Align       : Centre
    
            [Field: Fi1DSP VchNumber]
                Use         : Short Name Field
                Width       : @@LedVchNum % Screen
                Set as      : if NOT $$IsVoucher then "" else @OptStr + @VchNo
                OptStr      : If $IsPostDated And $Date>@@EntryEndingat Then $$LocaleString:"(Post-Dated) " Else If $IsOptional Then $$LocaleString:"(Optional) " Else ""
                VchNo        : If ##ShowExciseMfgrSlNo AND $$InPrintMode AND NOT $$IsEmpty:$SerialNumber Then $SerialNumber Else $VoucherNumber
                Style       : Small
                Align       : Centre
                Invisible   : ##BankRecMode OR NOT $$InPixelMode OR (($$InExportMode OR $$InPrintMode) AND NOT ##ExplodeVNum)
    
        [!Line: Fi1DSP VchAccDetail]
            Add : Left  Fields  : Fi1DSP VchLedAccount
            Add : Right Fields  : Fi1DSP VchDrAmt, Fi1DSP VchCrAmt, Fi1DSP VchLedBalance
            Remove if    : ##IsNegativeCash AND $$IsDr:#Fi1DSPVchLedBalance
            Explode : DSP VchExplosion            : ($$IsVoucher AND NOT $IsDeleted AND @@LVExplode AND (##IsGrpReport OR +
                                                  (##IsLedgerReport AND NOT ##IsGrpReport AND $$NumItems:SelectedLedgerEntries > 1) OR +
                                                  (##IsCCReport AND $$NumItems:SelectedCCEntries > 1)))
            Explode    : DSP SingLedInvExplosion    : ((##DBInvExplodeFlag AND ##ExplodeFlag) OR $$KeyExplode) AND $$NumItems:AllLedgerEntries = 2 AND ##IsLedgerReport
            Explode    : DSP SingLedCCExplosion    : ((##DBCostExplodeFlag AND ##ExplodeFlag) OR $$KeyExplode) AND $$NumItems:AllLedgerEntries = 2 AND ##IsLedgerReport AND $$IsEmpty:$AllLedgerEntries[1,@@IsFirstLedger].InventoryAllocations[1].StockItemName
            Explode : DSP SingleLedBankExplosion: ((##DBBankExplodeFlag AND ##ExplodeFlag) OR $$KeyExplode) AND $$NumItems:AllLedgerEntries = 2 AND ##IsLedgerReport
            Explode    : DSP LEDNarration            : ((##ExplodeNarrFlag AND ##ExplodeFlag) OR $$KeyExplode) AND ((##IsLedgerReport AND $$NumItems:AllLedgerEntries = 2) OR (##IsCCReport AND NOT $$NumItems:SelectedCCEntries > 1) OR ##IsGrpReport) AND NOT ##IsJobWorkBreakUp
    
            Option  : DSP LedAccDetail                                    : ##IsLedgerReport  AND NOT ##IsGrpReport  AND $$IsVoucher AND NOT $IsDeleted
            Option  : DSP GrpAccDetail                                  : ##IsGrpReport AND $$IsVoucher AND NOT $IsDeleted
               Option    : DSP VchDybkDetail Excel Export Bills                : $$InExportMode AND NOT ##ColumnarDayBook AND NOT ##ExtractMode AND ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode) AND NOT (($$IsServiceTaxOn AND @@IsSTTaxenabledDate_Vch) AND $$IsTDSOn AND NOT ##OnlyInvVouchers)
            Option    : DSP VchDybkDetail Excel Export ServiceTax Bills    : $$InExportMode AND NOT ##ColumnarDayBook AND NOT ##ExtractMode AND ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode) AND (($$IsServiceTaxOn AND @@IsSTTaxenabledDate_Vch) AND $$IsTDSOn AND NOT ##OnlyInvVouchers)
            Option    : DSP VchDybkDetail Excel Export                    : $$InExportMode AND NOT ##ColumnarDayBook AND NOT ##ExtractMode AND NOT ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode)
            Option    : Excel DB Details                                    : $$InExportMode AND NOT ##DBBillExplodeFlag AND (##ExplodeFlag OR $$KeyExplode)
           
            Local    : Part        : DSP LEDNarration                        : Local        : Line        : DSP LEDNarration            : Delete    : Empty
            Local    : Part        : DSP LEDNarration                        : Local        : Line        : DSP LEDNarration            : Add        : Empty    : $$IsEmpty:$AllLedgerEntries[1, @@IsFirstLedger].Narration
            Local    : Line        : DSP LEDNarration                        : Local        : Field        : DSP LEDNarration            : Set as    : $AllLedgerEntries[1,@@IsFirstLedger].Narration
           
            [Field: Fi1DSP VchLedAccount]
                Use         : Name Field
                Set as      : if NOT $$IsVoucher then $Name else +
                              if ##BankRecMode AND NOT $$IsEmpty:$BasicVoucherChequeName then $BasicVoucherChequeName else +
                              if (##IsGrpReport AND NOT $$IsExploded:DSPVchExplosion) then If @POSLedger AND NOT ##IsCCReport then $$LocaleString:"(as per details)" else $GrpName else +
                              if $$IsExploded:DSPVchExplosion OR @POSLedger AND NOT ##IsCCReport then $$LocaleString:"(as per details)" else +
                              if ##IsCCReport then If $$IsExploded:DSPVchExplosion then $$LocaleString:"(as per details)" else @CCAllocName else +
                              if $$IsPayroll:$VoucherTypeName Then @PayVchLedName else $VchLedName
                POSLedger   : ($UseForPOSInvoice:VoucherType:$VoucherTypeName AND ($$AddOnInfo:POSEnabled))  AND @@POSLedgerEntries
                CCAllocName : if NOT ##IsCCBkup then $CCLedAccount else if ##IsGrpBkup then $AllocCCGrpOwner else $AllocCCLedName 
                PayVchLedName: $VchLedName
                QuickSearch : Yes
                FullWidth   : Yes
                Width        : @@LedLedgerWidth % Screen
                Style       : if NOT $$IsVoucher then "Normal Bold Italic" else "Normal Bold"
                Indent      : if NOT $$IsVoucher then 2 else 2
           
            [Field: Fi1DSP VchDrAmt]
                Use         : Amount Field
                Set as      : if NOT $$IsVoucher then @ForexVal else +
                              if ##IsCCReport then $$AsDrAmt:@CCAmount else $$AsDrAmt:@LGAmt
                LGAmt       : if ##IsGrpReport then $TotalGrpDrVchAmt else $TotalLedDrVchAmt
                CCAmount    : if NOT ##IsCCBkup then $AllocCostCentreDrTotal else +
                              if ##IsGrpBkup then $AllocCCGrpDrTotal else $AllocCCLedDrTotal
                ForexVal    : if ##IsGrpReport then $$IfDr:$NettGrpForex else $$IfDr:$NettLedForex
                Style       : if $$InPrintMode then "Normal" else "Normal Bold"
                Inactive    : $$IsVoucher AND NOT ##IsCCReport AND @@ShowForex AND $$IsBaseCurrency:@LGAmt
                Width        : @@LedAmount % Screen
               
            [Field: Fi1DSP VchCrAmt]
                Use         : Amount Field
                Set as      : if NOT $$IsVoucher then @ForexVal else +
                              if ##IsCCReport then $$AsCrAmt:@CCAmount else $$AsPositive:$$AsCrAmt:@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:@LGAmt
                Width        : @@LedAmount % Screen
    
            [Field: Fi1DSP VchLedBalance]
                Use                : Amount Field
                Set as            : If ($$Line = 1) Then If (##DSPWithOpening) Then @NettOpBal Else @NettDrCrTotal Else $$NettAmount:@PrevTot:@NettDrCrTotal
                PrevTot            : $$PrevLineField
                NettOpBal        : $$NettAmount:@NettDrCrTotal:@OpgBalance
                OpgBalance        : @LedOpening
                LedOpening        : If $$IsEmpty:@@LedOpening Then $$AsAmount:0 Else @@LedOpening
                NettDrCrTotal    : If ($$IsEmpty:#Fi1DSPVchDrAmt AND NOT $$IsEmpty:#Fi1DSPVchCrAmt) Then #Fi1DSPVchCrAmt Else +
                                  If (NOT $$IsEmpty:#Fi1DSPVchDrAmt AND $$IsEmpty:#Fi1DSPVchCrAmt) Then #Fi1DSPVchDrAmt Else +
                                  $$NettAmount:#Fi1DSPVchDrAmt:#Fi1DSPVchCrAmt
                Invisible        : ##BankRecMode OR (NOT ##ShowRunBalance OR NOT (##SVSortMethod = @@Default))
                Inactive        : ##BankRecMode OR (NOT ##ShowRunBalance OR NOT (##SVSortMethod = @@Default))
                Style            : If $$InPrintMode then "Normal" Else "Small Italic"
                Format            : if @@ShowForex then "DrCr,ShowBaseSymbol,Forex" else "DrCr"
                Fixed            : Yes
                Skip            : No
                Width            : @@LedAmount % Screen
    
    [Part: Fi1LV Totals]
        Lines       : Fi1DSP VchTotalAmt
    
        [Line: Fi1DSP VchTotalAmt]
            Line    : Fi1DSP VchOpAmt, Fi1DSP VchCurTotalAmt, Fi1DSP VchClAmt
            Local    : Line            : Fi1DSP VchOpAmt            : Invisible        : ##ShowRunBalance
            Local    : Line            : Fi1DSP VchCurTotalAmt        : Invisible        : ##ShowRunBalance
            Local    : Line            : Fi1DSP VchClAmt            : Invisible        : ##ShowRunBalance
    
            [Line: Fi1DSP VchOpAmt]
                Right Fields    : Info Field, Fi1DSP VchDrOpAmt, Fi1DSP VchCrOpAmt, Fi1DSP VchLedBalance
                Local           : Field : Info Field : Info         : $$LocaleString:"Opening Balance" + " " + ":" + " "
                Local           : Field : Info Field : Width        : 20
                Local            : Field    : Fi1DSP VchLedBalance        : Set as    : ""
                Local           : Field : Info Field : Align        : Right
           
            [Line: Fi1DSP VchCurTotalAmt]
                Right Fields    : Info Field, Fi1DSP VchDrTotalAmt, Fi1DSP VchCrTotalAmt, Fi1DSP VchLedBalance
                Local           : Field : Info Field : Info          : $$LocaleString:"Current Total :" + " "
                Local           : Field : Info Field : Width        : 20
                Local            : Field    : Fi1DSP VchLedBalance        : Set as    : ""   
                Local           : Field : Info Field : Align        : Right
                Option          : WithThinTopBotBorder                : ##ShowRunBalance AND NOT $$InPrintMode AND NOT $$InExportMode
    
            [Line: Fi1DSP VchClAmt]
                Right Fields    : Info Field, Fi1DSP VchDrClAmt, Fi1DSP VchCrClAmt, Fi1DSP VchLedBalance
                Local           : Field : Info Field : Info          : $$LocaleString:"Closing Balance" + " " + ":" + " "
                Local           : Field : Info Field : Width        : 20
                Local            : Field    : Fi1DSP VchLedBalance        : Set as    : ""
                Local           : Field : Info Field : Align        : Right
                Local           : Field : Info Field : Style         : Normal Bold
    
                                        [Field : Fi1DummyFld]
                                            Use            : Name Field
                                            Full Width    : Yes
                                           
                    [Field: Fi1DSP VchDrOpAmt]
                        Use         : Amount Field
                        Set as      : if ##IsCCReport then $$IfDr:@@CCOpening else if ##IsGrpReport then $$IfDr:@@GrpOpening else $$IfDr:@@LedOpening
                        Switch        : DSP VchForexDrOpAmt    : DSP VchForexDrOpAmt : @@ShowForex
                        Color        : Blue
                        Width        : @@LedAmount % Screen
                        Border        : Full Thin Top
                       
                    [Field: Fi1DSP VchCrOpAmt]
                        Use         : Amount Field
                        Set as      : if ##IsCCReport then $$IfCr:@@CCOpening else if ##IsGrpReport then $$IfCr:@@GrpOpening else $$IfCr:@@LedOpening
                        Switch        : DSP VchForexCrOpAmt    : DSP VchForexCrOpAmt : @@ShowForex
                        Color        : Red
                        Width        : @@LedAmount % Screen
                        Border        : Full Thin Top
           
                    [Field: Fi1DSP VchDrTotalAmt]
                        Use         : Amount Field
                        Set as      : $$Total:Fi1DSPVchDrAmt
                        Color        : Blue
                        Border        : Full Thin Bottom
                        Width        : @@LedAmount % Screen
                       
                    [Field: Fi1DSP VchCrTotalAmt]
                        Use         : Amount Field
                        Set as      : $$Total:Fi1DSPVchCrAmt
                        Color        : Red
                        Border        : Full Thin Bottom
                        Width        : @@LedAmount % Screen
           
                    [Field: Fi1DSP VchDrClAmt]
                        Use         : Amount Field
                        Set as      : If @@ShowForex Then $$IfForexDr:$$ForexAsPositive:@@Fi1VchClg Else $$IfDr:@@Fi1VchClg
                        Style       : Normal Bold
                        Color        : Blue
                        Width        : @@LedAmount % Screen
                        Border        : Full Thin Bottom : $$InExportMode OR $$InPrintMode
    
                    [Field: Fi1DSP VchCrClAmt]
                        Use         : Amount Field
                        Set as      : If @@ShowForex Then $$IfForexCr:$$ForexAsPositive:@@Fi1VchClg Else $$IfCr:@@Fi1VchClg
                        Style       : Normal Bold
                        Color        : Red
                        Width        : @@LedAmount % Screen
                        Border        : Full Thin Bottom : $$InExportMode OR $$InPrintMode
       
    [Part: Fi1LedTotals]
        Line             : Fi1LedTotals
        Space Bottom     : 0.25
        Local    : Line            : Fi1LedTotals            : Invisible        : NOT ##ShowRunBalance
       
        [Line : Fi1LedTotals]
            Field    : TtlSum, OpBalTtl, OpBalDets, DrTotTtl, DrTotalDets, CrTotTtl, CrTotalDets, ClBalTtl, ClBalDets
            Local    : Field        : Default    : Invisible        : NOT ##ShowRunBalance
           
                        [Field : DefaultTitleField]
                            Use            : Name Field
                            Width        : @@ClNameWidth % screen
                            Style        : Normal Bold
                            Skip        : Yes
                            Align        : Right
    
                        [Field : DefaultAmountField]
                            Use            : Amount Field
                            Width        : @@ClAmtWidth % Screen
                            Style        : Normal Bold
                            Skip        : Yes
                            Border        : Thin Box
                            Format        : "DrCr,NoZero," + ##ShowForex
                            Align        : Left
                            Indent        : 1
    
    [System : Formula]
        ClAmtWidth        : 11
        ClNameWidth        : 10
        ClTitleWidth    : 100 - (@@ClAmtWidth * 4) - (@@ClNameWidth * 4)
                           
            [Field : TtlSum]
                Use            : Name Field
                Set As        : "Ledger Summary"
                Full Width    : Yes
                Width        : @@ClTitleWidth % Screen
                Widespaced    : Yes
                Align        : Left
                Style        : Normal Bold
               
            [Field : OpBalTtl]
                Use            : DefaultTitleField
                Set As        : "Opening Balance"
    
            [Field : OpBalDets]
                Use            : DefaultAmountField
                Set As        : $OpeningBalance:Ledger:##LedgerName
                Color        : If $$IsDr:#OpBalDets Then "Blue" Else "Red"
    
            [Field : DrTotTtl]
                Use            : DefaultTitleField
                Set As        : "Debits Totals"
    
            [Field : DrTotalDets]
                Use            : DefaultAmountField
                Set As        : $$Total:Fi1DSPVchDrAmt
                Color        : If $$IsDr:#DrTotalDets Then "Blue" Else "Red"
    
            [Field : CrTotTtl]
                Use            : DefaultTitleField
                Set As        : "Credits Totals"
    
            [Field : CrTotalDets]
                Use            : DefaultAmountField
                Set As        : $$Total:Fi1DSPVchCrAmt
                Color        : If $$IsDr:#CrTotalDets Then "Blue" Else "Red"
    
            [Field : ClBalTtl]
                Use            : DefaultTitleField
                Set As        : "Closing Balance"
    
            [Field : ClBalDets]
                Use            : DefaultAmountField
                Set As        : $ClosingBalance:Ledger:##LedgerName
                Color        : If $$IsDr:#ClBalDets Then "Blue" Else "Red"
    
               
    ;****************************************************************************
    ;********** LEDGER BILLWISE (MIDDLE PART) ***********************************
    ;****************************************************************************
    
    [Part: LedgerBillPart]
        Line        : Fi1Bill0, Fi1BillTitle, Fi1Bill Column, Fi1BILL Detail
        Sync        : No
        Space Top    : If $$InExportMode Then 0.5 Else 0
        Vertical     : Yes
        Bottom Line    : Fi1BILL Total
        Repeat        : Fi1BILL Detail        : Ledger Bills
        Scroll        : Vertical
        Total       : Fi1A001, Fi1A002, Fi1A003, Fi1A004, Fi1A005, Fi1A006, Fi1A007, Fi1A008, Fi1A009, +
                        Fi1BILLOp, Fi1BILLCl, BILLForex, BILLPDC, BillFinal, BILLInterest, +
                        Fi1B001, Fi1B002, Fi1B003, Fi1B004, Fi1B005, Fi1B006, Fi1B007, Fi1B008, Fi1B009
        Local       : Line    : Fi1BILL Total: Invisible    : $$InPrintMode AND (($$IsEmptyCollection:LedgerBills) AND (NOT @@HasOnAccount))
        Page Break  : Fi1BILL ClPageTotal, Fi1BILL OpPageTotal
        Option      : Fi1LB AllBills           : $$IsSysNameEqual:AllBills:##ShowBillRange OR ##ShowInterest
        Option      : Fi1BILL OnAccDetail      : NOT ##IsForexReport AND ((($$IsEmpty:##AgeFrom) AND ($$IsEmpty:##AgeTo)) OR (##AgeFrom < 0)) AND (@@HasOnAccount) AND @@AllowedOnAcc AND NOT @@ShowForex
        Option         : LEDBillLedgerNotAvbl    : $$IsEmpty:($Name:Ledger:#LedgerName) AND NOT $$IsRemoteCompany                             
        Local        : Part    : Default    : Float    : No
    
        [!Part: Fi1LB AllBills]
            Repeat    : Fi1BILL Detail    : All Ledger Bills
       
        [Line: Fi1LedBILLOpPageBreak]
            Line    : Fi1Bill Column
           
        [Line : Fi1BILL0]
            Field : Fi1BILL0
           
            [Field : Fi1BILL0]
                Set As        : ""
                Invisible    : NOT ($$InExportMode OR $$InPrintMode)
       
        [Line : Fi1BillTitle]
            Field : Fi1BillTitle
           
            [Field : Fi1BillTitle]
                Use            : Name Field
                Set As        : "Bill-wise Outstandings of Ledger :- " + ##LedgerName
                Style        : Large Bold Italic
                Invisible    : NOT ($$InExportMode OR $$InPrintMode)
                Full Width    : Yes
                Align        : Centre
                Cells        : If ##ShowRunBalance Then 12 Else 11
       
        [Line: Fi1BILL Column]
            Lines   : Fi1BILLCol1, Fi1BILLCol2
    
        [Line: Fi1BILLCol1]
            Use         : Fi1BillDetail
            Fixed       : Yes
            Delete      : Empty
            Delete      : NextPage
            Delete      : Explode
            Local       : Field : Default               : Type      : String
            Local       : Field : Default               : Align     : Centre
            Local       : Field : Fi1BillDate              : Set as    : $$LocaleString:"Date"
            Local       : Field : Fi1BillRef               : Set as    : $$LocaleString:"Bill /  Invoice"
            Local       : Field : Fi1BillRef               : Widespaced: Yes
            Local       : Field : Fi1BillRef               : Align        : Left
            Local       : Field : Fi1BillRef               : Style        : Normal Bold
            Local       : Field : Fi1BillIsAdvance         : Set as    : ""
            Local       : Field : Fi1BillParty             : Set as    : $$LocaleString:"Party's Name"
            Local       : Field : Fi1BillParty             : Indent    : 2
            Local       : Field : Fi1BillOp                : Set as    : $$StringWord:1:$$LocaleString:"Opening Amount"
            Local       : Field : Fi1BillCl                : Set as    : if ($$NumSets = 1) OR ($$Column = 1) then $$StringWord:1:$$LocaleString:"Pending Amount" else @@AgeTitle
            Local       : Field : BillForex             : Set as    : $$LocaleString:"Gain/Loss"
            Local       : Field : BillInterest          : Set as    : $$LocaleString:"Interest"
            Local       : Field : BillPDC               : Set as    : $$StringWord:1:$$LocaleString:"Post-Dated Amount"
            Local       : Field : BillFinal             : Set as    : $$StringWord:1:$$LocaleString:"Final Balance"
            Local       : Field : Fi1BillDue               : Set as    : $$LocaleString:"Due on"
            Local       : Field : Fi1BillOverDue           : Set as    : if ##ShowDaysByBillDate and Not ##ShowReminders then $$StringWord:1:@@NewBillDays + " " + $$StringWord:2:@@NewBillDays else +
                                                                        $$StringWord:1:@@NewOverDueDays
            Border      : Thin Top
    
        [Line: Fi1BILLCol2]
            Use         : Fi1BillCol1
            Option        : Fi1SelectedBillsTotal            : (##IsBillWiseReport AND ##IsLedgerReport)
            Local       : Field : Default               : Align     : Centre
            Local       : Field : Fi1BillDate              : Set as    : ""
            Local       : Field : Fi1BillRef               : Set as    : $$LocaleString:"Reference No."
            Local       : Field : Fi1BillRef               : Widespaced: Yes
            Local       : Field : Fi1BillParty             : Set as    : ""
            Local       : Field : Fi1BillOp                : Set as    : $$StringRemWord:1:$$LocaleString:"Opening Amount"
            Local       : Field : Fi1BILLCl                : Set as    : if ($$NumSets = 1) OR ($$Column = 1) then $$StringRemWord:1:$$LocaleString:"Pending Amount" else ""
            Local       : Field : BillForex             : Set as    : ""
            Local       : Field : BillInterest          : Set as    : ""
            Local       : Field : BillPDC               : Set as    : $$StringRemWord:1:$$LocaleString:"Post-Dated Amount"
            Local       : Field : BillFinal             : Set as    : $$StringRemWord:1:$$LocaleString:"Final Balance"
            Local       : Field : Fi1BillDue               : Set as    : ""
            Local       : Field : Fi1BillOverdue           : Set as    : if ##ShowDaysByBillDate then $$StringWord:3:@@NewBillDays else $$StringRemWord:1:@@NewOverDueDays
            Local       : Field : Fi1BillSelectedTotal    : Color        : If $$IsDr:#Fi1BillSelectedTotal Then "Blue" Else "Red"
            Border      : Flush Thin Bottom
            SpaceBottom : if $$InPrintMode then 0.5 else 0
    
            [!Line: Fi1SelectedBillsTotal]
                Add    : Field    : Before : Fi1BillOp : Fi1BillSelectedTotal
    
                [Field: Fi1BillSelectedTotal]
                    Use                : Name Field
                    Set as            : if ##IsBillSelected AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedPendingBills:$ClosingBalance) Then $$String:@SelectedTotal + $$String:@SelectedTotalVal Else ""
                    Width            : 40
                    Align            : Centre
                    Invisible        : NOT (##IsBillWiseReport AND ##IsLedgerReport) OR NOT $$InDisplayMode
                    SelectedTotal    : $$LocaleString:"Totals of Selected Bills : "
                    SelectedTotalVal: $$String:##SelectedBillsTotal:"DrCr"
    
    [!Part: Fi1BILL OnAccDetail]
            Option    : Fi1BILL SubTotal    : Not $$IsEmptyCollection:LedgerBills
            Add        : Line    : After    : Fi1BILL Detail    : Fi1BILL OnAccDetail
    
            [!Part: Fi1BILL SubTotal]
                Add        : Line    : Before            : Fi1BILL OnAccDetail        : Fi1BILL SubTotal
                Local    : Line    : Fi1BILLSubTotal    : Replace    : Field            : Fi1Bill Op    : Fi1Bill SubOp
                Local    : Line     : Fi1BILLSubTotal     : Replace    : Field         : Fi1Bill Cl    : Fi1Bill SubCl
                Local    : Line     : Fi1BILLSubTotal     : Replace    : Right Field    : Bill PDC      : Bill SubPDC
                Local    : Line     : Fi1BILLSubTotal     : Replace    : Right Field     : Bill Final    : Bill SubFinal
                Local    : Line     : Fi1BILLSubTotal     : Repeat    : Fi1BillSubCl
    
                    [Field: Fi1BillSubOp]
                        Use        : Fi1BillOp
                        Set as    : $$SubTotal:Fi1BillOp
                        Style    : Normal Italic
                        Border    : FullThinTop
    
                    [Field: Fi1BillSubCl]
                        Use        : Fi1BillCl
                        Set as    : If ($$NumSets = 1) OR ($$Column = 1) Then $$SubTotal:Fi1BILLCl Else 0
                        Style    : Normal Italic
                        Border    : FullThinTop
    
                [Line: Fi1BILL SubTotal]
                    Use             : Fi1BillDetail
                    Delete          : Empty
                    Delete          : NextPage
                    Delete          : Explode
                    Local           : Field    : Fi1BILLDate          : Set as    : ""
                    Local           : Field    : Fi1BILLRef           : Set as    : $$LocaleString:"Sub Total"
                    Local           : Field    : Fi1BILLRef           : Style     : Normal Bold
                    Local           : Field    : Fi1BILLRef           : Indent    : 1.4
                    Local           : Field    : Fi1BILLIsAdvance    : Set as    : ""
                    Local           : Field    : Fi1BILLParty         : Set as    : ""
                    Local           : Field    : Fi1BILLDue           : Set as    : ""
                    Local           : Field    : Fi1BILLOverDue       : Set as    : ""
                    Fixed           : Yes   
                    Space Bottom    : 0.25
                    Space Top       : 0.25
           
            [Line: Fi1BILL OnAccDetail]
                Use         : Fi1BillDetail
                Delete      : Empty
                Delete      : NextPage
                Delete      : Explode
                Local       : Style        : Default           : Italics    : Yes
                Local       : Field     : Fi1BILLDate          : Set as    : @@DSPToDate
                Local       : Field     : Fi1BILLRef           : Set as    : $$LocaleString:"On Account Details"
                Local       : Field     : Fi1BILLIsAdvance     : Set as    : ""
                Local       : Field        : Fi1BILLParty         : Set as    : ""
                Local       : Field     : Fi1BILLOp            : Set as    : $OnAccountValue:Ledger:##LedgerName
                Local       : Field     : Fi1BILLCl            : Set as    : If ($$NumSets = 1) OR ($$Column = 1) OR (##AgeFrom < 0) Then @@FullOnAccount Else 0
                Local       : Field         : Fi1BILLDue           : Set as    : ""
                Local       : Field     : Fi1BILLOverDue       : Set as    : ""
                Local       : Field     : BILLPDC           : Set as    : $$AmountSubtract:#BILLFinal:#BILLCl
                Local       : Field     : BILLFinal         : Set as    : @@FinalOnAccount
                Space Top    : If $$IsSiblingExploded Then @@ExplodedSpace Else 0
                Add         : Next Page    : NOT $$DoExplosionsFit
                Add         : Explode    : BILL OnAccVouchers        : $$InPixelMode AND ($$KeyExplode OR ##ExplodeFlag)
    
        [Line: Fi1BILL Detail]
            Left Fields : Fi1BILLFixed, Fi1BILLOp, Fi1BILLCl, Fi1BillDays
            Repeat      : Fi1BILLCl
            Empty       : (@@ShowForex AND $$IsBaseCurrency:$OpeningBalance AND $$IsBaseCurrency:$ClosingBalance) OR (##ShowInterest AND $$IsEmpty:$Interest)
            Space Top   : if $$IsSiblingExploded then @@ExplodedSpace else 0
            Next Page   : NOT $$DoExplosionsFit OR ($$LineNumber = $$LastLineNumber AND NOT $$IsNextSibling)
            Explode     : BILL Vouchers     : NOT ##ShowInterest AND $$InPixelMode AND ($$KeyExplode OR ##ExplodeFlag)
            Explode     : BILL Interest     : ##ShowInterest AND $$InPixelMode AND ($$KeyExplode OR ##ExplodeFlag)
            Option      : ExplodeOnEnter
            Option      : BILL WithGainLoss : ##IsForexReport
            Option      : BILL WithPDC      : ##ShowPDC AND NOT ##ShowInterest
            Option      : BILL WithInterest : ##ShowInterest
            Option      : Fi1BILL WithDates : NOT ##ShowInterest AND NOT ##IsForexReport
            Option        : SelectedBillsTotalOnFocus    : (##IsBillWiseReport AND ##IsLedgerReport)
    
            [Field: Fi1BILLFixed]
                Fields : Fi1BILLDate, Fi1BILLRef, Fi1BILLIsAdvance, Fi1BILLParty
    
                [Field: Fi1BILLDate]
                    Use         : UniDateField
                    Set as      : $BillDate
                    Style       : Normal Bold
                    Width       : @@LedDateWidth % Screen
    
                [Field: Fi1BILLRef]
                    Use         : ShortNameField
                    Set as      : $Name  
                    Width       : 20% Screen
                    Style       : Normal
                    SpaceLeft   : if ##IsBillWiseReport AND $$InPixelMode then 2.5 else 0.5
                    Option      : BILLRef AsQSrch   : ##IsBillWiseReport
    
                [Field: Fi1BILLIsAdvance]
                    Use         : Simple Field
                    Set as      : if $IsAdvance then $$LocaleString:"(advance)" else ""           
                    Style       : Small Italic
                    Width          : @@LedDateWidth % Screen
                    Full Width    : Yes
                    Invisible   : NOT @@IsLedBillReport OR NOT $$InPixelMode
                    Option        : Excel BILLIsAdvance            : $$InExportMode AND ($$KeyExplode OR ##ExplodeFlag)
    
                [Field: Fi1BILLParty]
                    Use         : NameField
                    Set as      : $PartyName  
                    Style       : if (##ShowOpBillAmt AND NOT $$InPrintMode) then "Normal" else "Normal Bold"
                    Width       : 35% Screen
                    QuickSearch : Yes
                    Invisible   : If ##IsTDSOutstandingReport Then No Else @@IsLedBillReport
                    Option         : Excel BILLParty                : $$InExportMode AND ##ExplodeFlag
    
            [Field: Fi1BILLOp]
                Use         : AmountField
                Type        : Amount
                Set as      : $OpeningBalance
                Style       : Normal
                Invisible   : NOT ##ShowOpBillAmt
                Width       : @@LedAmount % Screen
                Format      : "DrCr," + ##ShowForex
    
            [Field: Fi1BILLCl]
                Use         : AmountField
                Type        : Amount
                Set as      : $ClosingBalance
                Style       : if ##ShowPDC OR (@@DSPToDate < @@CreditPeriod) then "Normal" else "Normal Bold"
                Width       : @@LedAmount % Screen
                Format      : (if ##IsBillWiseReport then "DrCr,NoZero," else "NoZero,") + ##ShowForex
                Invisible   : NOT ##IsBillWiseReport AND ($$NumSets > 1) AND (##AgeFrom < 0)
    
            [Field: Fi1BillDays]
                Fields : Fi1A001, Fi1A002, Fi1A003, Fi1A004, Fi1A005, Fi1A006, Fi1A007, Fi1A008, Fi1A009, +
                            Fi1B001, Fi1B002, Fi1B003, Fi1B004, Fi1B005, Fi1B006, Fi1B007, Fi1B008, Fi1B009
    
    [System : Formula]
        DaysDiff1        :    @@DSPToDate - $BillDate
        DaysDiff2        :    @@DSPToDate - $BillCreditPeriod
       
                                [Field: AgeAmtDefault]
                                    Use         : Amount Field
                                    Width       : @@AgeAmtWidth % Screen
                                    Invisible   : Yes
    
                [Field: Fi1A001]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > 0 AND @@DaysDiff1 <= ##varDate001) Then $ClosingBalance Else ""
    
                [Field: Fi1A002]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate001 AND @@DaysDiff1 <= ##varDate002) Then $ClosingBalance Else ""
    
                [Field: Fi1A003]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate002 AND @@DaysDiff1 <= ##varDate003) Then $ClosingBalance Else ""
    
                [Field: Fi1A004]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate003 AND @@DaysDiff1 <= ##varDate004) Then $ClosingBalance Else ""
    
                [Field: Fi1A005]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate004 AND @@DaysDiff1 <= ##varDate005) Then $ClosingBalance Else ""
    
                [Field: Fi1A006]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate005 AND @@DaysDiff1 <= ##varDate006) Then $ClosingBalance Else ""
    
                [Field: Fi1A007]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate006 AND @@DaysDiff1 <= ##varDate007) Then $ClosingBalance Else ""
    
                [Field: Fi1A008]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff1 > ##varDate007 AND @@DaysDiff1 <= ##varDate008) Then $ClosingBalance Else ""
    
                [Field: Fi1A009]
                    Use         : AgeAmtDefault
                    Set as      : If @@DaysDiff1 > ##varDate008 Then $ClosingBalance Else ""
               
                [Field: Fi1B001]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > 0 AND @@DaysDiff2 <= ##varDate001) Then $ClosingBalance Else ""
    
                [Field: Fi1B002]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate001 AND @@DaysDiff2 <= ##varDate002) Then $ClosingBalance Else ""
    
                [Field: Fi1B003]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate002 AND @@DaysDiff2 <= ##varDate003) Then $ClosingBalance Else ""
    
                [Field: Fi1B004]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate003 AND @@DaysDiff2 <= ##varDate004) Then $ClosingBalance Else ""
    
                [Field: Fi1B005]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate004 AND @@DaysDiff2 <= ##varDate005) Then $ClosingBalance Else ""
    
                [Field: Fi1B006]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate005 AND @@DaysDiff2 <= ##varDate006) Then $ClosingBalance Else ""
    
                [Field: Fi1B007]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate006 AND @@DaysDiff2 <= ##varDate007) Then $ClosingBalance Else ""
    
                [Field: Fi1B008]
                    Use         : AgeAmtDefault
                    Set as      : If (@@DaysDiff2 > ##varDate007 AND @@DaysDiff2 <= ##varDate008) Then $ClosingBalance Else ""
    
                [Field: Fi1B009]
                    Use         : AgeAmtDefault
                    Set as      : If @@DaysDiff2 > ##varDate008 Then $ClosingBalance Else ""
    
        [!Line: Fi1BILL WithDates]
            Right Fields    : Fi1BillDue, Fi1BILLOverdue
    
            [Field: Fi1BILLDue]
                Use             : UniDateField
                Set as          : $$String:@@CreditPeriod:UniversalDate
                Style           : Normal Italic
                Align           : Centre
                Width           : 8% Screen
                Invisible       : Not ##ShowDueOnPrompt
                Fixed            : Yes
    
            [Field: Fi1BILLOverdue]
                Set as          : If (##ShowDaysByBillDate and Not ##ShowReminders) then @DaysByBillDate else @DaysByDueDate
                DaysByBillDate  : $$String:@BillDays
                DaysByDueDate   : If (@@DSPToDate >= @@CreditPeriod) Then $$String:@OverDueDays Else ""
                OverDueDays     : If ($$IsEmpty:$ClosingBalance AND NOT $$IsEmpty:@BillClearedDate) Then @BillClearedDate - @@CreditPeriod Else @@DSPToDate - @@CreditPeriod
                BillDays        : @@DSPToDate - $BillDate
                BillClearedDate    : $ClearedOn
                Width           : 5% Screen
                Style           : Normal Italic
                Align           : Centre
                Invisible       : $$NumSets > 1 OR NOT ($$InPixelMode OR $$InExportMode) OR Not ##ShowOverdueOfBill
                Fixed            : Yes
    
        [Line: Fi1BILL Total]
            Use         : Fi1BillDetail
            Fixed       : Yes
            Delete      : Empty
            Delete      : NextPage
            Delete      : Explode
            Local       : Field : Fi1BillRef         : Set as    : "TOTALS"
            Local       : Field : Fi1BillRef         : Style     : Normal Bold
            Local       : Field : Fi1BillRef         : Widespaced: Yes
            Local       : Field : Fi1BillRef         : Indent    : 2
            Local       : Field : Fi1BillOp            : Set as     : $$Total:Fi1BILLOp
            Local       : Field : Fi1BillOp            : Border     : Flush Totals : $$InPrintMode
            Local       : Field : Fi1BillCl            : Set as     : $$Total:Fi1BILLCl
            Local       : Field : Fi1BillCl            : Border     : Flush Totals : $$InPrintMode
            Local       : Field : BillForex         : Set as     : $$Total:BILLForex
            Local       : Field : BillForex         : Border     : Flush Totals : $$InPrintMode
            Local       : Field : BillPDC           : Set as     : $$Total:BILLPDC
            Local       : Field : BillPDC           : Border     : Flush Totals : $$InPrintMode
            Local       : Field : BillFinal         : Set as     : $$Total:BILLFinal
            Local       : Field : BillFinal         : Border     : Flush Totals : $$InPrintMode
            Local       : Field : BillInterest      : Set as     : $$Total:BILLInterest
            Local       : Field : BillInterest      : Border     : Flush Totals : $$InPrintMode
            Local       : Field : Fi1BillDue           : Type       : String
            Local       : Field : Fi1BillDue           : Set as     : ""
            Local       : Field : Fi1BillOverdue       : Type       : String
            Local       : Field : Fi1BillOverdue       : Set as     : ""
            Local       : Field : Fi1BillDate          : Set as     : ""
            Local       : Field : Fi1BillIsAdvance     : Set as     : ""
            Local       : Field : Fi1BillParty         : Set as     : ""
            Border      : Flush Totals              : NOT $$InPrintMode
            Space Top   : if $$InPrintMode then 0.5 else 0
    
    [Line: Fi1BILL OpPageTotal]
        Use         : Fi1BILL Total
        Local       : Field : Fi1BillRef         : Set as    : "Brought Forward"
        Local       : Field : Fi1BillRef         : Style     : Normal
        Local       : Field : Fi1BillRef         : Widespaced: Yes
        Local       : Field : Fi1BillRef         : Indent    : 2
        Local       : Field : Fi1BillOp            : Delete    : Border
        Local       : Field : Fi1BillCl            : Delete    : Border
        Local       : Field : BillForex         : Delete    : Border
        Local       : Field : BillPDC           : Delete    : Border
        Local       : Field : BillFinal         : Delete    : Border
        Local       : Field : BillInterest      : Delete    : Border
    
    [Line: Fi1BILL ClPageTotal]
        Use         : Fi1BILL Total
        Local       : Field : Fi1BillRef         : Set as    : "Carried Over"
        Local       : Field : Fi1BillRef         : Style     : Normal
        Local       : Field : Fi1BillRef         : Widespaced: Yes
        Local       : Field : Fi1BillRef         : Indent    : 2
        Local       : Field : Fi1BillOp            : Border     : Flush Sub Totals
        Local       : Field : Fi1BillCl            : Border     : Flush Sub Totals
        Local       : Field : BillForex         : Border     : Flush Sub Totals
        Local       : Field : BillPDC           : Border     : Flush Sub Totals
        Local       : Field : BillFinal         : Border     : Flush Sub Totals
        Local       : Field : BillInterest      : Border     : Flush Sub Totals
       
    ;****************************************************************************
    ;********** LEDGER AGEWISE (BOTTOM PART) ************************************
    ;****************************************************************************
    
    [System : Formula]
        AgeNameWidth    : 100 - (@@AgeAmtWidth * 10)
        AgeAmtWidth        : 9
    
    [Part : LedgerAge]
        Line         : LedgerAge0, LedgerAgeTitle, LedgerAge1, LedgerAge2, LedgerAge3,
    
        [Line : LedgerAge0]
            Field : LedgerAge0
           
            [Field : LedgerAge0]
                Set As        : ""
                Invisible    : NOT ($$InExportMode OR $$InPrintMode)
       
        [Line : LedgerAgeTitle]
            Field : LedgerAgeTitle
           
            [Field : LedgerAgeTitle]
                Use            : Name Field
                Set As        : "Age-wise Analysis of Ledger :- " + ##LedgerName
                Style        : Large Bold Italic
                Invisible    : NOT ($$InExportMode OR $$InPrintMode)
                Full Width    : Yes
                Align        : Centre
                Cells        : If ##ShowRunBalance Then 12 Else 11
    
                                    [Field : AgeDefaultName]
                                        Use            : Name Field
                                        Width        : @@AgeAmtWidth % Screen
                                        Style        : Small Bold
                                        Align        : Centre
    
                                    [Field : AgeDefaultAmt]
                                        Use            : Amount Field
                                        Width        : @@AgeAmtWidth % Screen
                                        Style        : Small Bold
                                        Color        : If $$IsDr:$$Value Then "Blue" Else "Red"
                                        Align        : Centre
                                        Border        : Thin Left
                                        Format        : "Dr,Cr"
                                       
        [Line : LedgerAge1]
            Field         : LedgerAge1, A0to30T, A30to60T, A60to90T, A90to120T, A120to180T, A180to270T, A270to1yrT, A1Yrto2YrT ,A2YrNAboveT, AOnAccountT
           
            [Field : LedgerAge1]
                Use            : Name Field
                Set As        : "Ageing Analysis"
                Full Width    : Yes
                Width        : @@AgeNameWidth % Screen
                Style        : Large Bold
                Align        : Left
                Border        : Fi1EncloseRLT : $$InExportMode OR $$InPrintMode
    
            [Field : A0to30T]
                Use            : AgeDefaultName
                Set As        : "â–º " + $$String:##varDate001 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A30to60T]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate001 + " â—„ â–º " + $$String:##varDate002 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A60to90T]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate002 + " â—„ â–º " + $$String:##varDate003 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A90to120T]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate003 + " â—„ â–º " + $$String:##varDate004 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A120to180T]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate004 + " â—„ â–º " + $$String:##varDate005 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A180to270T]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate005 + " â—„ â–º " + $$String:##varDate006 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A270to1YrT]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate006 + " â—„ â–º " + $$String:##varDate007 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A1Yrto2YrT]
                Use            : AgeDefaultName
                Set As        : $$String:##varDate007 + " â—„ â–º " + $$String:##varDate008 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : A2YrNAboveT]
                Use            : AgeDefaultName
                Set As        : "â–º " + $$String:##varDate008 + " days"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
    
            [Field : AOnAccountT]
                Use            : AgeDefaultName
                Set As        : "On Account"
                Border        : Fi1EncloseRT : $$InExportMode OR $$InPrintMode
               
        [Line : LedgerAge2]
            Field         : LedgerAge2, A0to30, A30to60, A60to90, A90to120, A120to180, A180to270, A270to1yr, A1Yrto2yr, A2YrNAbove, AOnAccount
            Border        : Thin Top
    
            [Field : LedgerAge2]
                Use            : Name Field
                Set As        : " --- By Bill Date   "
                Align        : Right
                Full Width    : Yes
                Width        : @@AgeNameWidth % Screen
                Style        : Normal Bold Italic
                Border        : Fi1EncloseRLB
               
            [Field : A0to30]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A001
                Border        : Fi1EncloseRB
    
            [Field : A30to60]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A002
                Border        : Fi1EncloseRB
    
            [Field : A60to90]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A003
                Border        : Fi1EncloseRB
       
            [Field : A90to120]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A004
                Border        : Fi1EncloseRB
    
            [Field : A120to180]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A005
                Border        : Fi1EncloseRB
    
            [Field : A180to270]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A006
                Border        : Fi1EncloseRB
    
            [Field : A270to1Yr]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A007
                Border        : Fi1EncloseRB
    
            [Field : A1Yrto2yr]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A008
                Border        : Fi1EncloseRB
               
            [Field : A2YrNAbove]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1A009
                Border        : Fi1EncloseRB
    
            [Field : AOnAccount]
                Use            : AgeDefaultAmt
                Set As        : $OnAccountValue:Ledger:##LedgerName
                Border        : Fi1EncloseRB
    
        [Line : LedgerAge3]
            Field         : LedgerAge3, B0to30, B30to60, B60to90, B90to120, B120to180, B180to270, B270to1yr, B1Yrto2yr, B2YrNAbove, BOnAccount
    
            [Field : LedgerAge3]
                Use            : Name Field
                Set As        : " --- By Due Date   "
                Align        : Right
                Full Width    : Yes
                Width        : @@AgeNameWidth % Screen
                Style        : Normal Bold Italic   
                Border        : Fi1EncloseRLB
               
            [Field : B0to30]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B001
                Border        : Fi1EncloseRB
    
            [Field : B30to60]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B002
                Border        : Fi1EncloseRB
    
            [Field : B60to90]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B003
                Border        : Fi1EncloseRB
       
            [Field : B90to120]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B004
                Border        : Fi1EncloseRB
    
            [Field : B120to180]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B005
                Border        : Fi1EncloseRB
    
            [Field : B180to270]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B006
                Border        : Fi1EncloseRB
    
            [Field : B270to1Yr]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B007
                Border        : Fi1EncloseRB
    
            [Field : B1Yrto2yr]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B008
                Border        : Fi1EncloseRB
               
            [Field : B2YrNAbove]
                Use            : AgeDefaultAmt
                Set As        : $$Total:Fi1B009
                Border        : Fi1EncloseRB
               
            [Field : BOnAccount]
                Use            : AgeDefaultAmt
                Set As        : $OnAccountValue:Ledger:##LedgerName
                Border        : Fi1EncloseRB
    
    
    ;****************************************************************************
    ;********** BUTTONS *********************************************************
    ;****************************************************************************
       
    [Key: SetDates]
        Key             : Ctrl + D
        Title           : $$LocaleString:"Ageing Dates"
        Action          : Alter : SetDates
    
    [Key : ToggleDueDays]
        Key                : F9
        Title            : If ##ShowDaysByBillDate = "No" Then "By Bill Date" Else "By Credit Period"
        Action            : Set     : ShowDaysByBillDate : If ##ShowDaysByBillDate = "No" Then "Yes" Else "No"
    
    [Key : RunBalOnOff]
        Key                : F10
        Title            : If ##ShowRunBalance = "Yes" Then "Running Bal OFF" Else "Running Bal ON"
        Action            : Set     : ShowRunBalance : If ##ShowRunBalance = "Yes" Then "No" Else "Yes"
    
    [Button: Fi1 LEDVCH Configure]
        Key     : F12
        Title   : $$LocaleString:"4-in-1 Configure"
        Action  : Modify Variables : Fi1LEDVCH Configure
       
    ;****************************************************************************
    ;********** AGEING PARAMETERS ***********************************************
    ;****************************************************************************
    
    [Report : SetDates]
        Form                : SetDates
        Object            : Company
    
    [Form : SetDates]
        Parts           : SetDatesTitle, SetDatesSubTitle, SetDatesData
        Space Top        : 1
        Space Bottom    : 1
        Space Left        : 1
        Space Right        : 1
        Height            : 55% Screen
        Width            : 37% Screen
        Local : Field     : SetDatesData13 : Modifies    : varDate001
        Local : Field     : SetDatesData23 : Modifies    : varDate002
        Local : Field     : SetDatesData33 : Modifies    : varDate003
        Local : Field     : SetDatesData43 : Modifies    : varDate004
        Local : Field     : SetDatesData53 : Modifies    : varDate005
        Local : Field     : SetDatesData63 : Modifies    : varDate006
        Local : Field     : SetDatesData73 : Modifies    : varDate007
        Local : Field     : SetDatesData83 : Modifies    : varDate008
    
    [Part : SetDatesTitle]
        Line            : SetDatesTitle
        Border            : Fi1DoubleBorder
       
        [Line : SetDatesTitle]
            Field            : SetDatesTitle
            Space Top         : .5
            Space Bottom     : .5
    
            [Field : SetDatesTitle]
                Use            : Name Field
                Set As        : "Ageing for : " + #LedgerName
                Full Width    : Yes
                Align        : Centre
                Style        : Large Bold
                Skip        : Yes
    
    [Part : SetDatesSubTitle]
        Line            : SetDatesSubTitle
        Background        : Grey
        Border            : Fi1DoubleBorder1
       
        [Line : SetDatesSubTitle]
            Field            : SetDatesSrT, BlankSpace0, SetDatesFromT, BlankSpace1, SetDatesToT, BlankSpace2, SetDatesDefaultT
            Space Top         : .5
            Space Bottom     : .5
    
                                [Field : BlankSpace0]
                                    Use            : Name Field
                                    Set As        : ""
                                    Align        : Centre
                                    Width        : 3
                                    Fixed        : Yes
                                    Skip        : Yes
    
                                [Field : BlankSpace1]
                                    Use            : Name Field
                                    Set As        : ""
                                    Align        : Centre
                                    Width        : 3
                                    Fixed        : Yes
                                    Skip        : Yes
    
                                [Field : BlankSpace2]
                                    Use            : Name Field
                                    Set As        : ""
                                    Align        : Centre
                                    Width        : 3
                                    Fixed        : Yes
                                    Skip        : Yes
    
            [Field : SetDatesSrT]
                Use            : SetDatesFromT
                Set As        : "#"
                Width        : 8
               
            [Field : SetDatesFromT]
                Use            : Name Field
                Set As        : "Ageing From"
                Align        : Centre
                Color        : Black
                Width        : 11
                Skip        : Yes
               
            [Field : SetDatesToT]
                Use            : SetDatesFromT
                Set As        : "Ageing To"
    
            [Field : SetDatesDefaultT]
                Use            : SetDatesFromT
                Set As        : "Default Days"
               
    [Part: SetDatesData]
            Lines           : SetDatesData1, SetDatesData2, SetDatesData3, SetDatesData4, SetDatesData5, SetDatesData6, +
                                SetDatesData7, SetDatesData8, SetDatesData9,
            Space Top        : 0.5
            Border            : Fi1DoubleBorder1
            BackGround        : Fi1HighlightBox
           
                                [Field : SetDateDefault1]
                                    Use            : Number Field
                                    Align        : Centre
                                    Width        : 8
                                    Fixed        : Yes
                                    Skip        : Yes
                                    Style        : Large Bold
    
                                [Field : SetDateDefault2]
                                    Use            : Number Field
                                    Align        : Centre
                                    Width        : 11
                                    Style        : Large Bold
    
        [Line: SetDatesData1]
            Field           : SetDatesData11, BlankSpace0, SetDatesData12, BlankSpace1, SetDatesData13, BlankSpace2, SetDatesData14,
            Space Bottom     : 0.5
    
            [Field : SetDatesData11]
                Use            : SetDateDefault1
                Set As        : $$Number:1
    
            [Field : SetDatesData12]
                Use            : SetDateDefault2
                Set As        : $$Number:0
                Skip        : Yes
               
            [Field: SetDatesData13]
                Use         : SetDateDefault2
                Validate    : $$Value > #SetDatesData12
                Set as      : ##varDate001
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData14]
                Use            : SetDateDefault2
                Set As        : $$Number:30
                Skip        : Yes
                                   
        [Line: SetDatesData2]
            Field           : SetDatesData21, BlankSpace0, SetDatesData22, BlankSpace1, SetDatesData23, BlankSpace2, SetDatesData24,
            Space Bottom     : 0.5
    
            [Field : SetDatesData21]
                Use            : SetDateDefault1
                Set As        : $$Number:2
    
            [Field : SetDatesData22]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData13=0 Then $$Number:0 Else #SetDatesData13
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData23]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData22
                Set as      : ##varDate002
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData24]
                Use            : SetDateDefault2
                Set As        : $$Number:60
                Skip        : Yes
                                   
        [Line: SetDatesData3]
            Field           : SetDatesData31, BlankSpace0, SetDatesData32, BlankSpace1, SetDatesData33, BlankSpace2, SetDatesData34,
            Space Bottom     : 0.5
    
            [Field : SetDatesData31]
                Use            : SetDateDefault1
                Set As        : $$Number:3
    
            [Field : SetDatesData32]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData23=0 Then $$Number:0 Else #SetDatesData23
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData33]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData32
                Set as      : ##varDate003
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData34]
                Use            : SetDateDefault2
                Set As        : $$Number:90
                Skip        : Yes
                                   
        [Line: SetDatesData4]
            Field           : SetDatesData41, BlankSpace0, SetDatesData42, BlankSpace1, SetDatesData43, BlankSpace2, SetDatesData44,
            Space Bottom     : 0.5
    
            [Field : SetDatesData41]
                Use            : SetDateDefault1
                Set As        : $$Number:4
    
            [Field : SetDatesData42]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData33=0 Then $$Number:0 Else #SetDatesData33
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData43]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData42
                Set as      : ##varDate004
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData44]
                Use            : SetDateDefault2
                Set As        : $$Number:120
                Skip        : Yes
                                   
        [Line: SetDatesData5]
            Field           : SetDatesData51, BlankSpace0, SetDatesData52, BlankSpace1, SetDatesData53, BlankSpace2, SetDatesData54,
            Space Bottom     : 0.5
    
            [Field : SetDatesData51]
                Use            : SetDateDefault1
                Set As        : $$Number:5
    
            [Field : SetDatesData52]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData43=0 Then $$Number:0 Else #SetDatesData43
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData53]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData52
                Set as      : ##varDate005
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData54]
                Use            : SetDateDefault2
                Set As        : $$Number:180
                Skip        : Yes
                                   
        [Line: SetDatesData6]
            Field           : SetDatesData61, BlankSpace0, SetDatesData62, BlankSpace1, SetDatesData63, BlankSpace2, SetDatesData64,
            Space Bottom     : 0.5
    
            [Field : SetDatesData61]
                Use            : SetDateDefault1
                Set As        : $$Number:6
    
            [Field : SetDatesData62]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData53=0 Then $$Number:0 Else #SetDatesData53
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData63]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData62
                Set as      : ##varDate006
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData64]
                Use            : SetDateDefault2
                Set As        : $$Number:270
                Skip        : Yes
                                   
        [Line: SetDatesData7]
            Field           : SetDatesData71, BlankSpace0, SetDatesData72, BlankSpace1, SetDatesData73, BlankSpace2, SetDatesData74,
            Space Bottom     : 0.5
    
            [Field : SetDatesData71]
                Use            : SetDateDefault1
                Set As        : $$Number:7
    
            [Field : SetDatesData72]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData63=0 Then $$Number:0 Else #SetDatesData63
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData73]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData72
                Set as      : ##varDate007
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData74]
                Use            : SetDateDefault2
                Set As        : $$Number:365
                Skip        : Yes
                                   
        [Line: SetDatesData8]
            Field           : SetDatesData81, BlankSpace0, SetDatesData82, BlankSpace1, SetDatesData83, BlankSpace2, SetDatesData84,
            Space Bottom     : 0.5
    
            [Field : SetDatesData81]
                Use            : SetDateDefault1
                Set As        : $$Number:8
    
            [Field : SetDatesData82]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData73=0 Then $$Number:0 Else #SetDatesData73
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData83]
                Use         : SetDateDefault2
                Validate    : $$Value = 0 OR $$Value > #SetDatesData82
                Set as      : ##varDate008
                Set Always    : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData84]
                Use            : SetDateDefault2
                Set As        : $$Number:730
                Skip        : Yes
                                   
        [Line: SetDatesData9]
            Field           : SetDatesData91, BlankSpace0, SetDatesData92, BlankSpace1, SetDatesData93, BlankSpace2, SetDatesData94,
            Space Bottom     : 0.5
    
            [Field : SetDatesData91]
                Use            : SetDateDefault1
                Set As        : $$Number:9
    
            [Field : SetDatesData92]
                Use            : SetDateDefault2
                Set As        : If #SetDatesData83="" Then $$Number:0 Else #SetDatesData83
                Set Always    : Yes
                Skip        : Yes
                BackGround    : Grey
               
            [Field: SetDatesData93]
                Use         : SetDateDefault2
                Skip        : Yes
                Format        : "No Zero"
    
            [Field : SetDatesData94]
                Use            : SetDateDefault2
                Skip        : Yes
    
    
               
    ;****************************************************************************
    ;********** FORMULAS, VARIABLES, COLLECTIONS, COLORS ETC ********************
    ;****************************************************************************
    
    [System: Variables]
        varDate001    : 30
        varDate002    : 60
        varDate003    : 90
        varDate004    : 120
        varDate005    : 180
        varDate006    : 270
        varDate007    : 365
        varDate008    : 730
       
    [System : Formula]
        NewBillDays        :    $$String:"Age of Bill"
        NewOverDueDays    :    $$String:"Days Overdue"
    
        OnlyHigherAllowed   : $$LocaleString:"Number should be\nhigher than\n`FROM' value. !"
       
        Fi1VchOpg          : $$NettAmount:#Fi1DSPVchDrOpAmt:#Fi1DSPVchCrOpAmt
        Fi1VchTrans        : $$NettAmount:#Fi1DSPVchDrTotalAmt:#Fi1DSPVchCrTotalAmt
        Fi1VchClg          : $$NettAmount:@@Fi1VchOpg:@@Fi1VchTrans
    
    [Variable : varDate001]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate002]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate003]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate004]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate005]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate006]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate007]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
       
    [Variable : varDate008]
        Type        : Number
        Set Always    : Yes
        Persistent    : Yes
        Volatile    : No
    
    
    
    [Color : Fi1HighlightBox]
        RGB : 255, 255, 203
    
    [Color : Fi1InactiveBox]
        RGB : 150, 0, 0
    
    [Border: Fi1DoubleBorder]
        Right        : Thick, Double Lined
        Left         : Thick, Double Lined
        Top           : Thick, Double Lined
        Bottom      : Thick, Double Lined
    
    [Border: Fi1DoubleBorder1]
        Right        : Thick, Double Lined
        Left         : Thick, Double Lined
        Bottom      : Thick, Double Lined
    
    [Border: Fi1ThinRight]
        Right        : Thin, Full Length
       
    [Border: Fi1EncloseRLB]
        Right        : Thin, Full Length
        Left         : Thin, Full Length
        Bottom         : Thin, Full Length
       
    [Border: Fi1EncloseRB]
        Right        : Thin, Full Length
        Bottom         : Thin, Full Length
       
    [Border: Fi1EncloseRLT]
        Right        : Thin, Full Length
        Left         : Thin, Full Length
        Top         : Thin, Full Length
       
    [Border: Fi1EncloseRT]
        Right        : Thin, Full Length
        Top         : Thin, Full Length
       
    ;****************************************************************************
    ;********** F12 CONFIGURATION (NEW SETTINGS) ********************************
    ;****************************************************************************
    
    
    [Report: Fi1LEDVCH Configure]
        Auto    : Yes
        Form    : Fi1DSP Configure
        Title    : $$LocaleString:"4-in-1 Ledger Configure"
        Local   : Form     : Fi1DSP Configure     : Add     : Parts : After             : Fi1DSPConfigure    : Fi1LEDVCHCFG Common, Fi1DSP BasicConfig, Fi1LEDBILLCFG Common
        Local    : Part    : Fi1DSP BasicConfig: Add    : Line    : After                : DSP Sorting    : DSP ShowBalance
        Local   : Part     : Fi1DSP BasicConfig: Local    : Line     : DSPInvNameStyle   : Invisible      : ##IsCCReport
        Local   : Part     : Fi1DSP BasicConfig: Local : Line     : DSPInvNameStyle   : Local         : Field: DSPInvNameStyle : Skip    : If  ##IsInvRegister OR #ColumnarDayBook OR #ExtractMode Then No Else NOT #DBKExplodeInv
        Local    : Part    : Fi1DSP BasicConfig: Local : Line     : DSPNameStyle            : Invisible      : ##IsInvRegister
        Local   : Field : Medium Prompt     : Width : @@LongWidth
        Local   : Field : DSPExplode Prompt : Width : @@LongWidth
    
    [Form: Fi1DSP Configure]
        No confirm  : Yes
        Full width  : No
        Full height : No
        Parts       : Fi1DSP Configure
        Local       : Line  : Form SubTitle : SpaceBottom   : 0.5
        Space Top   : 1
        Space Bottom: 1
        Space Left  : 1
        Space Right : 1
    
        [Part: Fi1DSP Configure]
            Lines       : Form SubTitle
            Local       : Field : Form SubTitle : Info : $$LocaleString:"4-in-1 Ledger Configuration"
            Local       : Field : Form SubTitle : Style        : Large Bold
            Border        : Fi1DoubleBorder
    
        [Part: Fi1LEDVCHCFG Common]
            Lines   : Fi1SubTitle, LedVchFilter, DSPExploded, DBKExplodeBill, DBKExplodeCost, DBKExplodeInv, DSPExplodeBank, DSPExplodeBankAll, ShowCreatedBy, DSPExplodeNarr, LedShowForex, ShowForex, INCLOpening, INCLOpExpl
            Local   : Field : ShowForexPrompt   : Info  : $$LocaleString:"Show Forex Transactions only ?"
            Option  : ShowMarkedVouchers    : ##BankRecMode
            Option  : CCOptions             : ##IsCCReport
            Border            : Fi1DoubleBorder1
            Local : Line    : Default : Local : Field : Default : Style : SmallBold
            Local : Line    : Default : Local : Field : Default : Indent: 1
            Local : Line    : Fi1SubTitle : Local : Field : Fi1SubTitle : Set As     : "Configuration for Normal Ledger"
            Local : Line    : Fi1SubTitle : Local : Field : Fi1SubTitle : Style        : Normal Bold
            Space Top       : 0.5
            Space Bottom    : 0.5
            Common Border    : Yes
    
        [Part: Fi1DSP BasicConfig]
            Lines       : DSPInvNameStyle, DSPNameStyle, ShowBudgetType, DSPShowColumnTotal, DSPSetScale, DSPCurrencySymbol, DSPSetPeriod, DSPAverage, DSPHiLo, DSP Sorting, DSP ExplodeAllLevels
            Space Top   : 0.5
            Local       : Field : DSPExplodeAllLevels: Skip on : No
            Local       : Field : DSPExplodeAllLevels: Set as  : ##ExplodeAllLevels
            Border            : Fi1DoubleBorder1
            Local : Line    : Default : Local : Field : Default : Style : SmallBold
            Local : Line    : Default : Local : Field : Default : Indent: 1
            Space Top       : 0.5
            Space Bottom    : 0.5
    
        [Part: Fi1LEDBILLCFG Common]
            Lines   : Fi1SubTitle, ShowPDC, BILLCFG ShowOpAmt, ShowReminders, LedgerAddressToPrint, BILLCFG ShowDueOn, BILLCFG ShowOverdueDayAgeOfBill, BILLCFG ShowByBillDate, ShowBillRange, BillWithOrder, BillWithQty, DSPExplodeNarr, ShowBillType, ShowExciseMfgrRef, ShowForex
            Local    : Line    : ShowReminders        : Invisible        : Yes
            Local    : Line    : BILLCFG ShowOpAmt    : Delete        : Invisible
            Border            : Fi1DoubleBorder1
            Local : Line    : Default : Local : Field : Default : Style : SmallBold
            Local : Line    : Default : Local : Field : Default : Indent: 1
            Local : Line    : Fi1SubTitle : Local : Field : Fi1SubTitle : Set As     : "Configuration for Bill Outstandings"
            Local : Line    : Fi1SubTitle : Local : Field : Fi1SubTitle : Style        : Normal Bold
            Space Top       : 0.5
            Space Bottom    : 0.5
           
        [Line : Fi1SubTitle]
            Field : Fi1SubTitle
            Space Top       : 0.5
            Space Bottom    : 0.5
           
            [Field : Fi1SubTitle]
                Use            : Name Field
                Skip        : Yes
                Fixed        : Yes
                Full Width    : Yes
                Align        : Centre
           
    
     


  2. mkraju_mst

    mkraju_mst New Member


    Thank u sir
    i am already purchased to u
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    That one is totally different and more advanced than this. Above is just the basic version.
     


  4. mkraju_mst

    mkraju_mst New Member


    ok sir how to add indirect expences group not accepted

    $$IsGrpOfGrp:$Parent:$$GroupIndirect Expenses
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    you want to add it where??? in the 4-in-1 code?? how and why?

    Above code is best suited for Ledgers under Debtors and Creditors only.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    remove the blank spaces..........

    $$IsGrpOfGrp:$Parent:$$GroupIndirectExpenses
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member




  8. Great Report.

    But it shows error on print.

    Line:Fi1LV ClPageBreak
    Could not find description
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Capture2.PNG

    Expanded view
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    remove / delete the Pagebreak........ in Form level.......as it is not defined...

    Or you can add your own pagebreaks, colors, backgrounds etc......

    Check the revised code........it has been updated in my above post.
     


  11. Sanjeev S

    Sanjeev S Active Member


    Great Report & Great Learning Sir.
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Yes........you can improve on this.........if you wish.
     
    Sanjeev S likes this.


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I'll be more glad, if you all improve your coding skills and structure of coding too.........

    Let this be a good learning experience....cheers.
     


  14. Jaydeep Shah

    Jaydeep Shah Member


    Sir....mind blowing design and implementation.

    Your report designs are very beautiful and well placed and well designed.
     


  15. balajimg

    balajimg Active Member


    gr8 job
    this will inspire all to develop reports with F12 configurations
     
    Amit Kamdar likes this.


  16. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I also wish to INSPIRE coders/developers to never..... never ever .... touch the default settings/reports etc of Tally.

    Always make your own.........to minimize data corruption.
     


  17. sattam

    sattam Active Member


    Superb really outstanding
     




  18. bharat shah

    bharat shah Member


    WOW super amit sir. 3 cheers to you
     


  19. Deven

    Deven New Member


    Simply GREAT
     


  20. sumamehtra

    sumamehtra Member


    Dear sir,
    Got Error in TDL
    'Variable: IsDisplayReport'
    Could not find description!
     
    Last edited: Jan 20, 2021


  21. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    The error is not from this TDL ...........

    Kindly disable all other loaded TDLs, restart Tally and check again.
     


  22. sumamehtra

    sumamehtra Member


    Remove all tdl and tri several time but got error again.
     

    Attached Files:

    • 1.JPG
      1.JPG
      File size:
      15.1 KB
      Views:
      45
    • 2.JPG
      2.JPG
      File size:
      14.3 KB
      Views:
      42
    • 3.JPG
      3.JPG
      File size:
      8.7 KB
      Views:
      48


  23. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Can you COPY-PASTE the code once again............and try it.

    If not working...... then comment/remove all ....such references....... there are only 2
     


  24. Sravan.kodoori

    Sravan.kodoori New Member


    Sir, this one is very useful for me. Actually i am working in Gulf Country(Bahrain). here VAT is applicable, Can you please change GST to VAT(TRN)
     


Share This Page