Popup Last Purchase Rate

Discussion in 'Tally Developer' started by kamal, May 4, 2013.

         
  1. kamal

    kamal Member


    Dear Experts
    please can any one arrange me sample code to popup last purchase Rate of stock item after entering Qty.
     

    Attached Files:




  2. admin

    admin Administrator Staff Member


    [#Field: VCHBATCH BilledQty]
    Notify: Kiran: 1=1

    [System: Formula]
    Kiran: $LastPurcPrice:StockItem:$StockItemName
     
    Pritam Krishna likes this.



  3. G Vijay

    G Vijay Member


    Thanks
     



  4. kamal

    kamal Member


    Thanking you admin
     



  5. Basha

    Basha Member


    Try this : Popup Selling Price


    [#Field: VCHBATCH BilledQty]
    Notify: Kiran: 1=1

    [System: Formula]
    Kiran: $LastSalePrice:StockItem:$StockItemName
     



  6. nagaraju

    nagaraju New Member


    wheree popup will come
     



  7. Raju Das

    Raju Das Member



    ;;;;Kamal Bro try this......
    ;;;; Here is it.....
    ;;;; If you appreciate this post, plz click like.......

    [#Field: VCH BilledQty]
    Sub Form:ItemlastSale

    [#Field:VCHBATCH BilledQty]
    Sub Form:ItemlastSale

    [Report: Itemlastsale]
    Form: Itemlastsale

    [Form: ItemlastSale]
    No Confirm: yes
    Part: ItemlastSale
    Option: Small size form
    Background:white
    [Part: Itemlastsale]
    Line: Itemlastsale

    [Line: Item last Sale]
    Field: Itemselect, Priceratefield

    [Field: Itemselect]
    Use:Name Field
    Set as:"Last Purchase Cost / Std. Cost :"
    Color:RED
    Style:Verdana Bold Italic
    Skip:Yes

    [Field:priceratefield]
    Use:Rate Price Field
    Set as:$LastPurcPrice:StockItem:$StockItemName
    Width:15
    Style:Normal Bold Italic
    Set always : Yes
    Format : "Symbol,Forex"
    Type: Rate
     
    kamal and GGUGLANI like this.



  8. ahmed rishali

    ahmed rishali Member


    POSSIBLE TO CALL CUSTOMER WISE ?
     



  9. Maulik Patel

    Maulik Patel Active Member


    Dear Ahmed Rishali,

    Try this

    Code:
    [#Field: VCHBATCH BilledQty]
        Notify: MLK: 1 = 1 ;;Here you can write your own condtion
     
    [System: Formula]
        MLK: $CollectionField:$Rate:1:MLKPreviousRateList
     
    [Collection : MLK Previous Rate List SRC]
        Type    :    Voucher
        Fetch    :    Date,VoucherTypeName ,PartyLedgerName, InventoryEntries.*
        Filter    :    MLKPreviousRate
     
    [Collection : MLK Previous Rate List]
        Source Collection    :    MLK Previous Rate List SRC
        Walk    :    InventoryEntries
        Fetch    :    Rate, Date, VoucherTypeName, PartyLedgerName, StockItemName
        Filter    :    MLKRateFilter
        Sort    :    Default : -$Date
     
     
    [System : Formula]
        MLKPreviousRate    : $$IsPurchase:$VoucherTypeName
        MLKRateFilter    : $PartyLedgerName = #EIConsignee AND $StockItemName = #VCHStockItem
     
    khushbu and knsivam89 like this.



  10. knsivam89

    knsivam89 Member



    Its Working very Fine.....

    I have Doubt on following line.
    Notify: MLK: 1=1

    what is the purpose of 1=1
     



  11. Maulik Patel

    Maulik Patel Active Member


    It is a dummy condition which will always return true and due to that it will popup last purchase rate every time.

    Its tricky logic to return TRUE/YES....!!!! you can use any condition like "@@IsSales" or you can also write "YES"
     




  12. Sir,
    Mine is a company without inventory, I modified this code to retrieve last invoice amounts, (accounting invoice with direct income ledgers as items), but it is not working, also I tried to make one tdl where i can feed fixed invoice amounts in party ledger masters and retrieve the same as a report while passing invoice, it is also giving problems, please guide me, files are attached here, thanks a lot in advance.
     

    Attached Files:





  13. not working, the last purchase rate only retrives, it is not last rate of selected party
     



  14. ashu sing;a

    ashu sing;a New Member


    SIR/MAM

    I WANT THIS IN BOTH SALE AND PURCHASE SHOW LAST RATES REGARDING TO PARTY WE ARE CREATING ENTERY item history.png item history.png

    kindly mail me this code on ashusingla@live.in
     



  15. anbhuselvan

    anbhuselvan Member


    Dear Sir,

    Im unable to get the QTY and RATE my customized Purchase Invoice, Please help me and correct my TDL Code:

    [#Form: Comprehensive Invoice]

    Parts : STDInvoiceTop, EXPINV OpPageBreak, EXPINV Details
    BottomParts : EXPINV Totals , EXPINV SignOff , EXPINV Customer, EXPINV Jurisdiction, EXPINV InvoiceCompGen

    ; Width : @@InvWidth Inch
    ; Height : @@InvHeight Inch
    ; Space Top : @@InvSpace inch
    ; Space Right : 0.5 inch
    ; Space Left : @@InvSpaceLeft inch
    ; Space Bottom: 0.25 inch

    Page Break : EXPINV ClPageBreak, EXPINV OpPageBreak

    Option : Dealer ExcisePurchaseInvoice : (@@IsExciseTraderOn AND (@@IsPurchase OR @@IsDebitNote) AND @@IsTraderInvoice AND ##PUDealerExciseDutyInfo)
    Option : STX Comprehensive Invoice : @@IsIndianServiceTax AND $$STXCanUpdateDutyLed
    Option : Invoice Bank Info Fetch : ##SABankInfo AND NOT $$IsSysName:##SABankName

    ;; When Sales Bill is made in Voucher mode, while printing sales ledger is also getting printed
    Set Always : SVViewName : $$SysName:InvVchView
    Delete :parts : STDInvoiceTop, EXPINV OpPageBreak, EXPINV Details
    Delete :BottomParts : EXPINV Totals , EXPINV SignOff , EXPINV Customer, EXPINV Jurisdiction, EXPINV InvoiceCompGen

    Add: Top Parts : INV;,EXPSMPtitle1

    Height : 100% Page
    Width : 100% Page
    Space Top : 0.25 inch
    Space Right : 0.25 inch
    Space Left : 0.5 inch
    Space Bottom: 0.5 inch

    [part : INV]
    ;Line :RMCmpName,INVS, TRWK,RMCmpAdd, MIComPhone,MIVATTINNumber
    Line :RMCmpName,INVS, TRWK,RMCmpAdd,MIVATTINNumber,CSTN
    Repeat : RMCmpAdd:Company Address
    Line : MI VCHDate,MI PartyName;, MI ColumnTitles
    Add: Line: MIQuantity
    Add: Line: MI rate
    Add: Line: IE Amount , MI AmtInWords
    Add: Line: Global ForCmp1
    Add: Line: INCDetails
    Border: MyBorder
    ;


    [Border: MyBorder]
    Top : Flush, Thin, Full Length
    Bottom : Flush, thin, full length
    Left : Thin
    Right : Flush, Thin, Full Length

    [Border: MyBorder1]
    ;Top : Flush, Thin, Full Length
    Bottom : Flush, thin, full length
    ;Left : Thin
    ;Right : Flush, Thin, Full Length

    [Line :INVS]
    Field: INVS
    [Field: INVS]
    Set as : "BOUGHT NOTE"
    Style : newSTY2
    Align : Center
    FullWidth : Yes

    [Line :TRWK]
    Field: TRWK
    [Field: TRWK]
    Set as : "Trading To Waste Kraft Boxes"
    Style : newSTY2
    Align : Center
    FullWidth : Yes


    [Line: RM CmpName]
    Fields : RMcmpname

    [Field : RMCmpName]
    Set as :mad:@CmpMailName
    Align : Center
    FullWidth : Yes
    Style : newSTY1

    [Line : RMCmpAdd]
    Fields : RMCmpAdd

    [Field : RMCmpAdd]
    Set as : $Address
    Align : Center
    FullWidth : Yes
    Style : newSTY1
    /*
    [Line: MI ComPhone]
    Field : MI ComPhone
    [Field: MI ComPhone]
    Use : Name Field
    Set as : $phonenumber:Company:##SvCurrentCompany
    Indent : 10
    */

    [Line: MI VATTINNumber]
    Left Fields: Short Prompt, MI VATTINNumber
    ;Right Fields: Short Prompt, CSTN
    Local : Field : Short Prompt : Set as : "TIN No:"
    ;Local : Field : Short Prompt : Set as : "GST : "
    [Field : MI VATTINNumber]
    Use : Name Field
    Set as : $VATTINNUMBER:Company:##SvCurrentCompany
    ;FullWidth : yes
    Style : pp6
    Align : Center

    [Line: CSTN]
    Right Fields: Short Prompt, CSTN
    Local : Field : Short Prompt : Set as : "CST.N : "
    [Field : CSTN]
    Use : Name Field
    Set as : $InterstateStnumber:Company:##SvCurrentCompany
    ;FullWidth : yes
    Style : pp6
    Align : Center

    [Line: MI VCHDate]
    Field : Simple Prompt, MI VCHNo
    Right Field : Short Prompt, MI VCHDate
    Local : Field : Short Prompt : Set as : "Voucher Date : "
    Local : Field : Simple Prompt : Set as : " Voucher No : "
    Border: MyBorder1

    [Field: MI VCHDate]
    Use : Short Date Field
    Set as : $Date

    [Field: MI VCHNo]
    Use : Short Name Field
    Set as : $VoucherNumber

    [Line: MI PartyName]
    Space Top: 1
    Field : Short Prompt, MI PartyNAme
    Local : Field : Short Prompt : Set as : "Purchaser: (Name & Vehical No: "

    [Field: MI PartyName]
    Use : Name Field
    Set as : $PartyLedgerName
    ;Set as: $BuyerName


    [Line: MIQuantity]
    Space Top: 1
    Field : Short Prompt, IE Qty
    Local : Field : Short Prompt : Set as : "Quantity: "

    ;[Field: MIQuantity]
    /*Use : Qty Primary Field ;Number Field ;;
    ;Use : Qty Primary Field
    Set as : $BasicQty
    Format : "NoSymbol,Primary"
    */


    [Field : IE Qty]

    ;Use : Qty Primary Field
    Use: Number Field
    Set as : $BilledQty
    ;Border : Thin Left
    [Line: MI rate]
    Space Top: 1
    Field : Short Prompt, MI rate
    Local : Field : Short Prompt : Set as : "Unit Price: "

    ;Explode : Item Desc : $$NumItems:UserDescription > 0

    [Field : MI rate]

    ;Use : Rate Field
    ;Border : Thin Left
    ;Rate Units Field
    ;Use: Number Field
    ;Set as : $Rate

    Use : Rate Price Field
    Set as : $Rate

    [Line: IE Amount]
    Space Top: 1
    Field : Short Prompt, IE Amount
    Local : Field : Short Prompt : Set as : "Amount: "

    [Field : IE Amount]
    Use : Amount Field
    Set as : $Amount
    ;Border : Thin Left Right
    Format : "NoComma,NoZero"
    ;FullWidth : yes

    [Line: MI AmtInWords]
    Space Top: 1
    Field : Short Prompt, MI AmtInWords
    Local : Field : Short Prompt : Set as : "Rs: "

    [Field : MI AmtInWords]
    Use : Name Field
    Set as : $$InWords:$Amount
    FullWidth : yes
    Style : Small

    [Line: Global ForCmp1]
    Space Top: 2
    Right Fields: Global ForCmp1
    Space Bottom: 2

    [Field: Global ForCmp1]


    Use : Name Field
    Set as : "For " + @@CMPMailNAme
    Align : Right
    Width : 0

    [Line: INCDetails]
    Space Top: 1
    Field : INCDetails
    ;Local : Field : Short Prompt : Set as : "Purchaser tax Shall be paid bythe Purchaser"

    [Field: INCDetails]
    Style : Normal1
    Set as: "Purchaser tax Shall be paid bythe Purchaser"

    /*[Collection:VCHCollection]
    Type: Stock Item
    */


    [System: Formula]



    LargeSize : 14
    SmallerSize : 6

    ;******************** Cardinal styles ********************;

    [Style: Normal1]

    ;; for linux face name is changed
    Font : if $$SysInfo:IsWindows then "Arial" else "Helvetica"
    Bold: Yes
    Height : @@LargeSize
     



  16. parvez

    parvez Member



    dear admin

    how to inactive rate and value in location summary

    plz

    thank in advance
     



Share This Page