;; ============================================================
;; Product   : Item Stock Show in Sales Entry
;; Store     : www.gyanamrittdl.com
;; Support   : WhatsApp +91 79924 46290
;; For       : TallyPrime
;; ============================================================
;; What it does : In the Sales invoice, shows the available stock of each
;;                item next to the item name, so you know the stock
;;                before you sell.
;; How to load  : F1 (Help) > TDL & Add-On > Manage Local TDL >
;;                Load TDL on Startup = Yes > give the path of this file
;; ============================================================

;;------------------------- INVOICE ITEM LINE ------------------------
[#Line: EI ColumnOne]
    Option : GAF39ColOpt1 : @@IsSales

[!Line: GAF39ColOpt1]
 	Add:Right Field:At Beginning: GAF39 TitleF
    Local : Field : GAF39 TitleF : Set as : "Avl. Stock"

[#Line: EI ColumnTwo]
    Option : GAF39ColOpt2 : @@IsSales

[!Line: GAF39ColOpt2]
 	Add:Right Field:At Beginning: GAF39 TitleF
   Local : Field : GAF39 TitleF : Set as : ""

[#Line: EI InvInfo]
    Option : GAF39ItemOpt : @@IsSales
[#Line: CI InvInfo]
    Option : GAF39ItemOpt : @@IsSales

[!Line: GAF39ItemOpt]
	Add:Right Field:At Beginning: GAF39 ValueF

[Field: GAF39 TitleF]
    Use    : Name Field
    Set as : ""
    Width  : 12
    Align  : Center
    Style  : Small Bold
    Skip   : Yes
	Color:Blue
[Field: GAF39 ValueF]
    Use        : Qty Field
    Set as     : if $$IsEmpty:$StockItemName then "" else $ClosingBalance:StockItem:$StockItemName
    Set Always : Yes
    Width      : 12
    Color      : Blue
    Style      : Small Bold
    Skip       : Yes

;;============================ END =====================================
