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. dont work pls attach screen shot also
     


  2. Bipin Damania

    Bipin Damania Member


    Jayji

    I am getting only Black colored field box on left bottom of the form and not any amount in if I go from Statistic to voucher entry and not in daybook.
    Please reply.

    Thank you.
     


  3. Jay kumar tailor

    Jay kumar tailor Active Member


    Please remove colours then revert .
     
    Last edited: Jun 21, 2019


  4. Bipin Damania

    Bipin Damania Member


    Jayji

    Changed Colour.
    Now I get the Total of Selected Lines for Contra, Journal, Payment & Receipt from Statistic and not in DayBook and also not for Purchase & Sales.

    Thank you...
     


  5. Jay kumar tailor

    Jay kumar tailor Active Member


    Some Changes Made...
    Working Well On My System.
    Please Check.......

    Code:
    [#System: Formula]
        SV_SEL_CURSOR_BG  : Rosy Brown
        SV_SEL_CURSOR_FG  : Released green
    
        SV_SELECTED_BG    : Maron
        SV_SELECTED_FG      : Released Blue
    
    [#Line : DSP VchClAmt]
       
        Add : Left Field : RBCLineselectedTotalDr, RBCLineselectedTotalCr, RBCNetAmt
    
    [#Line : DSP VchDetail]
        Option : RBCSelectedLinesTotalOnFocus : ##IsLedgerReport
      
    [!Line : RBCSelectedLinesTotalOnFocus]                     ;; Line to Call Selected BillsTotal Function
        On : Focus : Yes : Call : RBCSelectedLinesTotalDr
        On : Focus : Yes : Call : RBCSelectedLinesTotalCr
    
    [Function : RBCSelectedLinesTotalDr]
        0010 : Set : RBCSelectedLinesTotalDr : ($$CollAmtTotal:RBCSelectedLinesColl:$TotalLedDrVchAmt)
        0011 : Set : RBCIsLineselectedDr     : (NOT $$IsEmpty:##RBCSelectedLinesTotalDr)
      
    [Function : RBCSelectedLinesTotalCr]
        0010 : Set : RBCSelectedLinesTotalCr : ($$CollAmtTotal:RBCSelectedLinesColl:$TotalLedCrVchAmt)
        0011 : Set : RBCIsLineselectedCr     : (NOT $$IsEmpty:##RBCSelectedLinesTotalCr)   
      
    [Field : RBCLineselectedTotalDr]
        Use                : Name Field
        Set as             : if ##RBCIsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:RBCSelectedLinesColl:$TotalLedDrVchAmt) Then $$String:@SelectedTotalDr + $$String:@SelectedTotalValDr Else ""
        Width              : 30
        Align              : Centre
        Background           : Released Blue
        Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalDr    : $$LocaleString:"Dr Total : "
        SelectedTotalValDr : $$String:##RBCSelectedLinesTotalDr:"DrCr"
    
    [Field : RBCLineselectedTotalCr]
        Use                : Name Field
        Set as             : if ##RBCIsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:RBCSelectedLinesColl:$TotalLedCrVchAmt) Then $$String:@SelectedTotalCr + $$String:@SelectedTotalValCr Else ""
        Width              : 30
        Align              : Centre
        Background           : Rosy Brown
        Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalCr    : $$LocaleString:"Cr Total : "
        SelectedTotalValCr : $$String:##RBCSelectedLinesTotalCr:"DrCr"
    
    [Field : RBCNetAmt]
        Use                 : Name Field
        Set as              : if ##RBCIsLineselectedDr or ##RBCIsLineselectedCr then $$String:@SelectedTotalNet + $$String:@SelectedTotalValNet else ""
        Width               : 30
        Align               : Centre
        Background            : Grey
        Format                : "DrCr"
        Invisible           : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalNet    : $$LocaleString:"Net Selection : "
        SelectedTotalValNet : if ##RBCIsLineselectedDr then $$String:(##RBCSelectedLinesTotalDr-##RBCSelectedLinesTotalCr):"DrCr" +
                              else $$String:(##RBCSelectedLinesTotalCr-##RBCSelectedLinesTotalDr):"DrCr"
    
    [System : Variables]
        RBCSelectedLinesTotalDr : 0
        RBCSelectedLinesTotalCr : 0
        RBCIsLineselectedDr     : NO
        RBCIsLineselectedCr     : NO
      
    [Variable : RBCSelectedLinesTotalDr]
        Type : Amount
    
    [Variable : RBCSelectedLinesTotalCr]
        Type : Amount
      
    [Variable : RBCIsLineselectedDr]
        Type : Logical
    
    [Variable : RBCIsLineselectedCr]
        Type : Logical
    
    [Collection : RBCSelectedLinesColl]
        Data Source : Report : Selected
        Fetch       : Name, TotalLedCrVchAmt, TotalLedDrVchAmt, TotalLedVchAmt
        Client Only : Yes
    
    ;;=====================================================For Daybook===========================================
    
    [#Form: Normal Day Book]
        Add:Bottom Parts : Daybook Total
    
    [Part : Daybook Total]
        Line : Daybook cr
    
    [Line : Daybook cr]
        Field : LineselectedTotal1
        Right Field : Daybook dr, Daybook cr
    
    [Field : Daybook dr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBDrAmt
    
    [Field : Daybook cr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBcrAmt
    
    [#Part: DB Body]
        Total: DSP DBCrAmt,DSPDBDrAmt
    
    [#Line : DSP VchDetail]
        Option        : SelectedLinesTotalOnFocus1
       ;[#Line: DSP VchClAmt]
            ;Field : LineselectedTotal1
    [!Line: SelectedLinesTotalOnFocus1] ;Line to Call Selected BillsTotal Function
    
            On        : Focus    : Yes    : Call    : SelectedLinesTotal1
       
    [Function: SelectedLinesTotal1]
    
       0010    : Set    : SelectedLinesTotal1    : ($$CollAmtTotal:SelectedLinesColl1:$Amount)
       0012    : Set    : IsLineselected1         : (NOT $$IsEmpty:##SelectedLinesTotal1)
      
    [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:"Entries Selected for : "
                    SelectedTotalVal1: $$String:##SelectedLinesTotal1:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl1:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
        Invisible          :   ##IsLedgerReport
    
    [System: Variables]
    
            SelectedLinesTotal1 : 0
           IsLineselected1     : NO
      
    [Variable: SelectedLinesTotal1]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: IsLineselected1]
            Type    : Logical
    
    [Collection:SelectedLinesColl1]
            Data Source    : Report    : Selected
            Fetch        : Amount
            Client Only    : Yes
    
    
    [#System: Formula]
        SV_SEL_CURSOR_BG  : Rosy Brown
        SV_SEL_CURSOR_FG  : Released green
    
        SV_SELECTED_BG    : Maron
        SV_SELECTED_FG      : Released Blue
    [Color:Rosy Brown]
        RGB:188,143,143
    
    [Color:MARON]
        RGB:123,17,19
    
     


  6. Vikram Bhat

    Vikram Bhat Member


    Dear
    Dear Jay Kumar
    its Working in Ledger Fine But in daybook Not shown Please Check This One
     
    Shivashankar likes this.


  7. Shivashankar

    Shivashankar New Member


    sir, this code not working for day book
     


  8. Jay kumar tailor

    Jay kumar tailor Active Member


    Hi All
    Jay Here
    Sorry For Inconvenience
    Issue Resolved Now.

    Try This..............
    And Enjoy.........

    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
    
    [Field : Daybook cr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBcrAmt
    
    [#Part: DB Body]
        Total: DSPDBDrAmt,DSP DBCrAmt
    
    [#Line : DSP VchDetail]
        Option        : SelectedLinesTotalOnFocus1
        Option        : SelectedLinesTotalOnFocusd
        Option        : SelectedLinesTotalOnFocusc
    
    [!Line: SelectedLinesTotalOnFocus1] ;Line to Call Selected BillsTotal Function
    
                On        : Focus    : Yes    : Call    : SelectedLinesTotal1
        On        : Focus    : Yes    : Call    : SelectedLinesTotalD
           On        : Focus    : Yes    : Call    : SelectedLinesTotalC
      
    [Function: SelectedLinesTotal1]
    
          
              0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
        0020    : Set    : SelectedLinesTotal1        : ($$CollAmtTotal:SelectedLinesColl1:$Amount)
    
    [Function: SelectedLinesTotalD]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
        0030    : Set    : SelectedLinesTotalD        : ($$CollAmtTotal:SelectedLinesCollD:$Amount)
    
    [Function: SelectedLinesTotalC]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
               0040    : Set    : SelectedLinesTotalC        : ($$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:##SelectedLinesTotal1:"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:##SelectedLinesTotalD:"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:##SelectedLinesTotalC:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollC:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
        Invisible          :   ##IsLedgerReport
    
    [System: Variables]
    
            SelectedLinesTotal1 : 0
        SelectedLinesTotalD : 0
        SelectedLinesTotalC : 0
           IsLineselected1     : NO
     
    [Variable: SelectedLinesTotal1]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesTotalD]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesTotalC]
    
            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 : onlydr
    [Collection:SelectedLinesCollC]
         Data Source    : Report    : Selected
           Fetch        : Amount
        Fetch        : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
            Fetch        : AllLedgerEntries.BankAllocations.*
            Client Only    : Yes
        Filter : onlycr
    [System : Formulae]
          
        onlycr : NOT $$isDr:$Amount
    
    [System : Formulae]
            onlydr :$$IsDr:$Amount
    
    [Color:Rosy Brown]
        RGB:188,143,143
    
    [Color:MARON]
        RGB:123,17,19
    
    ;;===================================================CODE FOR LEDGER=================================================
    
    
    
    [#Line : DSP VchClAmt]
       
        Add : Left Field :  NetAmt, LineselectedTotalDr, LineselectedTotalCr
    
    [#Line : DSP VchDetail]
        Option : SelectedLinesTotalOnFocus : ##IsLedgerReport
      
    [!Line : SelectedLinesTotalOnFocus]                     ;; Line to Call Selected BillsTotal Function
        On : Focus : Yes : Call : SelectedLinesTotalDr
        On : Focus : Yes : Call : SelectedLinesTotalCr
    
    [Function : SelectedLinesTotalDr]
        0010 : Set : SelectedLinesTotalDr : ($$CollAmtTotal:SelectedLinesColl:$TotalLedDrVchAmt)
        0011 : Set : IsLineselectedDr     : (NOT $$IsEmpty:##SelectedLinesTotalDr)
      
    [Function : SelectedLinesTotalCr]
        0010 : Set : SelectedLinesTotalCr : ($$CollAmtTotal:SelectedLinesColl:$TotalLedCrVchAmt)
        0011 : Set : IsLineselectedCr     : (NOT $$IsEmpty:##SelectedLinesTotalCr)   
      
    [Field : LineselectedTotalDr]
        Use                : Name Field
        Set as             : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl:$TotalLedDrVchAmt) Then $$String:@SelectedTotalDr + $$String:@SelectedTotalValDr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl:$TotalLedDrVchAmt) Then  "Released Blue" Else "RELEASED GREEN"
        Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalDr    : $$LocaleString:"Dr Total : "
        SelectedTotalValDr : $$String:##SelectedLinesTotalDr:"DrCr"
    
    [Field : LineselectedTotalCr]
        Use                : Name Field
        Set as             : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl:$TotalLedCrVchAmt) Then $$String:@SelectedTotalCr + $$String:@SelectedTotalValCr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesColl:$TotalLedCrVchAmt) Then "CandyAppleGreen" Else "RELEASED GREEN"
        Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalCr    : $$LocaleString:"Cr Total : "
        SelectedTotalValCr : $$String:##SelectedLinesTotalCr:"DrCr"
    
    [Field : NetAmt]
        Use                 : Name Field
        Set as              : if ##IsLineselectedDr or ##IsLineselectedCr then $$String:@SelectedTotalNet + $$String:@SelectedTotalValNet else ""
        Width               : 30
        Align               : Centre
        Background            :  if ##IsLineselectedDr or ##IsLineselectedCr then "Rosy Brown" Else "RELEASED GREEN"
        Format                : "DrCr"
        Invisible           : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalNet    : $$LocaleString:"Net Selection : "
        SelectedTotalValNet : if ##IsLineselectedDr then $$String:(##SelectedLinesTotalDr-##SelectedLinesTotalCr):"DrCr" +
                              else $$String:(##SelectedLinesTotalCr-##SelectedLinesTotalDr):"DrCr"
    
    [System : Variables]
        SelectedLinesTotalDr : 0
        SelectedLinesTotalCr : 0
        IsLineselectedDr     : NO
        IsLineselectedCr     : NO
      
    [Variable : SelectedLinesTotalDr]
        Type : Amount
    
    [Variable : SelectedLinesTotalCr]
        Type : Amount
      
    [Variable : IsLineselectedDr]
        Type : Logical
    
    [Variable : IsLineselectedCr]
        Type : Logical
    
    [Collection : SelectedLinesColl]
        Data Source : Report : Selected
        Fetch       : Name, TotalLedCrVchAmt, TotalLedDrVchAmt, TotalLedVchAmt
        Client Only : Yes
    
    [Color: CandyAppleGreen]
    RGB:0,204,153
    [Color: AmericanRose]
    RGB: 255,3,62
    
    
    
    [#Collection: Daybook Vouchers of Company]
        Fetch       : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription
    
    [#Collection : Specific Vouchers of Company]
    
    Fetch       : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription
    
    [#Collection: Vouchers Of Group]
    Fetch       : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription
     
    mukeshb, Frz and Rohit Khedar like this.


  9. Shivashankar

    Shivashankar New Member


    Thank you so much sir. It's working
     


  10. Rohit Khedar

    Rohit Khedar Member


    @Jay kumar Ji :p Hard working people do not lose . Really are you great Thanks.:p:p:p:p:p:p:D
     


  11. Vikram Bhat

    Vikram Bhat Member


    Its working Fine Thank You Sir
     


  12. Jay kumar tailor

    Jay kumar tailor Active Member


    Now Need Expert Advice....

    Added Group vouchers.
    Everything Is ok.
    But Taking journal Voucher Value Negative Side In Group Voucher report

    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: Normal Day Book]
        Add:Bottom Parts : Daybook Total
    
    [Part : Daybook Total]
        Line : Daybook cr
    
    
    [Line : Daybook cr]
        Field : LineselectedTotal1,LineselectedTotalD,LineselectedTotalC
        Right Field : Daybook dr, Daybook cr
    
    [Field : Daybook dr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBDrAmt
    
    [Field : Daybook cr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBcrAmt
    
    [#Part: DB Body]
        Total: DSPDBDrAmt,DSP DBCrAmt
    
    [#Line : DSP VchDetail]
        Option        : SelectedLinesTotalOnFocus1
        Option        : SelectedLinesTotalOnFocusd
        Option        : SelectedLinesTotalOnFocusc
    
    [!Line: SelectedLinesTotalOnFocus1] ;Line to Call Selected BillsTotal Function
    
                On        : Focus    : Yes    : Call    : SelectedLinesTotal1
        On        : Focus    : Yes    : Call    : SelectedLinesTotalD
           On        : Focus    : Yes    : Call    : SelectedLinesTotalC
      
    [Function: SelectedLinesTotal1]
    
          
              0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
        0020    : Set    : SelectedLinesTotal1        : ($$CollAmtTotal:SelectedLinesColl1:$Amount)
    
    [Function: SelectedLinesTotalD]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
        0030    : Set    : SelectedLinesTotalD        : ($$CollAmtTotal:SelectedLinesCollD:$Amount)
    
    [Function: SelectedLinesTotalC]
    
                    0010    : Set    : IsLineselected1             : (NOT $$IsEmpty:##SelectedLinesTotal1)
               0040    : Set    : SelectedLinesTotalC        : ($$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:##SelectedLinesTotal1:"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:##SelectedLinesTotalD:"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:##SelectedLinesTotalC:"DrCr"
        Background           : if ##IsLineselected1 AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollC:$Amount) Then "Rosy Brown"  Else @@SV_DAYBOOK
        Invisible          :   ##IsLedgerReport
    
    [System: Variables]
    
            SelectedLinesTotal1 : 0
        SelectedLinesTotalD : 0
        SelectedLinesTotalC : 0
           IsLineselected1     : NO
     
    [Variable: SelectedLinesTotal1]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesTotalD]
    
            Type    : Amount
           Persistent : Yes
    
    [Variable: SelectedLinesTotalC]
    
            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 : onlydr
    [Collection:SelectedLinesCollC]
         Data Source    : Report    : Selected
           Fetch        : Amount
        Fetch        : AllLedgerEntries.LedgerName, AllLedgerEntries.Amount
            Fetch        : AllLedgerEntries.BankAllocations.*
            Client Only    : Yes
        Filter : onlycr
    [System : Formulae]
          
        onlycr : NOT $$isDr:$Amount
    
    [System : Formulae]
            onlydr :$$IsDr:$Amount
    
    [Color:Rosy Brown]
        RGB:188,143,143
    
    [Color:MARON]
        RGB:123,17,19
    
    ;;===================================================CODE FOR LEDGER=================================================
    
    
    [#Line : DSP VchClAmt]
       
        Add : Left Field :  NetAmt, LineselectedTotalDr, LineselectedTotalCr
    
    [#Line : DSP VchDetail]
        Option : SelectedLinesTotalOnFocus ;;: ##IsLedgerReport
      
    [!Line : SelectedLinesTotalOnFocus]                     ;; Line to Call Selected BillsTotal Function
            On : Focus : Yes : Call : SelectedLinesTotalDr
        On : Focus : Yes : Call : SelectedLinesTotalCr
        On        : Focus    : Yes    : Call    : SelectedLinesTotalnet
    [Function : SelectedLinesTotalDr]
        0010 : Set : SelectedLinesTotalDr : ($$CollAmtTotal:SelectedLinesCollDj:$Amount)
        0011 : Set : IsLineselectedDr     : (NOT $$IsEmpty:##SelectedLinesTotalDr)
      
    [Function : SelectedLinesTotalCr]
        0010 : Set : SelectedLinesTotalCr : ($$CollAmtTotal:SelectedLinesCollCj:$Amount)
        0011 : Set : IsLineselectedCr     : (NOT $$IsEmpty:##SelectedLinesTotalCr)   
    
    [Function : SelectedLinesTotalnet]
       0010 : Set : SelectedLinesTotalnet : ($$CollAmtTotal:SelectedLinesCollnet:$Amount)
        0011 : Set : IsLineselectednet     : (NOT $$IsEmpty:##SelectedLinesTotalnet)   
    
    [Field : LineselectedTotalDr]
        Use                : Name Field
        Set as             : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDj:$amount) Then $$String:@SelectedTotalDr + $$String:@SelectedTotalValDr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedDr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollDj:$Amount) Then  "Released Blue" Else "RELEASED GREEN"
        ;Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalDr    : $$LocaleString:"Dr Total : "
        SelectedTotalValDr : $$String:##SelectedLinesTotalDr:"DrCr"
    
    [Field : LineselectedTotalCr]
        Use                : Name Field
        Set as             : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCj:$Amount) Then $$String:@SelectedTotalCr + $$String:@SelectedTotalValCr Else ""
        Width              : 30
        Align              : Centre
        Background           : if ##IsLineselectedCr AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollCj:$Amount) Then "CandyAppleGreen" Else "RELEASED GREEN"
       ; Invisible          : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalCr    : $$LocaleString:"Cr Total : "
        SelectedTotalValCr : $$String:##SelectedLinesTotalCr:"DrCr"
    
    [Field : NetAmt]
        Use                 : Name Field
        Set as              :  if ##IsLineselectednet AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollnet:$Amount) Then $$String:@SelectedTotalnet + $$String:@SelectedTotalValnet Else ""
        Width               : 30
        Align               : Centre
        Background            : if ##IsLineselectednet AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:SelectedLinesCollNet:$Amount) Then "Rosy Brown" Else "Released Green"
        Format                : "DrCr"
        ;Invisible           : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
        SelectedTotalNet    : $$LocaleString:"Net Selection : "
        SelectedTotalValNet : $$String:##SelectedLinesTotalnet:"DrCr"
    
    [System : Variables]
           SelectedLinesTotalDr : 0
        SelectedLinesTotalCr : 0
        SelectedLinesTotalNet : 0
           
        IsLineselectedDr     : NO
            IsLineselectedCr     : NO
        IsLineselectednet   : NO
      
    [Variable : SelectedLinesTotalDr]
        Type : Amount
        persistent : yes
    [Variable : SelectedLinesTotalCr]
        Type : Amount
    
    [Variable : SelectedLinesTotalnet]
        Type : Amount
      
    [Variable : IsLineselectedDr]
        Type : Logical
    
    [Variable : IsLineselectedCr]
        Type : Logical
    
    [Variable : IsLineselectednet]
        Type : Logical
    
    [Collection : SelectedLinesCollnet]
        Data Source : Report : Selected
        Fetch       : Name, TotalLedCrVchAmt, TotalLedDrVchAmt, TotalLedVchAmt
        Client Only : Yes
    
    [Collection:SelectedLinesCollDj]
         Data Source    : Report    : Selected
       Name, TotalLedCrVchAmt, TotalLedDrVchAmt, TotalLedVchAmt
            Client Only    : Yes
        Filter : onlydr
    [Collection:SelectedLinesCollCj]
         Data Source    : Report    : Selected
         Name, TotalLedCrVchAmt, TotalLedDrVchAmt, TotalLedVchAmt
            Client Only    : Yes
        Filter : onlycr
    [System : Formulae]
          
        onlycr : NOT $$isDr:$Amount
    
    [System : Formulae]
            onlydr :$$IsDr:$Amount
    
    [Color: CandyAppleGreen]
    RGB:0,204,153
    [Color: AmericanRose]
    RGB: 255,3,62
    
    
    
    
    [#Collection: Vouchers Of Group]
         Fetch       : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger, CashledBuyerNm,CompanyStateName, VCHBuyerName 
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription    ;; to fetch the Item additional description
        Fetch        : AllInventoryEntries.BatchAllocations.OrderNo
        Fetch        : V_ItemTaxType, V_IsSales, V_PartyLocationType, V_IsRCApplicable
        Fetch          : RBIsCommmonParty, IsVATLedMultiAddr, RBIsCashLedger,EIBuyer
        Fetch          : GSTOvrdnClassification,GSTOvrdnNature,GSTR1B2BCSSupplyType,vGSTTransNature
    
    [#Collection : Specific Vouchers of Company]
        Fetch       : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription    ;; to fetch the Item additional description
        Fetch        : AllInventoryEntries.BatchAllocations.OrderNo
        Fetch        : V_ItemTaxType, V_IsSales, V_PartyLocationType, V_IsRCApplicable
        Fetch          : RBIsCommmonParty, IsVATLedMultiAddr, RBIsCashLedger,EIBuyer
        Fetch          : GSTOvrdnClassification,GSTOvrdnNature,GSTR1B2BCSSupplyType,vGSTTransNature
    [#Collection : Filtered Vouchers of Company ]
        Fetch        : V_ItemTaxType, V_IsSales, V_PartyLocationType, V_IsRCApplicable
        Fetch          : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename,         Groupname
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription    ;; to fetch the Item additional description
        Fetch        : AllInventoryEntries.BatchAllocations.OrderNo
        Fetch          : RBIsCommmonParty, IsVATLedMultiAddr, RBIsCashLedger,EIBuyer
        Fetch          : GSTOvrdnClassification,GSTOvrdnNature,GSTR1B2BCSSupplyType
    [#Collection : vouchers of ledger ]
        Fetch        : V_ItemTaxType, V_IsSales, V_PartyLocationType, V_IsRCApplicable
        Fetch          : Date, VoucherNumber, Reference, VoucherTypeName, SortPosition, Narration, PartyLedgerName, PartyName, BasicBuyerName, Ledgername, vouchertypename
        Fetch        : IsOptional, IsPostDated, MasterID, IsCancelled, IsDeleted
        Fetch        : SerialNumber, SerialMaster, BuyersCSTNumber, PartyGSTIN,VCHPartyLedger,CashledBuyerNm,CompanyStateName, VCHBuyerName  
        Fetch        : Allledgerentries.*,*.*
        Fetch        : AllInventoryEntries.BasicUserDescription, AllLedgerEntries.InventoryAllocations.BasicUserDescription    ;; to fetch the Item additional description
        Fetch        : AllInventoryEntries.BatchAllocations.OrderNo
        Fetch          : RBIsCommmonParty, IsVATLedMultiAddr, RBIsCashLedger,EIBuyer
        Fetch          : GSTOvrdnClassification,GSTOvrdnNature,GSTR1B2BCSSupplyType
        
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    having no access to Tally or TDE, can you just post the Group Voucher related code so i can go through the same................
     


  14. Jay kumar tailor

    Jay kumar tailor Active Member


    Problem is Here
    I Think

    Need Filter For Journal (for shown value)

    [System : Formulae]

    onlycr : NOT $$isDr:$Amount

    [System : Formulae]
    onlydr :$$IsDr:$Amount
     
    Last edited: Jun 23, 2019


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    that is not the problem.... if it were, you would not be getting in Ledger A.c as well as daybook.

    The collection for Group Voucher is different. Search for it and use it..............to fetch the values.
     


  16. Jay kumar tailor

    Jay kumar tailor Active Member


    i am
    Using Common collection For Both
    Everything is ok except journal

    Already Tried then posted.
    Please Suggest Code (Possiable Solution) Only.
     
    Last edited: Jun 23, 2019


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    give me few days.. will be back by tue/wed..... will check out the same.
     


  18. garima

    garima Active Member


    Hello.. there.. Issue is not that..
    issue is in accounting logic.

    In case of Group Vouchers:

    Dr and Cr will depend upon the effect of accounting entry on selected group.
    for example if you select group Sales ..

    It will show amount in Dr Column if ledger in selected Sales group is Credited and ledger that is displayed in report is Debited.
    (now there may be more than one ledger which are being debited), in that case tally will show only one ledger in condensed mode and the amount that will be shown is the the amount by which displayed ledger is being debited and not "the amount, by which ledger in selected group is being Credited"

    Example :

    Party A/ : 5000 DR
    To Sales 4700 Cr
    To Taxes 300 Cr

    Now in Group Vouchers of Sales Group..

    you will be shown Party on Dr side Rs. 5000/- if you select it , then selected total would be Rs. 4700/- and not 5000/

    same is the case of Journal or any other entry.

    Now to get correct picture.. you will have to change the report and collection

    While walking group vouchers..

    To show group selected ledger's exact amount :
    set Condition to LedgerName belongs to = Selected Group
    and then get the amount

    Default collection goes by the following logic
    Show amount where ledgerName Belongs to != SelectedGroup

    So design or filter collection accordingly.
     
    Last edited: Jun 23, 2019


  19. garima

    garima Active Member


    Also note that

    In case of group vouchers
    Fields to be fetched in SelectedLines Dr and Cr Collection are TotalGrpDrVchAmt, TotalGrpCrVchAmt, TotalGrpVchAmt

    secondly you can use following filters to get the totals in correct Dr or Cr total Fields of your report but whether that "Total" is Debit or Credit will be decided "as explained in my previous message"

    onlycr : NOT $$IsDr:$TotalGrpVchAmt
    onlyDr : $$IsDr:$TotalGrpVchAmt
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    I assume you are referring to Display ►Accounts Book ► Group Vouchers
     


  21. Jay kumar tailor

    Jay kumar tailor Active Member


    Got It.

    As I Tested
    It Is Perfectly Working In...

    1. Daybook (Net Selection, Debit Total, Credit Total)
    2. Statics Vouchers (Net Selection, Debit Total, Credit Total)
    3. Ledger Display (Net Selection, Debit Total, Credit Total)
    4. Group Vouchers (Net Selection, Debit Total, Credit Total)

    (Scroll Cursor Over Entries For Total of Sub Entries In Detailed View Of Entries)


    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
    
    [Field : Daybook cr]
        Use : Amount Forex Field
        Set as : $$Total:DSPDBcrAmt
    
    [#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=================================================
    
    
    [#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
    
    
    [#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.*,*.*
    
    
     
    Last edited: Jun 23, 2019


  22. Rohit Khedar

    Rohit Khedar Member



  23. Jay kumar tailor

    Jay kumar tailor Active Member


    Please Test it & Revert me.
     


  24. garima

    garima Active Member


    Ok. Good.

    Have you checked Dr or Cr Sign against amounts in your total fields..

    have you tested it with group vouchers having multiple debit or credits of unequal amounts ?
     


  25. Jay kumar tailor

    Jay kumar tailor Active Member


    Code Corrected And Tested.

    Please Test It on Your System And Revert Me.
     
    anish likes this.


Share This Page