;; ============================================================
;; Product   : Party City State Show in Group Summary
;; Store     : www.gyanamrittdl.com
;; Support   : WhatsApp +91 79924 46290
;; For       : TallyPrime
;; ============================================================
;; What it does : Adds a STATE / PIN column in Group Summary
;;                (e.g. Sundry Debtors / Sundry Creditors).
;;                State and PIN code show 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: GAF62Show]
    Type    : Logical
    Default : No

[System: Variable]
    GAF62Show : No

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

;------------------------------ FIELD --------------------------------
[Field: GAF62 StatePinF]
    Use    : Name Field
    Set as : @@GAF62StatePin
    Width  : 20
    Style  : Small
    Color  : Blue
    Border : Thin Right

[System: Formula]
    GAF62StatePin : if $$IsEmpty:$Pincode then $LedStateName else if $$IsEmpty:$LedStateName then $Pincode else $LedStateName + " - " + $Pincode

;--------------------------- TITLE LINES -----------------------------
[#Line: DSP ItemTitle]
    Option : GAF62 TitleBlank : ##GAF62Show

[#Line: DSP CmpTitle]
    Option : GAF62 TitleBlank : ##GAF62Show

[#Line: DSP DateTitle]
    Option : GAF62 TitleBlank : ##GAF62Show

[#Line: DSP AmtOneTitle]
    Option : GAF62 TitleText : ##GAF62Show

[#Line: DSP AmtTwoTitle]
    Option : GAF62 TitleBlank : ##GAF62Show

[#Line: DSP Totals]
    Option : GAF62 TitleBlank : ##GAF62Show

[!Line: GAF62 TitleBlank]
    Add   : Field : At Beginning : GAF62 StatePinF
    Local : Field : GAF62 StatePinF : Set as : ""

[!Line: GAF62 TitleText]
    Add   : Field : At Beginning : GAF62 StatePinF
    Local : Field : GAF62 StatePinF : Set as : "STATE / PIN"
    Local : Field : GAF62 StatePinF : Style  : Small Bold

;--------------------------- LEDGER LINE -----------------------------
[#Line: DSP AccLine]
    Option : GAF62 AccOpt : ##GAF62Show

[!Line: GAF62 AccOpt]
    Add : Field : At Beginning : GAF62 StatePinF

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