Last Selling Price

Discussion in 'Tally Developer' started by Amit Mahajan, Apr 11, 2015.

    
  1. Amit Mahajan

    Amit Mahajan New Member


    I write following code to show last selling price of particular item to selected ledger for voucher level only, can anyone help me how to I get last price in item allocation screen?

    [#Line: EI ColumnOne] ;; Invoice Column Headings1 without class

    Option : Global EI ColumnOne : @@IsSales

    [#Line: EI ColumnOne]

    Add : Right Fields : Before: VCH Qtytitle : PrevRate
    Local : Field : Default : Align : Left
    Local : Field : PrevRate : Info : "Prev. Rate"
    [Field: PrevRate]

    Use : Short Name Field
    Width : 8
    Align : Center
    Invisible : NOT ##VrVarC1
    Skip on : $$IsEnd:$StockItemName

    [#Line: EI InvInfo]
    Add : Right Fields : Before: VCH BilledQty : PrevRate1
    Local : Field : Default : Align : Left
    ; Local: Field: default : Set as: $Prevrate1



    [Collection: VCHSourceColl]

    Type : Vouchers : VoucherType
    Child of : $$VCHTypeSales

    [Collection: VCH Summary Collection]

    Source Collection : VCHSourceColl
    Walk : Inventory Entries
    By : Partyled : $PartyLedgerName
    By : ItemName : $StockItemName
    By : VoucherNo : $$Owner:$VoucherNumber
    By : MasterId : $MasterId
    Aggr Compute : RateValue : Sum : $Rate
    Sort : Default : -$MasterId

    [Field: PrevRate1]
    Set as : $$FilterValue:$RateValue:VCHSummaryCollection:1:partyItemCheck
    Width:20 mms

    [System: Formula]

    PartyItemCheck : $Partyled=$$ReqObject:($$Owner:$PartyLedgername) and $ItemName=#VCHStockItem
     


  2. Mohd Ezaz Pasha

    Mohd Ezaz Pasha New Member


    Thank u Sir, Amit Ji.
     


  3. Vimal Raj

    Vimal Raj New Member


    But this code taking much time while billing in large Valium data company
    any other option please
     


  4. saranbe

    saranbe New Member


    How to use this code. pls help me
     


  5. narayane88

    narayane88 Active Member


    Previous rate shows as table


    [#Line: EI ColumnOne] ;; Invoice Column Headings1 without class
    Option : Global EI ColumnOne : @@IsSales
    [#Line: EI ColumnOne]
    Add : Right Fields : Before: VCH Qtytitle : PrevRate
    Local : Field : PrevRate : Info : "Prev. Rate"
    [#Line: EI ColumnTwo]

    [Field: PrevRate]
    Use : Short Name Field
    Width : 8
    Align : Center
    Invisible : NOT ##VrVarC1
    Skip on : $$IsEnd:$StockItemName
    [#Line: EI InvInfo]
    Add : Right Fields : Before: VCH ActualQty : PrevRate1
    ; Local: Field: default : Set as: $Prevrate1
    [Collection: VCHSourceColl]
    Type : Vouchers : VoucherType
    Child of : $$VCHTypeSales
    [Collection: VCH Summary Collection]
    Title: "Previous Rate"
    Sub Title: Previous Rate, Invoice No., Date
    Source Collection : VCHSourceColl
    Walk : Inventory Entries
    Fetch: StockItemName, PartyLedgerName, ItemName, Voucher No, Rate
    By: date : $date
    By : Partyled : $PartyLedgerName
    By : ItemName : $StockItemName
    By : VoucherNo : $$Owner:$VoucherNumber
    By : MasterId : $MasterId
    Align: Center
    Sort : Default : -$MasterId
    Format: $rate,6
    Format: $VoucherNo,8
    Format: $date,7
    Filter: partyItemCheck
    [Field: PrevRate1]
    Table: VCH Summary Collection,end of list
    Skip on : $$IsEnd:$StockItemName
    Show Table: Always
    Width:20 mms
    [System: Formulae]
    PartyItemCheck : $PartyLedgerName = #EIFirstLedger and $StockItemName = #VCHStockItem
     


  6. ankitda

    ankitda New Member


    The table appears but the last rates are not populated. Did I do something wrong?
     


Share This Page