Free Code : Total of Selected Lines

Discussion in 'Free Source Codes' started by Jay kumar tailor, May 4, 2019.

         
?

Did you Know. Total Of Selected Entries Possible.?

Poll closed Jun 26, 2019.
  1. Yes

    1 vote(s)
    50.0%
  2. No

    0 vote(s)
    0.0%
  3. I Already Seen That Post Earlier.

    1 vote(s)
    50.0%
  4. If You Already Seen Or Used. Is It Working Perfectly?

    0 vote(s)
    0.0%
  1. anish

    anish Member


    Thank you Jay Brother ! working great
     


  2. Jay kumar tailor

    Jay kumar tailor Active Member


    Welcome Dear... :)
     


  3. Vikram Bhat

    Vikram Bhat Member


    Working Perfect Great Job
     


  4. Frz

    Frz Member


    Working great!!
     


  5. Rajsrisrimal

    Rajsrisrimal Member


    Sir its awesome, working fine salute for your work
     


  6. Rajsrisrimal

    Rajsrisrimal Member


    sir
    is it possible to use same at statutory reports> GST reports> GSTR 3B> Voucher Register. ??
     


  7. garima

    garima Active Member


    Post the corrected code :D:D
     


  8. Jay kumar tailor

    Jay kumar tailor Active Member


    This is Final
    Code
     
    Rohit Khedar likes this.




  9. mpal2311

    mpal2311 Active Member


    Great!!!
     


  10. garima

    garima Active Member


    Jay Kumar .. Tussi Great Ho.. you are hard working and now an Engineer..
     


  11. Jay kumar tailor

    Jay kumar tailor Active Member


    Sir,
    Thanks A Ton To You.

    Thanks To Forum Members For Cooperate Each Other.

    Also Thanks To This Forum Admin For Introducing This Learning Platform.
     
    Last edited: Jun 25, 2019


  12. Jay kumar tailor

    Jay kumar tailor Active Member


    Hi All
    Jay Here...

    Now...

    It Is Working In Group Summary of Ledgers

    Selected All Button Also Added In Group Summary

    Please Test It.
    Enjoy it.

    Here Is The Full Code

    Code:
    [#System: Formula]
        SV_SEL_CURSOR_BG  : Rosy Brown
        SV_SEL_CURSOR_FG  : Released green
    
        SV_SELECTED_BG    : Maron
        SV_SELECTED_FG      : Released Blue
    
    [#Form: Day Book]
        Add:Bottom Parts : Daybook Total
    
    [Part : Daybook Total]
        Line : Daybook cr
    
    
    [Line : Daybook cr]
        Add : left Field : LineselectedTotal1,LineselectedTotalD,LineselectedTotalC
        Right Field : Daybook dr, Daybook cr
    
    [Field : Daybook dr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBDrAmt
        Invisible          :  ##IsVoucherregister
    [Field : Daybook cr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBcrAmt
        Invisible          :  ##IsVoucherregister
    [#Part: DB Body]
        Total: DSPDBDrAmt,DSP DBCrAmt
    
    [#Line : DSP VchDetail]
        Option        : SelectedLinesJKtSKRTotalOnFocus1
        Option        : SelectedLinesJKtSKRTotalOnFocusd
        Option        : SelectedLinesJKtSKRTotalOnFocusc
    
    [!Line: SelectedLinesJKtSKRTotalOnFocus1] ;Line to Call Selected BillsTotal Function
    
                On        : Focus    : Yes    : Call    : SelectedLinesJKtSKRTotal1
        On        : Focus    : Yes    : Call    : SelectedLinesJKtSKRTotalD
           On        : Focus    : Yes    : Call    : SelectedLinesJKtSKRTotalC
      
    [Function: SelectedLinesJKtSKRTotal1]
    
          
              0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
        0020    : Set    : SelectedLinesJKtSKRTotal1        : ($$CollAmtTotal:SelectedLinesColl1:$Amount)
    
    [Function: SelectedLinesJKtSKRTotalD]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
        0030    : Set    : SelectedLinesJKtSKRTotalD        : ($$CollAmtTotal:SelectedLinesCollD:$Amount)
    
    [Function: SelectedLinesJKtSKRTotalC]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
               0040    : Set    : SelectedLinesJKtSKRTotalC        : ($$CollAmtTotal:SelectedLinesCollC:$Amount)
         
     
    [Field: LineselectedTotal1]
             
                    Use                : Name Field         
                    Set as            : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl1:$Amount) Then $$String:@SelectedTotal1 + $$String:@SelectedTotalVal1 Else ""
                    Width            : 30
                    Align            : Centre
                    SelectedTotal1    : $$LocaleString:"Net Selection : "
                    SelectedTotalVal1: $$String:##SelectedLinesJKtSKRTotal1:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl1:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
        Invisible          :   ##IsLedgerReport
    
    [Field: LineselectedTotalD]
             
                    Use                : Name Field         
                    Set as            : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollD:$Amount) Then $$String:@SelectedTotalD + $$String:@SelectedTotalValD Else ""
                    Width            : 30
                    Align            : Centre
                    SelectedTotalD    : $$LocaleString:"Dr Side : "
                    SelectedTotalValD: $$String:##SelectedLinesJKtSKRTotalD:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollD:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
       Invisible          :   ##IsLedgerReport
    
    [Field: LineselectedTotalC]
             
                    Use                : Name Field         
                    Set as            : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollC:$Amount) Then $$String:@SelectedTotalC + $$String:@SelectedTotalValC Else ""
                    Width            : 30
                    Align            : Centre
                    SelectedTotalC    : $$LocaleString:"Cr Side : "
                    SelectedTotalValC: $$String:##SelectedLinesJKtSKRTotalC:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollC:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
        Invisible          :   ##IsLedgerReport
    
    [System: Variables]
    
            SelectedLinesJKtSKRTotal1 : 0
        SelectedLinesJKtSKRTotalD : 0
        SelectedLinesJKtSKRTotalC : 0
           IsLineselected1     : NO
     
    [Variable: SelectedLinesJKtSKRTotal1]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesJKtSKRTotalD]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesJKtSKRTotalC]
    
            Type    : Amount
           Persistent : Yes
    
    
    [Variable: IsLineselected1]
            Type    : Logical
    
    [Collection:SelectedLinesColl1]
            Data Source    : Report    : Selected
            Fetch        : Amount
            Client Only    : Yes
    [Collection:SelectedLinesCollD]
         Data Source    : Report    : Selected
            Fetch        : Amount
           Fetch        : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
            Fetch        : AllLedgerEntries.BankAllocations.*
            Client Only    : Yes
        Filter : onlydrdb
    [Collection:SelectedLinesCollC]
         Data Source    : Report    : Selected
           Fetch        : Amount
        Fetch        : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
            Fetch        : AllLedgerEntries.BankAllocations.*
            Client Only    : Yes
        Filter : onlycrdb
    [System : Formulae]
          
        onlycrdb : NOT $$isDr:$Amount
    
    [System : Formulae]
            onlydrdb :$$IsDr:$Amount
    
    [Color:Rosy Brown]
        RGB:188,143,143
    
    [Color:MARON]
        RGB:123,17,19
    
    ;;===================================================CODE FOR Group Vouchers=================================================
    
    
    [#Line : DSP VchClAmt]
       
        Add : Left Field :  NetAmtG, LineselectedTotalDrG, LineselectedTotalCrG
    
    [#Line : DSP VchDetail]
        Option : SelectedLinesJKtSKRTotalOnFocusG 
      
    [!Line : SelectedLinesJKtSKRTotalOnFocusG]                    
            On : Focus : Yes : Call : SelectedLinesJKtSKRTotalDrG
        On : Focus : Yes : Call : SelectedLinesJKtSKRTotalCrG
        On        : Focus    : Yes    : Call    : SelectedLinesJKtSKRTotalnetG
    [Function : SelectedLinesJKtSKRTotalDrG]
        0010 : Set : SelectedLinesJKtSKRTotalDrG : ($$CollAmtTotal:SelectedLinesCollDjG:$TotalGrpDrVchAmt)
        0011 : Set : IsLineselectedDrG     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalDrG)
      
    [Function : SelectedLinesJKtSKRTotalCrG]
        0010 : Set : SelectedLinesJKtSKRTotalCrG : ($$CollAmtTotal:SelectedLinesCollCjG:$TotalGrpCrVchAmt)
        0011 : Set : IsLineselectedCrG     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalCrG)   
    
    [Function : SelectedLinesJKtSKRTotalnetG]
       0010 : Set : SelectedLinesJKtSKRTotalnetG : ($$CollAmtTotal:SelectedLinesCollnetG:$TotalGrpVchAmt)
        0011 : Set : IsLineselectednetG     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalnetG)   
    
    [Field : LineselectedTotalDrG]
        Use                : Name Field
        Set as             : if ##IsLineselectedDrG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDjG:$TotalGrpDrVchAmt) Then $$String:@SelectedTotalDrG + $$String:@SelectedTotalValDrG Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedDrG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDjG:$TotalGrpDrVchAmt) Then  "Released Blue" Else "RELEASED GREEN"
       Invisible           :   ##IsLedgerReport
        SelectedTotalDrG    : $$LocaleString:"Dr Total : "
        SelectedTotalValDrG : $$String:##SelectedLinesJKtSKRTotalDrG:"DrCr"
    
    [Field : LineselectedTotalCrG]
        Use                : Name Field
        Set as             : if ##IsLineselectedCrG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCjG:$TotalGrpCrVchAmt) Then $$String:@SelectedTotalCrG + $$String:@SelectedTotalValCrG Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedCrG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCjG:$TotalGrpCrVchAmt) Then "CandyAppleGreen" Else "RELEASED GREEN"
      Invisible           :   ##IsLedgerReport
        SelectedTotalCrG    : $$LocaleString:"Cr Total : "
        SelectedTotalValCrG : $$String:##SelectedLinesJKtSKRTotalCrG:"DrCr"
    
    [Field : NetAmtG]
        Use                 : Name Field
        Set as              :  if ##IsLineselectednetG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollnetG:$TotalGrpVchAmt) Then $$String:@SelectedTotalnetG + $$String:@SelectedTotalValnetG Else ""
        Width               : 30
        Align               : Centre
        Background            : if ##IsLineselectednetG AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollNetG:$TotalGrpVchAmt) Then "Rosy Brown" Else "Released Green"
        Format                : "DrCr"
       Invisible           :   ##IsLedgerReport
        SelectedTotalNetG    : $$LocaleString:"Net Selection : "
        SelectedTotalValNetG : $$String:##SelectedLinesJKtSKRTotalnetG:"DrCr"
    
    [System : Variables]
           SelectedLinesJKtSKRTotalDrG : 0
        SelectedLinesJKtSKRTotalCrG : 0
        SelectedLinesJKtSKRTotalNetG : 0
           
        IsLineselectedDrG     : NO
            IsLineselectedCrG     : NO
        IsLineselectednetG   : NO
      
    [Variable : SelectedLinesJKtSKRTotalDrG]
        Type : Amount
    Persistent : Yes
    [Variable : SelectedLinesJKtSKRTotalCrG]
        Type : Amount
    Persistent : Yes
    [Variable : SelectedLinesJKtSKRTotalnetG]
        Type : Amount
        Persistent : Yes
    [Variable : IsLineselectedDrG]
        Type : Logical
    
    [Variable : IsLineselectedCrG]
        Type : Logical
    
    [Variable : IsLineselectednetG]
        Type : Logical
    
    [Collection : SelectedLinesCollnetG]
            Data Source : Report : Selected
            Fetch       : Name, TotalGrpVchAmt
            Client Only : Yes
    
    [Collection:SelectedLinesCollDjG]
       
        Data Source    : Report    : Selected
           Fetch       : Name, TotalGrpDrVchAmt
        Filter : onlydrG
       
       
    
    
    [Collection:SelectedLinesCollCjG]
       
        Data Source    : Report    : Selected
    
           Fetch       : Name, TotalGrpCrVchAmt
        Client Only    : Yes
        Filter : onlycrG
       
    
    
    [System : Formulae]
          
        onlycrG : NOT $$isDr:$TotalGrpVchAmt
    
    [System : Formulae]
        onlydrG : $$IsDr:$TotalGrpVchAmt
       
      
    [Color: CandyAppleGreen]
    RGB:0,204,153
    [Color: AmericanRose]
    RGB: 255,3,62
    
    ;;===================================================CODE FOR LEDGER=================================================
    
    
    [#Line : DSP VchClAmt]
       
        Add : Left Field :  NetAmt, LineselectedTotalDr, LineselectedTotalCr
    
    [#Line : DSP VchDetail]
        Option : SelectedLinesJKtSKRTotalOnFocus : ##IsLedgerReport
      
    [!Line : SelectedLinesJKtSKRTotalOnFocus]                     ;; Line to Call Selected BillsTotal Function
            On : Focus : Yes : Call : SelectedLinesJKtSKRTotalDr
        On : Focus : Yes : Call : SelectedLinesJKtSKRTotalCr
        On        : Focus    : Yes    : Call    : SelectedLinesJKtSKRTotalnet
    [Function : SelectedLinesJKtSKRTotalDr]
        0010 : Set : SelectedLinesJKtSKRTotalDr : ($$CollAmtTotal:SelectedLinesCollDj:$TotalLedDrVchAmt)
        0011 : Set : IsLineselectedDr     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalDr)
      
    [Function : SelectedLinesJKtSKRTotalCr]
        0010 : Set : SelectedLinesJKtSKRTotalCr : ($$CollAmtTotal:SelectedLinesCollCj:$TotalLedCrVchAmt)
        0011 : Set : IsLineselectedCr     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalCr)   
    
    [Function : SelectedLinesJKtSKRTotalnet]
       0010 : Set : SelectedLinesJKtSKRTotalnet : ($$CollAmtTotal:SelectedLinesCollnet:$TotalLedVchAmt)
        0011 : Set : IsLineselectednet     : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotalnet)   
    
    [Field : LineselectedTotalDr]
        Use                : Name Field
        Set as             : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDj:$TotalLedDrVchAmt) Then $$String:@SelectedTotalDr + $$String:@SelectedTotalValDr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDj:$TotalLedDrVchAmt) Then  "Released Blue" Else "RELEASED GREEN"
        Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalDr    : $$LocaleString:"Dr Total : "
        SelectedTotalValDr : $$String:##SelectedLinesJKtSKRTotalDr:"DrCr"
    
    [Field : LineselectedTotalCr]
        Use                : Name Field
        Set as             : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCj:$TotalLedCrVchAmt) Then $$String:@SelectedTotalCr + $$String:@SelectedTotalValCr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCj:$TotalLedcrVchAmt) Then "CandyAppleGreen" Else "RELEASED GREEN"
       Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalCr    : $$LocaleString:"Cr Total : "
        SelectedTotalValCr : $$String:##SelectedLinesJKtSKRTotalCr:"DrCr"
    
    [Field : NetAmt]
        Use                 : Name Field
        Set as              :  if ##IsLineselectednet AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollnet:$TotalLedVchAmt) Then $$String:@SelectedTotalnet + $$String:@SelectedTotalValnet Else ""
        Width               : 30
        Align               : Centre
        Background            : if ##IsLineselectednet AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollNet:$TotalLedVchAmt) Then "Rosy Brown" Else "Released Green"
        Format                : "DrCr"
        Invisible           : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalNet    : $$LocaleString:"Net Selection : "
        SelectedTotalValNet : $$String:##SelectedLinesJKtSKRTotalnet:"DrCr"
    
    [System : Variables]
           SelectedLinesJKtSKRTotalDr : 0
        SelectedLinesJKtSKRTotalCr : 0
        SelectedLinesJKtSKRTotalNet : 0
           
        IsLineselectedDr     : NO
            IsLineselectedCr     : NO
        IsLineselectednet   : NO
      
    [Variable : SelectedLinesJKtSKRTotalDr]
        Type : Amount
    Persistent : Yes
    [Variable : SelectedLinesJKtSKRTotalCr]
        Type : Amount
    Persistent : Yes
    [Variable : SelectedLinesJKtSKRTotalnet]
        Type : Amount
        Persistent : Yes
    [Variable : IsLineselectedDr]
        Type : Logical
    
    [Variable : IsLineselectedCr]
        Type : Logical
    
    [Variable : IsLineselectednet]
        Type : Logical
    
    [Collection : SelectedLinesCollnet]
        Data Source : Report : Selected
        Fetch       : Name, TotalLedVchAmt
        Client Only : Yes
    
    [Collection:SelectedLinesCollDj]
         Data Source    : Report    : Selected
      Fetch       : Name,TotalLedDrVchAmt
            Client Only    : Yes
        Filter : onlydr
    [Collection:SelectedLinesCollCj]
         Data Source    : Report    : Selected
        Fetch       : Name, TotalLedCrVchAmt
            Client Only    : Yes
        Filter : onlycr
    [System : Formulae]
          
        onlycr : NOT $$isDr:$TotalLedVchAmt
    
    [System : Formulae]
            onlydr :$$IsDr:$TotalLedVchAmt
    
    
    ;;==============================================Code For Group Ledgers==========================================
    
    
    
    [#Form: Group Summary]
        Add : Bottom Part : At End : Selected Total for Group Ledgers
        Add: Key: BottomToolBarBtn12
    
    [Part : Selected Total for Group Ledgers]
            Line : Selected Total for Group Ledgers
    
    [Line : Selected Total for Group Ledgers]
            Add : left Field :JKTSKRNettAmt,JKTSKRLineselectedTotalDebit,JKTSKRLineselectedTotalCredit
    
    [#Line: DSP AccLine]
            Option : JKTSKRSelectedLinesTotalOnFocus
      
    [!Line : JKTSKRSelectedLinesTotalOnFocus]                     ;; Line to Call Selected BillsTotal Function
        On : Focus : Yes : Call : JKTSKRSelectedLinesTotalDebit
        On : Focus : Yes : Call : JKTSKRSelectedLinesTotalCredit
        On : Focus : Yes : Call : JKTSKRSelectedLinesTotalNett
    
    [Function : JKTSKRSelectedLinesTotalDebit]
        0010 : Set : JKTSKRSelectedLinesTotalDebit : ($$CollAmtTotal:JKTSKRSelectedLinesCollDebit:$Closingbalance)
        0011 : Set : JKTSKRIsLineselectedDebit     : (NOT $$IsEmpty:##JKTSKRSelectedLinesTotalDebit)
      
    [Function : JKTSKRSelectedLinesTotalCredit]
        0010 : Set : JKTSKRSelectedLinesTotalCredit : ($$CollAmtTotal:JKTSKRSelectedLinesCollCredit:$Closingbalance)
        0011 : Set : JKTSKRIsLineselectedCredit     : (NOT $$IsEmpty:##JKTSKRSelectedLinesTotalCredit)
    
    [Function : JKTSKRSelectedLinesTotalNett]
        0010 : Set : JKTSKRSelectedLinesTotalNett : ($$CollAmtTotal:JKTSKRSelectedLinesCollNett:$Closingbalance)
        0011 : Set : JKTSKRIsLineselectedNett     : (NOT $$IsEmpty:##JKTSKRSelectedLinesTotalNett)   
      
    [Field : JKTSKRLineselectedTotalDebit]
        Use                : Name Field
        Set as             : if ##JKTSKRIsLineselectedDebit AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollDebit:$Closingbalance) Then $$String:@SelectedTotalDebit + $$String:@SelectedTotalValDebit Else ""
        Width              : 30
        Align              : Centre
         Background           : if ##JKTSKRIsLineselectedDebit AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollDebit:$Closingbalance) Then "Released Blue" Else @@SV_Groupsummary
       ; Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalDebit    : $$LocaleString:"Dr Total : "
        SelectedTotalValDebit : $$String:##JKTSKRSelectedLinesTotalDebit:"DrCr"
    
    [Field : JKTSKRLineselectedTotalCredit]
        Use                : Name Field
        Set as             : if ##JKTSKRIsLineselectedCredit AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollCredit:$Closingbalance) Then $$String:@SelectedTotalCredit + $$String:@SelectedTotalValCredit Else ""
        Width              : 30
        Align              : Centre
       Background           : if ##JKTSKRIsLineselectedCredit AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollCredit:$Closingbalance) Then "CandyAppleGreen" Else @@SV_Groupsummary
        ;Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalCredit    : $$LocaleString:"Cr Total : "
        SelectedTotalValCredit : $$String:##JKTSKRSelectedLinesTotalCredit:"DrCr"
    
    [Field : JKTSKRNettAmt]
        Use                 : Name Field
        Set as              :  if ##JKTSKRIsLineselectedNett AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollNett:$Closingbalance) Then $$String:@SelectedTotalNett + $$String:@SelectedTotalValNett Else ""
        Width               : 30
        Align               : Centre
        Background            : if ##JKTSKRIsLineselectedNett AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:JKTSKRSelectedLinesCollNett:$Closingbalance) Then "Rosy Brown" Else @@SV_Groupsummary
        Format                : "DrCr"
        ;Invisible           : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalNett   : $$LocaleString:"Net Selection : "
        SelectedTotalValNett : $$String:##JKTSKRSelectedLinesTotalNett:"DrCr"
    
    [System : Variables]
            JKTSKRSelectedLinesTotalDebit : 0
        JKTSKRSelectedLinesTotalCredit : 0
        JKTSKRSelectedLinesTotalNett : 0
            JKTSKRIsLineselectedDebit     : NO
            JKTSKRIsLineselectedCredit     : NO
        JKTSKRIsLineselectedNett     : NO
      
    [Variable : JKTSKRSelectedLinesTotalDebit]
        Type : Amount
    
    [Variable : JKTSKRSelectedLinesTotalCredit]
        Type : Amount
      
    [Variable : JKTSKRSelectedLinesTotalNett]
        Type : Amount
    
    [Variable : JKTSKRIsLineselectedDebit]
        Type : Logical
    
    [Variable : JKTSKRIsLineselectedCredit]
        Type : Logical
      
    [Variable : JKTSKRIsLineselectedNett]
        Type : Logical
    
    [System : Formulae]
          
        OnlyCrside : NOT $$isDr:$Closingbalance
        Onlydrside :$$IsDr:$Closingbalance
    
          
    
    [Collection : JKTSKRSelectedLinesCollDebit]
           Data Source : Report : Selected
           Fetch       : Name,Closingbalance
           Client Only : Yes
        Filter : Onlydrside
    [Collection : JKTSKRSelectedLinesCollCredit]
           Data Source : Report : Selected
           Fetch       : Name,Closingbalance
           Client Only : Yes
        Filter : OnlyCrside
    [Collection : JKTSKRSelectedLinesCollNEtt]
           Data Source : Report : Selected
           Fetch       : Name,Closingbalance
           Client Only : Yes
    
    
    [#Collection: Daybook Vouchers of Company]
        Fetch        : Allledgerentries.*,*.*
    
    [#Collection : Filtered Vouchers of Company ]
        Fetch        : Allledgerentries.*,*.*
    
    [#Collection : Specific Vouchers of Company]
        Fetch        : Allledgerentries.*,*.*
    
    [#Collection: Vouchers of Ledger]
        Fetch        : Allledgerentries.*,*.*
    
    [#Collection: Vouchers Of Group]
        Fetch        : Allledgerentries.*,*.*
    
     


  13. Shivashankar

    Shivashankar New Member


    Thanks for the code sir.:)
     


  14. SHAHCOAL PVTLTD

    SHAHCOAL PVTLTD New Member


    Thank you Very Much for this lovely code.
     


  15. mukeshb

    mukeshb Member


    We are getting "Daybook, Daybook dr, Daybook cr,Duplicate Description already define in other.
    if i am adding like - Daybook 1 cr, then Daybook total is not working .
     


  16. Jay kumar tailor

    Jay kumar tailor Active Member


    Try Last Code Posted Here
     


  17. mukeshb

    mukeshb Member


    Dear Jay,

    It is working well,
    but showing Duplicate description , can u tell me the solution for Duplicate Description.
     


  18. anjan banik

    anjan banik New Member


    add #
     


  19. anjan banik

    anjan banik New Member


    grate code thank u....
    keep posting....
     


  20. lumos

    lumos Member


    Made few minor improvements to the Day Book Code.
    Code:
    ;;===================================================CODE FOR DayBook=================================================
    
    [#System: Formula]
      SV_SEL_CURSOR_BG  : Rosy Brown
      SV_SEL_CURSOR_FG  : Released green
    
      SV_SELECTED_BG  : Maron
      SV_SELECTED_FG  : Released Blue
    
    [#Form: Day Book]
      Add:Bottom Parts : Daybook Total
    
    [Part : Daybook Total]
      Line : Daybook Total
       Border: Column Titles
    
    [Line : Daybook Total]
      ;Add : left Field : LineselectDDTotalDr,LineselectDDTotalCr,LineselectDDTotalNet
      Right Field : LineselectDDTotalNet,TotalDD,Daybook dr, Daybook cr
       
    [Field : TotalDD]
       Use: Short Name Field
       Set as: if @@InselectMode Then "Selected Lines Total :" Else "Total :"
         
    [Field : Daybook dr]
      Use : Name Field
       Set as  : if @@InselectMode Then $$String:@SelectedTotalValD Else $$String:@totaldr + " Dr"
      Width  : 12
      Align  : Centre
      Background  : if @@InselectMode Then "Rosy Brown"  Else @@SV_DAYBOOK
      Invisible  :  ##IsVoucherregister
       Totaldr : $$Total:DSPDBDrAmt
      SelectedTotalValD: $$String:##SelectedLinesJKtSKRTotalD:"DrCr"
       
    [Field : Daybook cr]
      Use : Name Field
      Set as  : if @@InselectMode Then $$String:@SelectedTotalValC Else $$String:@totalcr + " Cr"
      Width  : 12
      Align  : Centre
       TotalCr : $$Total:DSPDBCrAmt
      SelectedTotalValC  : $$String:##SelectedLinesJKtSKRTotalC:"DrCr"
      Background  : if @@InselectMode Then "Rosy Brown"  Else @@SV_DAYBOOK
      Invisible  :  ##IsVoucherregister
    
    [Field: LineselectDDTotalNet]
       
      Use  : Name Field   
      Set as  : if @@InselectMode Then $$String:@SelectedTotal1 + $$String:@SelectedTotalVal1 Else ""
      Width  : 18
      Align  : Centre
      SelectedTotal1  : $$LocaleString:"Net : "
      SelectedTotalVal1: $$String:##SelectedLinesJKtSKRTotal1:"DrCr"
      Background  : if @@InselectMode Then "Rosy Brown"  Else @@SV_DAYBOOK
      Invisible  :  ##IsLedgerReport
    
       
    [#Part: DB Body]
      Total: DSPDBDrAmt,DSP DBCrAmt
    
    [#Line : DSP VchDetail]
      Option  : SelectedLinesJKtSKRTotalOnFocus1
      Option  : SelectedLinesJKtSKRTotalOnFocusd
      Option  : SelectedLinesJKtSKRTotalOnFocusc
    
    [!Line: SelectedLinesJKtSKRTotalOnFocus1] ;Line to Call Selected BillsTotal Function
    
      On  : Focus  : Yes  : Call  : SelectedLinesJKtSKRTotal1
           On  : Focus  : Yes  : Call  : SelectedLinesJKtSKRTotalD
           On  : Focus  : Yes  : Call  : SelectedLinesJKtSKRTotalC
     
    [Function: SelectedLinesJKtSKRTotal1]
    
       
      0010  : Set  : IsLineselected1  : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
          0020  : Set  : SelectedLinesJKtSKRTotal1  : ($$CollAmtTotal:SelectedLinesColl1:$Amount)
    
    [Function: SelectedLinesJKtSKRTotalD]
    
      0010  : Set  : IsLineselected1  : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
             0030  : Set  : SelectedLinesJKtSKRTotalD  : ($$CollAmtTotal:SelectedLinesCollD:$Amount)
    
    [Function: SelectedLinesJKtSKRTotalC]
    
      0010  : Set  : IsLineselected1  : (NOT $$IsEmpty:##SelectedLinesJKtSKRTotal1)
             0040  : Set  : SelectedLinesJKtSKRTotalC  : ($$CollAmtTotal:SelectedLinesCollC:$Amount)
       
    
    [System: Variables]
    
      SelectedLinesJKtSKRTotal1 : 0
      SelectedLinesJKtSKRTotalD : 0
      SelectedLinesJKtSKRTotalC : 0
      IsLineselected1  : NO
    [Variable: SelectedLinesJKtSKRTotal1]
    
      Type  : Amount
      Persistent : Yes
    
    [Variable: SelectedLinesJKtSKRTotalD]
    
      Type  : Amount
      Persistent : Yes
    
    [Variable: SelectedLinesJKtSKRTotalC]
    
      Type  : Amount
      Persistent : Yes
    
    
    [Variable: IsLineselected1]
      Type  : Logical
    
    [Collection:SelectedLinesColl1]
      Data Source  : Report  : Selected
      Fetch  : Amount
      Client Only  : Yes
    [Collection:SelectedLinesCollD]
      Data Source  : Report  : Selected
      Fetch  : Amount
      Fetch  : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
      Fetch  : AllLedgerEntries.BankAllocations.*
      Client Only  : Yes
      Filter : onlydrdb
    [Collection:SelectedLinesCollC]
      Data Source  : Report  : Selected
      Fetch  : Amount
      Fetch  : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
      Fetch  : AllLedgerEntries.BankAllocations.*
      Client Only  : Yes
      Filter : onlycrdb
    [System : Formulae]
       
      onlycrdb : NOT $$isDr:$Amount
    
    [System : Formulae]
      onlydrdb :$$IsDr:$Amount
    
    [System : Formulae]   
       
     InselectMode:##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl1:$Amount)
    [Color:Rosy Brown]
      RGB:188,143,143
    
    [Color:MARON]
      RGB:123,17,19
    
     
    Last edited: Aug 24, 2019



  21. Nice Sir, Very Trendy code and useful
     


Share This Page