Help on Total Invoice Value

Discussion in 'Free Source Codes' started by VISHNU RATHI, Jun 24, 2021.

    
  1. VISHNU RATHI

    VISHNU RATHI Member


    Dear Members,

    I want to fetch total invoice value i.e. including tax amount in my report

    i am using this collection:


    [Collection:SalesPartywiseColl]
    Type : Voucher
    Filter : IsSalesVoucher
    Fetch : PartyLedgerName,StockItemName

    [Collection:SalesPartywiseCollTotal]
    Source Collection : SalesPartywiseColl
    Walk : Inventory Entries
    By : PName : $PartyLedgerName
    Aggr Compute : BilledQty : SUM : $BilledQty
    Aggr Compute : Amount : SUM : $Amount
    Fetch : PartyLedgerName
    Search Key : $PNameCoal



    But from this i am getting only Basic amount of item,

    How to get Total Invoice amount .

    Regards
    Vishnu Rathi
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    i think you need to walk Ledgerentries......
     


  3. VISHNU RATHI

    VISHNU RATHI Member


    Dear Amit sir,

    Thankyou for guiding, but from ledger entries walk, it is picking up only first bill amount , not adding all bills amount.
    can you guide a bit more ,what to use in collection while walking ledger entries

    here is my code sir

    [#Menu:Gateway of Tally]
    Add:Item:Before:mad:@locquit:Sales Quantity and Amount:Display:SalesQtyandAmount

    [Report:SalesQtyandAmount]
    Use : DSP Template
    Form:SalesQtyandAmount
    Set : SVFromDate : "01-12-18";##SVCurrentDate
    Set : SVToDate : ##SVCurrentDate

    [Form:SalesQtyandAmount]
    Use : DSP Template
    Part:SalesQtyandAmount
    Width:100% screen
    Height:100% screen

    [Part:SalesQtyandAmount]
    Line:SalesQtyandAmountt,SalesQtyandAmount
    Repeat:SalesQtyandAmount:KhetSalesPartywiseCollParty
    Scroll:Vertical

    [Line:SalesQtyandAmountt]
    Use:SalesQtyandAmount
    Local:Field:SalesQtyandAmount:Info:"Party Name"
    Local:Field:SalesQtyAmount:Info:"Weight"
    Local:Field:SalesQtyAmountN:Info:"Amount"
    Border:Flush Totals


    [Line:SalesQtyandAmount]
    Field:SalesQtyandAmount,SalesQtyAmount,SalesQtyAmountN

    [Field:SalesQtyandAmount]
    Use:Name Field
    Set as:$PartyLedgerName
    Width:3 Inches

    [Field:SalesQtyAmountN]
    Use:Amount Field
    Set as : $$ReportObject:$$CollectionFieldByKey:$Amount:mad:MyFormula:CoalSalesPartywiseCollTotala
    MyFormula : #SalesQtyandAmount
    Format : "NoZero"

    [Field:SalesQtyAmount]
    Use : Qty Primary Field
    Set as : $$ReportObject:$$CollectionFieldByKey:$BilledQty:mad:MyFormula:CoalSalesPartywiseCollTotal
    MyFormula : #SalesQtyandAmount
    Format : "NoZero"

    [Collection:SalesPartywiseColl]
    Type : Voucher
    Filter : IsSalesVoucherCoal;,PartyFilMy
    Fetch : PartyLedgerName,StockItemName



    [Collection:KhetSalesPartywiseCollParty]
    Source Collection:SalesPartywiseColl
    Walk : Inventory Entries
    By : PNameCoal : $PartyLedgerName
    Aggr Compute : BilledQty : SUM : $BilledQty
    Filter : NonEmptyQtyCoal
    Sort : Default : $PNameCoal
    Fetch : PartyLedgerName

    [Collection:CoalSalesPartywiseCollTotal]

    Source Collection : SalesPartywiseColl

    Walk : Inventory Entries
    By : PNameCoal : $PartyLedgerName
    Aggr Compute : BilledQty : SUM : $BilledQty
    Aggr Compute : Amount : SUM : $Amount
    Fetch : PartyLedgerName
    Search Key : $PNameCoal

    [Collection:CoalSalesPartywiseCollTotala]

    Source Collection : SalesPartywiseColl

    Walk : Ledger Entries
    By : PNameCoal : $PartyLedgerName
    Aggr Compute : Amounta : SUM : $Amount
    Fetch : PartyLedgerName,Amount
    Search Key : $PNameCoal

    [Variable:pNameCoal]
    Type : String
    Repeat : ##DSPRepeatCollection

    [Variable:amounta]
    Type : String
    Repeat : ##DSPRepeatCollection

    [System:Formula]
    IsSalesVoucherCoal:$$IsSales:$VoucherTypeName
    NonEmptyQtyCoal:NOT $$IsEmpty:$BilledQty
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    First of all.. do not understand your REPORT..... what is the purpose???

    Second -- you must understand the Voucher Entry screen..........Open a voucher and see....on left side is Item and right side is Amount (qty X Rate).. so how will you get the TOTAL INVOICE AMOUNT???? you are using CollectionFieldByKey....so Totals will not come.
     
    panam likes this.


Share This Page