You are currently viewing 2022 Best Tally Prime TDL : Item Purchase History at Voucher Entry Time | Purchase History at Sale Time

2022 Best Tally Prime TDL : Item Purchase History at Voucher Entry Time | Purchase History at Sale Time

  • Post author:
  • Post category:Free TDL

In our business if we sale goods or anything, we always need to track it’s profit and avoid wrong billing also we need to track Item Purchase History. At the time the most outstanding and user-friendly accounting software is Tally. The majority of Asian nations run their businesses using Tally, and once GST was introduced in India, its consumers climbed much more. Because Tally is incredibly user-friendly and packed with useful features. By including certain TDL (Tally Definition Language) files, we may make it simpler and more beneficial.

So today I have special TDL for your Tally, that will change your working style with Tally Prime or with Tally ERP9. By using this TDL, we may view the history of item purchases made during sales or during voucher input. With this Item purchase history TDL code we can track buying price, discounts, quantity etc. when invoicing.

Item Purchase History

Also get Tally Prime Pivot

Item Purchase History at Voucher Entry Time TDL code:

We can modify this TDL code according to our need. We can add some additional fields, we can remove extra fields, and it is very simple to work with Tally Erp9 and Tally Prime. Best simple tdl code to see Item purchase details at billing time.

[Collection : ClnPurchaseInfo]
    Type     : Vouchers : Stock Item
    Child Of : $$BaseOwner:#VchStockItem
    Filter   : PurchaseFilt 
    Fetch	: LedgerEntries.PartyLedgerName, LedgerEntries.LedgerName


[System : Formula]
    MStk      : $StockItemName = $$BaseOwner:#VCHStockItem
    PurchaseFilt : $$IsPurchase:$VoucherTypeName



