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. Jay kumar tailor

    Jay kumar tailor Active Member


    Not Working
    please See.......
    And Suggest Possible Solutions.

    [#Line : LV Title]
    Add : Field : After : LEDMailName : RJSelectedTitle,RJSelected
    Use : SelectedAmt

    [Field : RJSelectedTitle]
    Use : Short Name Field
    Set as :"Selected Total :-"
    Color : Black


    [Field : RJSelected]

    Use : Amount Field
    Set As : @@onlyselected
    Color : Black
    Format : "Drcr"

    [System : Formulae]
    OnlySelected : $$Total:VchAmount


    [#Collection : Vouchers of Company]

    Fetch : Amount,MasterId, VoucherNumber, VoucherTypeName,LedgerName
    Fetch : InventoryEntries.*
    Fetch : AllInventoryEntries.StockitemName, AllInventoryEntries.ActualQty, AllInventoryEntries.Rate, AllInventoryEntries.Amount
    Fetch : LedgerEntries.*


    [Collection : SelectedAmt]
    Use : Voucher
    Walk : Voucher Entries
    Fetch : Amount,MasterId, VoucherNumber, VoucherTypeName
    Fetch : InventoryEntries.*
    Fetch : AllInventoryEntries.StockitemName, AllInventoryEntries.ActualQty, AllInventoryEntries.Rate, AllInventoryEntries.Amount
    Fetch : LedgerEntries.*
    Data Source : Report : Selected
    Aggr Compute : VchAmount : Sum : $Amount
    Keep Source : ().
     


  2. hprahul

    hprahul Member


    I would suggest as under:
    Code:
    [#Line : LV Title]
    Add : Field : After : LEDMailName : RJSelectedTitle,RJSelected
    Use : SelectedAmt
    
    [Field : RJSelectedTitle]
    Use : Short Name Field
    Set as :"Selected Total :-"
    Color : Black
    
    [Field : RJSelected]
    Use : Amount Field
    Set As : $VchAmount
    Color : Black
    Format : "DrCr"
    
    [Collection: SelectedAmt]
    Data Source : Report : Selected
    Fetch : All Ledger Entries
    Aggr Compute : VchAmount : Sum : $Amount
     


  3. garima

    garima Active Member


    This is for Debit side amount..

    You know there are two sides in vouchers...


    Code:
    [#Line : LV Title]
    Add : Field : After : LEDMailName : RBCLineselectedTotal
    
    [#Line : DSP VchDetail]
        Option        : RBCSelectedLinesTotalOnFocus    :  ##IsLedgerReport
       
    [Field : RJSelectedTitle]
    Use : Short Name Field
    Set as :"Selected Total :-"
    Color : Black
    
    
    [!Line: RBCSelectedLinesTotalOnFocus] ;Line to Call Selected BillsTotal Function
    
        On        : Focus    : Yes    : Call    : RBCSelectedLinesTotal
    
    [Function: RBCSelectedLinesTotal]
    
        0010    : Set    : RBCSelectedLinesTotal    : ($$CollAmtTotal:RBCSelectedLinesColl:$TotalLedVchAmt)
        0011    : Set    : RBCIsLineselected         : (NOT $$IsEmpty:##RBCSelectedLinesTotal)
       
    [Field: RBCLineselectedTotal]
               
                Use                : Name Field
                Set as            : if ##RBCIsLineselected AND NOT $$IsEmpty:($$ReportObject:$$CollAmtTotal:RBCSelectedLinesColl:$TotalLedVchAmt) Then $$String:@SelectedTotal + $$String:@SelectedTotalVal Else ""
                Width            : 60
                Align            : Centre
                Invisible        : NOT  ##IsLedgerReport OR NOT $$InDisplayMode
                SelectedTotal    : $$LocaleString:"Entries Selected for : "
                SelectedTotalVal: $$String:##RBCSelectedLinesTotal:"DrCr"
    
    [System: Variables]
        RBcSelectedLinesTotal : 0
        RBCIsLineselected     : NO
       
    [Variable: RBcSelectedLinesTotal]
    
        Type    : Amount
       
    [Variable: RBCIsLineselected]
        Type    : Logical
    
    [Collection:RBCSelectedLinesColl]
       
        Data Source    : Report    : Selected
        Fetch        : Name, TotalLedCrVchAmt,TotalLedDrVchAmt, TotalLedVchAmt
        Client Only    : Yes
    
     


  4. Jay kumar tailor

    Jay kumar tailor Active Member


    thanks sir,
    i Will Work for both ......
    :)
     


  5. garima

    garima Active Member


    I think same field may show Net amount if debit and credit both are selected
     


  6. garima

    garima Active Member


    And Where is the "Like" if it is working fine ??:eek::rolleyes:
     
    Frz likes this.


  7. Jay kumar tailor

    Jay kumar tailor Active Member


    Just Tested..
    It's Showing Net.
    Working Fine.

    Thanks.
     


  8. MZMS

    MZMS New Member


    Sir Excellent work Please add More
    1. When We select the Line it will get some colour
    2. How Many Lines we are selected its total also appear
    3. In Daybook its also work
    4. When we do ledger as a columinar mode its show that total also
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  10. Rajsrisrimal

    Rajsrisrimal Member



    Garima ji its working superb , can we see total no of line selected ?
     


  11. Jay kumar tailor

    Jay kumar tailor Active Member


    Dear rajsrisrimal,
    Please Note
    C A Devendra Sir Not "Garima Ji"
     


  12. Bipin Damania

    Bipin Damania Member


    Jay Kumarji, CA Deendraji & Amitji

    Thank you very much for sharing & Inspiring...
    I got Selected Lines Total for Debit, Credit and Also Net Amount in Ledger and also in DayBook.

    Really enjoying...

    Once again Thanks to All.
     


  13. ONKAR

    ONKAR Active Member


    @garima sir, thank you so much for your code, it's perfectly working. I've made a slight change to your code, I added color, height, and background to the code.

    see this image
    SCREENSHOT.JPG
     


  14. ONKAR

    ONKAR Active Member


    @Bipin Damania, not showing in the daybook , in my tally only showing in ledger vouchers, so how to show in the daybook also.
     


  15. Bipin Damania

    Bipin Damania Member


    Selected Line Totals shifted from Top to Bottom

    SelLineTotal-Ledger.png
     


  16. ONKAR

    ONKAR Active Member


    @Bipin Damania sir cant understand. how to get this type of total, [ dr. total, cr.total, net amount ] separate total like displayed in your screenshot
     


  17. Bipin Damania

    Bipin Damania Member


    Selected Line Totals in DayBook DayBkSelLnTotals.jpg
     
    Rajsrisrimal likes this.


  18. ONKAR

    ONKAR Active Member



  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Very good work .... Bipinji ..... you are becoming master now ... ;):cool::D
     


  20. Bipin Damania

    Bipin Damania Member


    Amitji

    Thank you for Inspiring & Supporting to learner like me & other...

    :)
     


  21. Rajsrisrimal

    Rajsrisrimal Member


    SIR,
    CAN WE GET SAME FOR GSTR-1,2 AND GSTR -3 B ALSO?
     


  22. garima

    garima Active Member


    Can you explain the usefulness in GSTR1 and other gST reports >
     


  23. Rajsrisrimal

    Rajsrisrimal Member


    sir
    when we are calculating sales, sales return, CN ,DN separate for re check of calculation, it will be more useful
    as Default Tally is not giving facility to use of Alt+R and Alt+U here
    so same if we can calculate by TDL, we can recheck the total value of CN , DN sales in month.
     


  24. Jay kumar tailor

    Jay kumar tailor Active Member



  25. Jay kumar tailor

    Jay kumar tailor Active Member


    Hi All

    Jay Here,

    Try This For Net Total For

    1. Daybook Selected Entries
    2. Statics Vouchers


    (For Sub Values Selection You Will Need To Move Cousor Over Entries)

    Enjoy Code With Colours........ :)


    [#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: 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:mad:SelectedTotal1 + $$String:mad: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
     
    Last edited: Jun 21, 2019


Share This Page