;; ============================================================
;; Product   : Party Credit Limit Show in Group Summary
;; Store     : www.gyanamrittdl.com
;; Support   : WhatsApp +91 79924 46290
;; For       : TallyPrime
;; ============================================================
;; What it does : Adds a CR LIMIT column in Group Summary
;;                (e.g. Sundry Debtors / Sundry Creditors).
;;                Credit limit shows on ledger lines only.
;;                Trial Balance and other reports do not change.
;; How to load  : F1 Help > TDL & Add-On > Manage Local TDL
;;                > Load TDL on Startup : Yes > give this file path.
;; ============================================================

;------------------------- ON / OFF VARIABLE -------------------------
[Variable: GAF63Show]
    Type    : Logical
    Default : No

[System: Variable]
    GAF63Show : No

[#Report: Group Summary]
    Variable : GAF63Show
    Set      : GAF63Show : Yes

;------------------------------ FIELD --------------------------------
[Field: GAF63 CrLimitF]
    Use         : Amount Field
    Format      : ("AllSymbols,NoZero,DrCr")
    Width       : if $$IsMultiCurrencyOn then @@AmountWidth + 15 else @@AmountWidth
    Set as : @@GAF63CrLimit
    Width  : 12
    Style  : Small
    Color  : Blue
    Border : Thin Right
    Align  : Right

[System: Formula]
    GAF63CrLimit : if $$IsEmpty:$CreditLimit then "" else $CreditLimit

;--------------------------- TITLE LINES -----------------------------
[#Line: DSP ItemTitle]
    Option : GAF63 TitleBlank : ##GAF63Show

[#Line: DSP CmpTitle]
    Option : GAF63 TitleBlank : ##GAF63Show

[#Line: DSP DateTitle]
    Option : GAF63 TitleBlank : ##GAF63Show

[#Line: DSP AmtOneTitle]
    Option : GAF63 TitleText : ##GAF63Show

[#Line: DSP AmtTwoTitle]
    Option : GAF63 TitleBlank : ##GAF63Show

[#Line: DSP Totals]
    Option : GAF63 TitleBlank : ##GAF63Show

[!Line: GAF63 TitleBlank]
    Add   : Field : At Beginning : GAF63 CrLimitF
    Local : Field : GAF63 CrLimitF : Set as : ""

[!Line: GAF63 TitleText]
    Add   : Field : At Beginning : GAF63 CrLimitF
    Local : Field : GAF63 CrLimitF : Info : "CR LIMIT"
    Local : Field : GAF63 CrLimitF : Style  : Small Bold

;--------------------------- LEDGER LINE -----------------------------
[#Line: DSP AccLine]
    Option : GAF63 AccOpt : ##GAF63Show

[!Line: GAF63 AccOpt]
    Add : Field : At Beginning : GAF63 CrLimitF

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