Bad Formula : Column Total

Discussion in 'Free Source Codes' started by NSA, Nov 10, 2020.

    
  1. NSA

    NSA Member


    Dear Experts,

    Can you please teach me to rectify the error in my codes? it shows Bad formula for the column total;


    [#Menu: Gateway of Tally]

    Add : Item : Ledger : Display Collection : RCP LedgerColl : NOT $$IsEmpty:$$SelectedCmps

    [Collection: RCP LedgerColl]

    Use : Alias Collection ;; Default Collection for including Alias
    Type : Ledger
    Variable : LedgerName ;; Default Variable LedgerName is used
    Trigger : RCP Triggered LedRpt
    Report : RCP Final LedRpt
    Fetch : Name




    [Report: RCP Triggered LedRpt]

    Title : "Select Ledger"
    Form : RCP Triggered LedFrm


    [Form: RCP Triggered LedFrm]

    Parts : RCP Triggered LedPrt

    [Part: RCP Triggered LedPrt]

    Lines : RCP Triggered LedLne

    [Line: RCP Triggered LedLne]

    Fields : Medium Prompt, RCP Triggered LedFld
    Local: Field: Medium Prompt : Set as : "Ledger :"

    [Field: RCP Triggered LedFld]

    Use : Name Field
    Table : RCP LedgerColl
    Show Table : Always
    Modifies : LedgerName



    [Report: RCP Final LedRpt]

    Form : RCP Final LedRpt
    Title : $$LocaleString:"Ledger"
    Print Set : Report Title : $$LocaleString:"Ledger"
    Fetch Object : Ledger : #LedgerName : Name, LedgerContact, VoucherTypeName, VoucherNumber, OpeningBalance, LedOpeningBalance, TBalOpening

    Variable : SVFRomDate, SVToDate
    Variable : DSPShowOpening, DSPShowClosing
    Set : SVFRomDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate




    [Form: RCP Final LedRpt]

    Parts : RCP TtlePeriodPrt, RCP FinLedTtlePrt
    Bottom Parts : RCP ClosingBalance
    Height : 100% Screen
    Width : 100% Screen
    Button : Print Button, ExportButton, ExplodeFlag, Change Period


    [Part : RCP TtlePeriodPrt]

    Line : RCP TtlePeriodLne
    Space Bottom : 0.50

    [Line: RCP TtlePeriodLne]

    Field : Name Field
    Right Field : Simple Field

    Local : Field : Default : Style : Normal Bold


    Local : Field : Name Field : Set as : #LedgerName
    Local : Field : Name Field : Full Width: Yes

    Local : Field : Name Field : Cells : 2

    Local : Field : Simple Field : Set as : $$String:##SVFromDate + " to " + $$String:##SVToDate
    Local : Field : Simple Field : Full Width: Yes
    Local : Field : Simple Field : Align : Right

    ;Local : Field : Simple Field : Cells : $$Column:5 ;$$Quotient:mad:@ExcelCellColumn:4






    [Part : RCP FinLedTtlePrt]

    Left Part : RCP DebitTtlePrt
    Right Part : RCP CreditTtlePrt


    [Part : RCP DebitTtlePrt]

    Line : RCP DebitTtleLne, RCP OpeningBalanceLne, RCP DebitDetlsLne
    Repeat : RCP DebitDetlsLne : RCP LedVch Coll

    Bottom Line : RCP FinalTotalLneDebit
    Total : RCP DebitAmountFld

    Scroll : Vertical
    Common Border : Yes


    [Line : RCP OpeningBalanceLne]

    Use : RCP DebitDetlsLne

    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Opening Balance"
    Local : Field : RCP ParticularFld : Invisible : Not $$IsDr:$OpeningBalance:Ledger:#LedgerName ;;OR $$IsEmpty:$OpeningBalance:Ledger:#LedgerName


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""

    Local : Field : RCP DebitAmountFld : Set as : $OpeningBalance:Ledger:#LedgerName
    Local : Field : RCP DebitAmountFld : Invisible : Not $$IsDr:$OpeningBalance:Ledger:#LedgerName

    Space Top : 0.15


    [Line : RCP DebitTtleLne]

    Use : RCP DebitDetlsLne

    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String
    Local : Field : Default : Delete : Style

    ;Field : RCP DateFld, RCP ParticularFld
    ;Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld

    Local : Field : RCP DateFld : Set as: $$LocaleString:"Date"
    Local : Field : RCP DateFld : Type : String
    Local : Field : RCP DateFld : Add : Style : Small

    Local : Field : RCP ParticularFld : Set as: $$LocaleString:"Particulars" + $$NewLine + $$LocaleString:"(Debit)"
    Local : Field : RCP ParticularFld : Add : Style : Small Bold

    Local : Field : RCP VchTypeFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"Type"
    Local : Field : RCP VchTypeFld : Add : Style : Small

    Local : Field : RCP VchNumberFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"No."
    Local : Field : RCP VchNumberFld : Add : Style : Small
    Local : Field : RCP VchNumberFld : Align : Right

    ;Local : Field : RCP SupplierInvNoFld : Set as: $$LocaleString:"Supplier" + $$NewLine + $$LocaleString:"Invoice No."

    Local : Field : RCP DebitAmountFld : Set as: $$LocaleString:"Debit" + $$NewLine + $$LocaleString:"Amount"
    Local : Field : RCP DebitAmountFld : Type : String
    Local : Field : RCP DebitAmountFld : Add : Style : Small Bold
    Local : Field : RCP DebitAmountFld : Border: Thin Right

    Border : Column Titles


    [Line : RCP DebitDetlsLne]
    Explode : MyInvExplode: NOT $$IsEmpty:$StockItemName
    Field : RCP DateFld, RCP ParticularFld
    Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld


    [Field : RCP DateFld]

    Use : Short Date Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $Date Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $Date Else ""
    Set Always : Yes
    Width : 5% Screen
    Alter : Voucher
    Style : Small

    [Field : RCP ParticularFld]

    Use : Name Field
    Set as : If $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $LedgerEntries[2].LedgerName Else +
    If $$IsJournal:$VoucherTypeName then $LedgerEntries[1].LedgerName Else $LedgerEntries[2].LedgerName
    Set Always : Yes
    FullWidth : Yes
    Style : Small Bold

    [Field : RCP VchTypeFld]

    Use : Name Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $VoucherTypeName Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $VoucherTypeName Else ""

    Set Always : Yes
    Width : 5% Screen
    Style : Small Bold

    [Field : RCP VchNumberFld]

    Use : Name Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $VoucherNumber Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $VoucherNumber Else ""
    Width : 5% Screen
    Set Always : Yes
    Align : Right
    Style : Small

    [Field : RCP DebitAmountFld]

    Use : Amount Field
    Set as : if Not $$IsJournal:$VoucherTypeName AND $$IsDr:$Amount then $LedgerEntries[2].Amount Else 0
    Set Always : Yes
    Width : @@AmountWidth
    Style : Small Bold






    [Line : RCP FinalTotalLneDebit]

    Use : RCP DebitDetlsLne

    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Total"


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP DebitAmountFld : Set as : $$Total:RCP DebitAmountFld
    Local : Field : RCP DebitAmountFld : Border : Thin Top
    Space Bottom : 0.15


    [Collection : RCP LedVch Coll]

    Type : Voucher
    filter: LedFil
    Fetch : Name, Ledger Name, Date, VoucherNumber, LedgerName, PartyLedgerName, StockItemName
    Fetch : ParentFullList, DebitTotals, CreditTotals

    Compute : FirstContraAcc : $$FirstContraAcc:$$IsDr:($$OrigVchLedTotal:#LedgerName)
    Compute : OrigVchLedDrTotal : $$OrigVchLedDrTotal:#LedgerName
    Compute : OrigVchLedCrTotal : $$OrigVchLedCrTotal:#LedgerName
    Compute : FirstName : $.Name[2].Name
    Delete : Set as
    Add : Set as : $FirstName

    Sort : @@Default : $Date




    ;;------------------------------------------------------------------------------------------------------------------------------------------
    ;; Right Part ;;

    [Part : RCP CreditTtlePrt]

    Line : RCP CreditTtleLne, RCP CrOpeningBalanceLne, RCP CreditDetlsLne
    Repeat : RCP CreditDetlsLne : RCP LedVch Coll

    Bottom Line : RCP FinalTotalLneCredit
    Total : RCP CreditAmountFld

    Scroll : Vertical
    Common Border : Yes


    [Line : RCP CrOpeningBalanceLne]

    Use : RCP CreditDetlsLne

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Opening Balance"
    Local : Field : RCP CrParticularFld : Invisible :$$IsDr:$OpeningBalance:Ledger:#LedgerName ;;OR $$IsEmpty:$OpeningBalance:Ledger:#LedgerName


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""

    Local : Field : RCP CreditAmountFld : Set as : $OrigVchLedCrTotal
    Local : Field : RCP CreditAmountFld : Invisible : $$IsDr:$OpeningBalance:Ledger:#LedgerName

    Space Top : 0.15


    [Line : RCP CreditTtleLne]

    Use : RCP CreditDetlsLne

    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String
    Local : Field : Default : Delete : Style

    ;Field : RCP CrDateFld, RCP CrParticularFld
    ;Right Field : RCP CrVchTypeFld, RCP CrVchNumberFld, /*RCP CrSupplierInvNoFld,*/ RCP CreditAmountFld

    Local : Field : RCP CrDateFld : Set as: $$LocaleString:"Date"
    Local : Field : RCP CrDateFld : Type : String
    Local : Field : RCP CrDateFld : Add : Style : Small

    Local : Field : RCP CrParticularFld : Set as: $$LocaleString:"Particulars" + $$NewLine + $$LocaleString:"(Credit)"
    Local : Field : RCP CrParticularFld : Add : Style : Small Bold

    Local : Field : RCP CrVchTypeFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"Type"
    Local : Field : RCP CrVchTypeFld : Add : Style : Small

    Local : Field : RCP CrVchNumberFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"No."
    Local : Field : RCP CrVchNumberFld : Add : Style : Small
    Local : Field : RCP CrVchNumberFld : Align : Right

    ;Local : Field : RCP CrSupplierInvNoFld : Set as: $$LocaleString:"Supplier" + $$NewLine + $$LocaleString:"Invoice No."

    Local : Field : RCP CreditAmountFld : Set as: $$LocaleString:"Credit" + $$NewLine + $$LocaleString:"Amount"
    Local : Field : RCP CreditAmountFld : Type : String
    Local : Field : RCP CreditAmountFld : Add : Style : Small Bold
    Local : Field : RCP CreditAmountFld : Border: Thin Right

    Border : Column Titles


    [Line : RCP CreditDetlsLne]

    Field : RCP CrDateFld, RCP CrParticularFld
    Right Field : RCP CrVchTypeFld, RCP CrVchNumberFld, /*RCP CrSupplierInvNoFld,*/ RCP CreditAmountFld

    Space Bottom: 0.15
    ;;Remove if : $$IsEmpty:$$OrigVchLedCrTotal:#LedgerName




    [Field : RCP CrDateFld]

    Use : Short Date Field
    Set as :$Date
    Set Always : Yes
    Width : 5% Screen
    Alter : Voucher
    Style : Small

    [Field : RCP CrParticularFld]

    Use : Name Field
    Set as : $FirstContraAcc
    Set Always : Yes
    FullWidth : Yes
    Style : Small Bold


    [Field : RCP CrVchTypeFld]

    Use : Name Field
    Set as : $AdditionalName ;;$VoucherTypeName
    Set Always : Yes
    Width : 5% Screen
    Style : Small Bold

    [Field : RCP CrVchNumberFld]

    Use : Name Field
    Set as : $VoucherNumber
    Width : 5% Screen
    Set Always : Yes
    Align : Right
    Style : Small

    [Field : RCP CreditAmountFld]

    Use : Amount Field
    Set as : $Amount
    Set Always : Yes
    Width : @@AmountWidth
    Style : Small Bold




    *************************************************************************************************



    [Collection : My Voucher Rep Collection]
    Type : Vouchers
    Fetch : Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber


    [Collection:SunDebColl]
    Type: Ledgers
    Child of:"Sundry Debtors"
    Belong To: Yes
    Filter:Ledfil

    [System: Formula]
    LedFil: $PartyLedgerName = ##LedgerName



    [Part : MyInvExplode]

    Line : MyInvExplode
    Repeat : MyInvExplode : AllInventoryEntries

    [Line : MyInvExplode]
    Field : RCP DateFld, RCP ParticularFld
    Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld
    Remove If : $$IsEmpty:$StockItemName

    Local : Field : RCP DateFld : Set As : $Date
    Local : Field : RCP ParticularFld: Set As : $StockItemName
    Local : Field : RCP DebitAmountFld: Set As : $Amount
    Local : Field : RCP VchNumberFld :””
    Local : Field : RCP VchTypeFld: Set As :””









    ;;Findal Total Line ;;
    [Line : RCP FinalTotalLneCredit]
    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String

    Use : RCP CreditDetlsLne

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Total"


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP CreditAmountFld : Set as : $$Total:RCP CreditAmountFld
    Local : Field : RCP CreditAmountFld : Border : Thin Top
    Space Bottom : 0.15


    [Part : RCP ClosingBalance]
    Left Parts : RCP Balance Receibales
    Right Parts : RCP Balance Payable

    [Part : RCP Balance Receibales]
    Line : RCP ClosingBalanceCrLne
    [Line : RCP ClosingBalanceCrLne]

    Use : RCP DebitDetlsLne


    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Closing Balance"
    Local : Field : RCP ParticularFld : Invisible : Not $$IsDr:$ClosingBalance:Ledger:#LedgerName


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP DebitAmountFld : Set as : IF Not $$IsDr:$ClosingBalance:Ledger:#LedgerName Then 0 Else +
    $ClosingBalance:Ledger:#LedgerName ;@@LedClosing
    Border : Totals

    [Part : RCP Balance Payable]
    Line : RCP ClosingBalanceDrLne
    [Line : RCP ClosingBalanceDrLne]

    Use : RCP CreditDetlsLne
    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Closing Balance"
    Local : Field : RCP CrParticularFld : Invisible : $$IsDr:$ClosingBalance:Ledger:#LedgerName


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP CreditAmountFld : Set as : IF Not $$IsDr:$ClosingBalance:Ledger:#LedgerName Then +
    $ClosingBalance:Ledger:#LedgerName Else 0 ;@@LedClosing
    Border : Totals


    [Collection: My Source Collection]
    Type : Voucher
    [Collection: My Summary Collection]
    Source Collection : My Source Collection
    Filter:Ledfil
    Walk : Ledger Entries
    By : MyLedgeName : $LedgerName
    Aggr Compute : My Total : Sum : $Amount
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Bad formula means...............typo or wrong syntax.............

    you cannot have space in a formula........ even though your Field Name has one......... in formula, you have to remove it.
     


  3. Murali.R

    Murali.R Member


    Rectified code...
    [#Menu: Gateway of Tally]

    Add : Item : Ledger : Display Collection : RCP LedgerColl : NOT $$IsEmpty:$$SelectedCmps

    [Collection: RCP LedgerColl]

    Use : Alias Collection ;; Default Collection for including Alias
    Type : Ledger
    Variable : LedgerName ;; Default Variable LedgerName is used
    Trigger : RCP Triggered LedRpt
    Report : RCP Final LedRpt
    Fetch : Name




    [Report: RCP Triggered LedRpt]

    Title : "Select Ledger"
    Form : RCP Triggered LedFrm


    [Form: RCP Triggered LedFrm]

    Parts : RCP Triggered LedPrt

    [Part: RCP Triggered LedPrt]

    Lines : RCP Triggered LedLne

    [Line: RCP Triggered LedLne]

    Fields : Medium Prompt, RCP Triggered LedFld
    Local: Field: Medium Prompt : Set as : "Ledger :"

    [Field: RCP Triggered LedFld]

    Use : Name Field
    Table : RCP LedgerColl
    Show Table : Always
    Modifies : LedgerName



    [Report: RCP Final LedRpt]

    Form : RCP Final LedRpt
    Title : $$LocaleString:"Ledger"
    Print Set : Report Title : $$LocaleString:"Ledger"
    Fetch Object : Ledger : #LedgerName : Name, LedgerContact, VoucherTypeName, VoucherNumber, OpeningBalance, LedOpeningBalance, TBalOpening

    Variable : SVFRomDate, SVToDate
    Variable : DSPShowOpening, DSPShowClosing
    Set : SVFRomDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate




    [Form: RCP Final LedRpt]

    Parts : RCP TtlePeriodPrt, RCP FinLedTtlePrt
    Bottom Parts : RCP ClosingBalance
    Height : 100% Screen
    Width : 100% Screen
    Button : Print Button, ExportButton, ExplodeFlag, Change Period


    [Part : RCP TtlePeriodPrt]

    Line : RCP TtlePeriodLne
    Space Bottom : 0.50

    [Line: RCP TtlePeriodLne]

    Field : Name Field
    Right Field : Simple Field

    Local : Field : Default : Style : Normal Bold


    Local : Field : Name Field : Set as : #LedgerName
    Local : Field : Name Field : Full Width: Yes

    Local : Field : Name Field : Cells : 2

    Local : Field : Simple Field : Set as : $$String:##SVFromDate + " to " + $$String:##SVToDate
    Local : Field : Simple Field : Full Width: Yes
    Local : Field : Simple Field : Align : Right

    ;Local : Field : Simple Field : Cells : $$Column:5 ;$$Quotient:mad:@ExcelCellColumn:4






    [Part : RCP FinLedTtlePrt]

    Left Part : RCP DebitTtlePrt
    Right Part : RCP CreditTtlePrt


    [Part : RCP DebitTtlePrt]

    Line : RCP DebitTtleLne, RCP OpeningBalanceLne, RCP DebitDetlsLne
    Repeat : RCP DebitDetlsLne : RCP LedVch Coll

    Bottom Line : RCP FinalTotalLneDebit
    Total : RCPDebitAmountFld

    Scroll : Vertical
    Common Border : Yes


    [Line : RCP OpeningBalanceLne]

    Use : RCP DebitDetlsLne

    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Opening Balance"
    Local : Field : RCP ParticularFld : Invisible : Not $$IsDr:$OpeningBalance:Ledger:#LedgerName ;;OR $$IsEmpty:$OpeningBalance:Ledger:#LedgerName


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""

    Local : Field : RCP DebitAmountFld : Set as : $OpeningBalance:Ledger:#LedgerName
    Local : Field : RCP DebitAmountFld : Invisible : Not $$IsDr:$OpeningBalance:Ledger:#LedgerName

    Space Top : 0.15


    [Line : RCP DebitTtleLne]

    Use : RCP DebitDetlsLne

    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String
    Local : Field : Default : Delete : Style

    ;Field : RCP DateFld, RCP ParticularFld
    ;Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld

    Local : Field : RCP DateFld : Set as: $$LocaleString:"Date"
    Local : Field : RCP DateFld : Type : String
    Local : Field : RCP DateFld : Add : Style : Small

    Local : Field : RCP ParticularFld : Set as: $$LocaleString:"Particulars" + $$NewLine + $$LocaleString:"(Debit)"
    Local : Field : RCP ParticularFld : Add : Style : Small Bold

    Local : Field : RCP VchTypeFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"Type"
    Local : Field : RCP VchTypeFld : Add : Style : Small

    Local : Field : RCP VchNumberFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"No."
    Local : Field : RCP VchNumberFld : Add : Style : Small
    Local : Field : RCP VchNumberFld : Align : Right

    ;Local : Field : RCP SupplierInvNoFld : Set as: $$LocaleString:"Supplier" + $$NewLine + $$LocaleString:"Invoice No."

    Local : Field : RCP DebitAmountFld : Set as: $$LocaleString:"Debit" + $$NewLine + $$LocaleString:"Amount"
    Local : Field : RCP DebitAmountFld : Type : String
    Local : Field : RCP DebitAmountFld : Add : Style : Small Bold
    Local : Field : RCP DebitAmountFld : Border: Thin Right

    Border : Column Titles


    [Line : RCP DebitDetlsLne]
    Explode : MyInvExplode: NOT $$IsEmpty:$StockItemName
    Field : RCP DateFld, RCP ParticularFld
    Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld


    [Field : RCP DateFld]

    Use : Short Date Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $Date Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $Date Else ""
    Set Always : Yes
    Width : 5% Screen
    Alter : Voucher
    Style : Small

    [Field : RCP ParticularFld]

    Use : Name Field
    Set as : If $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $LedgerEntries[2].LedgerName Else +
    If $$IsJournal:$VoucherTypeName then $LedgerEntries[1].LedgerName Else $LedgerEntries[2].LedgerName
    Set Always : Yes
    FullWidth : Yes
    Style : Small Bold

    [Field : RCP VchTypeFld]

    Use : Name Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $VoucherTypeName Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $VoucherTypeName Else ""

    Set Always : Yes
    Width : 5% Screen
    Style : Small Bold

    [Field : RCP VchNumberFld]

    Use : Name Field
    Set as :If Not $Parent:Ledger:$FirstContraAcc = "Sales Accounts" Then $VoucherNumber Else +
    If $Parent:Ledger:$LedgerEntries[2].LedgerName = "Indirect Incomes" Then $VoucherNumber Else ""
    Width : 5% Screen
    Set Always : Yes
    Align : Right
    Style : Small

    [Field : RCP DebitAmountFld]

    Use : Amount Field
    Set as : if Not $$IsJournal:$VoucherTypeName AND $$IsDr:$Amount then $LedgerEntries[2].Amount Else 0
    Set Always : Yes
    Width : @@AmountWidth
    Style : Small Bold






    [Line : RCP FinalTotalLneDebit]

    Use : RCP DebitDetlsLne

    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Total"


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP DebitAmountFld : Set as : $$Total:RCPDebitAmountFld
    Local : Field : RCP DebitAmountFld : Border : Thin Top
    Space Bottom : 0.15


    [Collection : RCP LedVch Coll]

    Type : Voucher
    filter: LedFil
    Fetch : Name, Ledger Name, Date, VoucherNumber, LedgerName, PartyLedgerName, StockItemName
    Fetch : ParentFullList, DebitTotals, CreditTotals

    Compute : FirstContraAcc : $$FirstContraAcc:$$IsDr:($$OrigVchLedTotal:#LedgerName)
    Compute : OrigVchLedDrTotal : $$OrigVchLedDrTotal:#LedgerName
    Compute : OrigVchLedCrTotal : $$OrigVchLedCrTotal:#LedgerName
    Compute : FirstName : $.Name[2].Name
    Delete : Set as
    Add : Set as : $FirstName

    Sort : @@Default : $Date




    ;;------------------------------------------------------------------------------------------------------------------------------------------
    ;; Right Part ;;

    [Part : RCP CreditTtlePrt]

    Line : RCP CreditTtleLne, RCP CrOpeningBalanceLne, RCP CreditDetlsLne
    Repeat : RCP CreditDetlsLne : RCP LedVch Coll

    Bottom Line : RCP FinalTotalLneCredit
    Total : RCPCreditAmountFld

    Scroll : Vertical
    Common Border : Yes


    [Line : RCP CrOpeningBalanceLne]

    Use : RCP CreditDetlsLne

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Opening Balance"
    Local : Field : RCP CrParticularFld : Invisible :$$IsDr:$OpeningBalance:Ledger:#LedgerName ;;OR $$IsEmpty:$OpeningBalance:Ledger:#LedgerName


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""

    Local : Field : RCP CreditAmountFld : Set as : $OrigVchLedCrTotal
    Local : Field : RCP CreditAmountFld : Invisible : $$IsDr:$OpeningBalance:Ledger:#LedgerName

    Space Top : 0.15


    [Line : RCP CreditTtleLne]

    Use : RCP CreditDetlsLne

    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String
    Local : Field : Default : Delete : Style

    ;Field : RCP CrDateFld, RCP CrParticularFld
    ;Right Field : RCP CrVchTypeFld, RCP CrVchNumberFld, /*RCP CrSupplierInvNoFld,*/ RCP CreditAmountFld

    Local : Field : RCP CrDateFld : Set as: $$LocaleString:"Date"
    Local : Field : RCP CrDateFld : Type : String
    Local : Field : RCP CrDateFld : Add : Style : Small

    Local : Field : RCP CrParticularFld : Set as: $$LocaleString:"Particulars" + $$NewLine + $$LocaleString:"(Credit)"
    Local : Field : RCP CrParticularFld : Add : Style : Small Bold

    Local : Field : RCP CrVchTypeFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"Type"
    Local : Field : RCP CrVchTypeFld : Add : Style : Small

    Local : Field : RCP CrVchNumberFld : Set as: $$LocaleString:"Vch" + $$NewLine + $$LocaleString:"No."
    Local : Field : RCP CrVchNumberFld : Add : Style : Small
    Local : Field : RCP CrVchNumberFld : Align : Right

    ;Local : Field : RCP CrSupplierInvNoFld : Set as: $$LocaleString:"Supplier" + $$NewLine + $$LocaleString:"Invoice No."

    Local : Field : RCP CreditAmountFld : Set as: $$LocaleString:"Credit" + $$NewLine + $$LocaleString:"Amount"
    Local : Field : RCP CreditAmountFld : Type : String
    Local : Field : RCP CreditAmountFld : Add : Style : Small Bold
    Local : Field : RCP CreditAmountFld : Border: Thin Right

    Border : Column Titles


    [Line : RCP CreditDetlsLne]

    Field : RCP CrDateFld, RCP CrParticularFld
    Right Field : RCP CrVchTypeFld, RCP CrVchNumberFld, /*RCP CrSupplierInvNoFld,*/ RCP CreditAmountFld

    Space Bottom: 0.15
    ;;Remove if : $$IsEmpty:$$OrigVchLedCrTotal:#LedgerName




    [Field : RCP CrDateFld]

    Use : Short Date Field
    Set as :$Date
    Set Always : Yes
    Width : 5% Screen
    Alter : Voucher
    Style : Small

    [Field : RCP CrParticularFld]

    Use : Name Field
    Set as : $FirstContraAcc
    Set Always : Yes
    FullWidth : Yes
    Style : Small Bold


    [Field : RCP CrVchTypeFld]

    Use : Name Field
    Set as : $AdditionalName ;;$VoucherTypeName
    Set Always : Yes
    Width : 5% Screen
    Style : Small Bold

    [Field : RCP CrVchNumberFld]

    Use : Name Field
    Set as : $VoucherNumber
    Width : 5% Screen
    Set Always : Yes
    Align : Right
    Style : Small

    [Field : RCP CreditAmountFld]

    Use : Amount Field
    Set as : $Amount
    Set Always : Yes
    Width : @@AmountWidth
    Style : Small Bold




    *************************************************************************************************



    [Collection : My Voucher Rep Collection]
    Type : Vouchers
    Fetch : Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber


    [Collection:SunDebColl]
    Type: Ledgers
    Child of:"Sundry Debtors"
    Belong To: Yes
    Filter:Ledfil

    [System: Formula]
    LedFil: $PartyLedgerName = ##LedgerName



    [Part : MyInvExplode]

    Line : MyInvExplode
    Repeat : MyInvExplode : AllInventoryEntries

    [Line : MyInvExplode]
    Field : RCP DateFld, RCP ParticularFld
    Right Field : RCP VchTypeFld, RCP VchNumberFld, /*RCP SupplierInvNoFld,*/ RCP DebitAmountFld
    Remove If : $$IsEmpty:$StockItemName

    Local : Field : RCP DateFld : Set As : $Date
    Local : Field : RCP ParticularFld: Set As : $StockItemName
    Local : Field : RCP DebitAmountFld: Set As : $Amount
    Local : Field : RCP VchNumberFld :””
    Local : Field : RCP VchTypeFld: Set As :””









    ;;Findal Total Line ;;
    [Line : RCP FinalTotalLneCredit]
    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String

    Use : RCP CreditDetlsLne

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Total"


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP CreditAmountFld : Set as : $$Total:RCPCreditAmountFld
    Local : Field : RCP CreditAmountFld : Border : Thin Top
    Space Bottom : 0.15


    [Part : RCP ClosingBalance]
    Left Parts : RCP Balance Receibales
    Right Parts : RCP Balance Payable

    [Part : RCP Balance Receibales]
    Line : RCP ClosingBalanceCrLne
    [Line : RCP ClosingBalanceCrLne]

    Use : RCP DebitDetlsLne


    Local : Field : RCP DateFld : Set as : $$LocaleString:""

    Local : Field : RCP ParticularFld : Set as : $$LocaleString:"Closing Balance"
    Local : Field : RCP ParticularFld : Invisible : Not $$IsDr:$ClosingBalance:Ledger:#LedgerName


    Local : Field : RCP VchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP VchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP DebitAmountFld : Set as : IF Not $$IsDr:$ClosingBalance:Ledger:#LedgerName Then 0 Else +
    $ClosingBalance:Ledger:#LedgerName ;@@LedClosing
    Border : Totals

    [Part : RCP Balance Payable]
    Line : RCP ClosingBalanceDrLne
    [Line : RCP ClosingBalanceDrLne]

    Use : RCP CreditDetlsLne
    Local : Field : Default : Line : 0
    ;;Local : Field : Default : Type : String

    Local : Field : RCP CrDateFld : Set as : $$LocaleString:""

    Local : Field : RCP CrParticularFld : Set as : $$LocaleString:"Closing Balance"
    Local : Field : RCP CrParticularFld : Invisible : $$IsDr:$ClosingBalance:Ledger:#LedgerName


    Local : Field : RCP CrVchTypeFld : Set as : $$LocaleString:""
    Local : Field : RCP CrVchNumberFld : Set as : $$LocaleString:""
    Local : Field : RCP CreditAmountFld : Set as : IF Not $$IsDr:$ClosingBalance:Ledger:#LedgerName Then +
    $ClosingBalance:Ledger:#LedgerName Else 0 ;@@LedClosing
    Border : Totals


    [Collection: My Source Collection]
    Type : Voucher
    [Collection: My Summary Collection]
    Source Collection : My Source Collection
    Filter:Ledfil
    Walk : Ledger Entries
    By : MyLedgeName : $LedgerName
    Aggr Compute : My Total : Sum : $Amount
     


  4. NSA

    NSA Member


    Tha
    Thank You Sir
     


Share This Page