[#Field : VCH StockItem]
    Key : mKeyF5
Tooltip : "Press F5 to See Item History"
    
 
[Key : mKeyF5]
    Key : F5
    Action : Display : RptViewHistory

[Report : RptViewHistory]
    Form : FrmViewHistory
      
[Form : FrmViewHistory]
	Part : PrtViewHistory
	Height : 50 % Screen
	Vertical Alignment : Bottom

[Part : PrtViewHistory]
	Line   : LnViewHistoryTitle, LnViewHistoryHD, LnViewHistoryData
	Repeat : LnViewHistoryData : ClnPurchaseInfo
	Scroll : Vertical

[Line : LnViewHistoryTitle]
	Field : FldVwStkItem
	Fixed : Yes

[Field : FldVwStkItem]
	Use        : Short Name Field
	Set As     : "Purchase History For : " + #VCHStockItem
	Full Width : Yes
	Align      : Centre           


[Line : LnViewHistoryHD]
	Use : LnViewHistoryData
	Local : Field : Default : Type : String
	Local : Field : Default : Align : Centre
	Local : Field : FldViewHistory0 : Set As : "Voucher Type"
	Local : Field : FldViewHistory1 : Set As : "Invoice No"
	Local : Field : FldViewHistoryDt: Set As : "Date"
	Local : Field : FldViewHistory2 : Set As : "Party Name"
	Local : Field : FldViewHistory3 : Set As : "Qty"
	Local : Field : FldViewHistory4 : Set As : "Rate"
	Local : Field : FldViewHistory5 : Set As : "Discount"
        Local : Field : FldViewHistory6 : Set As : "GST Rate"
	Local : Field : FldViewHistory7 : Set As : "Amount(Rs.)"
	Border : Column Titles
	Fixed : Yes


[Line : LnViewHistoryData]
	Field :  FldViewHistory1, FldViewHistoryDt, FldViewHistory2 ;;FldViewHistory0,
	Right Field : FldViewHistory3, FldViewHistory4, FldViewHistory5, FldViewHistory6, FldViewHistory7
	Local : Field : FldViewHistory0 : Set As : $VoucherTypeName
	Local : Field : FldViewHistory1 : Set As : $VoucherNumber
	Local : Field : FldViewHistoryDt: Set As : $Date
	Local : Field : FldViewHistory2 : Set As : $PartyLedgerName
	Local : Field : FldViewHistory3 : Set As : $$FilterValue:$BilledQty:InventoryEntries:1:mStk
	Local : Field : FldViewHistory4 : Set As : $$FilterValue:$Rate:InventoryEntries:1:mStk
	Local : Field : FldViewHistory5 : Set As : $$FilterValue:$discount:InventoryEntries:1:mStk
        Local : Field : FldViewHistory6 : Set As : $$FilterValue:$GSTIGSTRate:InventoryEntries:1:mStk
	Local : Field : FldViewHistory7 : Set As : $$FilterValue:$Amount:InventoryEntries:1:mStk
;;  Empty If : NOT $$IsPurchaseOrder:$VoucherTypeName
	Explode : PrtViewHistoryData : $$FilterCount:InventoryEntries:mStk -1 > 0

[Part : PrtViewHistoryData]
	Line : LnViewHistoryData1
	Repeat : LnViewHistoryData1 : InventoryEntries

[Line : LnViewHistoryData1]
	Field : FldViewHistory0, FldViewHistory1, FldViewHistoryDt, FldViewHistory2 
	Right Field : FldViewHistory3, FldViewHistory4, FldViewHistory5, FldViewHistory6, FldViewHistory7
	Local : Field : FldViewHistory0 : Set As : $$Owner:$VoucherTypeName
	Local : Field : FldViewHistory1 : Set As : $$Owner:$VoucherNumber
	Local : Field : FldViewHistoryDt: Set As : $$Owner:$Date
	Local : Field : FldViewHistory2 : Set As : $$Owner:$PartyLedgerName
	Local : Field : FldViewHistory3 : Set As : $BilledQty
	Local : Field : FldViewHistory4 : Set As : $Rate
	Local : Field : FldViewHistory5 : Set As : $Discount
        Local : Field : FldViewHistory6 : Set As : $GSTIGSTRate
	Local : Field : FldViewHistory7 : Set As : $Amount
	Empty if : NOT @@mStk  OR $$ItemSerial=0

    

[Field : FldViewHistory0]
    Use : Short Name Field    

[Field : FldViewHistory1]
    Use : Short Name Field    

[Field : FldViewHistoryDt]
    Use : Short Date Field    

[Field : FldViewHistory2]
    Use : Name Field

[Field : FldViewHistory3]
    Use : Qty Field

[Field : FldViewHistory4]
    Use : Rate Field

[Field : FldViewHistory5]
    Use : Number Field
    Align : Right
    Format : "Percentage"

[Field : FldViewHistory6]
    Use : Number Field
    Align : Right
    Format : "Percentage"

[Field : FldViewHistory7]
    Use : Amount Field


;; Eof


How to use Purchase History at Sale Time TDL code:

HOW TO USE TDL CODE:
  • Copy above TDL code and make a text file.
  • Save text file then load in Tally Prime (Method provided below the code)
  • Now go for invoice creation.
  • After entering Item name, back to item then press F5 key to see item purchase history.

This is best free TDL to have in your Tally . Must have TDL file for Tally ERP9 and Tally Prime that can use for lifetime. This free TDL Code will perfectly work with Tally Prime.

How to use Purchase History TDL video:

Watch above video to learn :

  • How to use TDL file in Tally Prime.
  • How to see stock item purchase details in invoice.
  • How to modify voucher with TDL code.
  • More TDL files on youtube/learnwell
FOLLOW THE BELLOW INSTRUCTIONS: HOW TO LOAD TDL FILE IN TALLY:
  1. Make a Text file of above code
  2. Save it in to your computer
  3. Copy the text file path including Name and extension (as – C:\Users\HP\Desktop\rec\purchasehistory.txt)
  4. Open Tally Prime Software
  5. Click on Help and click on TDL & Addon  (for Tally Prime)
  6. Press F4 (to open a Box)
  7. Set Load TDL file on Startup – Yes
  8. Paste The path in blank space
  9. Press enter and save
  10. Now your purchase history TDL is ready to use