Electricity bill

Discussion in 'Free Source Codes' started by Rohit Khedar, Feb 13, 2023.

    
  1. Rohit Khedar

    Rohit Khedar Member


    HI Anyone expert when we select ledger then auto adjust all sub form field in default invoice
    this sub form where set if any expert help me
     

    Attached Files:

    gangstar likes this.


  2. Rohit Khedar

    Rohit Khedar Member


    can any one help me to complete this code
     


  3. Damodaran

    Damodaran New Member


    Where is the code, also explain the use case indetail
     


  4. Just Gagan

    Just Gagan New Member


    Yes sure you can share the code
     


  5. Rohit Khedar

    Rohit Khedar Member


    Anyone expert add this sub form format with storage in Ledger master and add it to invoice and Improve this Code and post again

    Code:
    ;; =========  Voucher Type Due Date Column narration Part ================ ;;
    
    [#Part :DBLLINE Narration]
        Add: Option: DBLLINENarrationOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
     
    [!Part :DBLLINENarrationOpt]
        Add :Line : Before: VCH NarrPrompt : DueDateLn, LateFeeLn, AftDueDtLn
     
    [Line: DueDateLn]
        Fields: Medium Prompt, DueDateFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"Due Date"
    ;    Local: Field: Medium Prompt: Invisible: ##SVvouchertype<>"ElectricityBill"
        Local: Field: Medium Prompt: Background : @@SV_VCHTYPE
        Local: Field: Medium Prompt: Color      :  @@SV_VCHCOLOR
        Local: Field: Medium Prompt: Style      : Normal Bold Italic
     
        Space Bottom: 0.1
        ;Border: Thin Top bottom
     
    [Field: DueDateFld]
        Use: Short Name Field
        Storage: DueDateStorage
        Set as: If $$IsEmpty:#VCHBilledQty Then "" Else #PlainVchDate + 15
        Set Always: Yes
        Skip: Yes
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Background : @@SV_VCHCOLOR
        Color      :  "Blue" ;@@SV_VCHTYPE
     
    [Line: LateFeeLn]
        Fields: Medium Prompt, LateFeeFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"Late Fees"
    ;    Local: Field: Medium Prompt: Invisible: ##SVvouchertype<>"ElectricityBill"
        Local: Field: Medium Prompt: Background : @@SV_VCHTYPE
        Local: Field: Medium Prompt: Color      :  @@SV_VCHCOLOR
        Local: Field: Medium Prompt: Style      : Normal Bold Italic
     
        Space Bottom: 0.1
     
    [Field: LateFeeFld]
        Use: Short Name Field
        Storage: LateFeeStorage
        Set as: #EIValueTotal*2%
        Set Always: Yes
        Skip: Yes
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Background : @@SV_VCHCOLOR
        Color      :  "Blue" ;@@SV_VCHTYPE
     
    [Line: AftDueDtLn]
        Fields: Medium Prompt, AftDueDtFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"After Due Date"
    ;    Local: Field: Medium Prompt: Invisible: ##SVvouchertype<>"ElectricityBill"
        Local: Field: Medium Prompt: Background : @@SV_VCHTYPE
        Local: Field: Medium Prompt: Color      :  @@SV_VCHCOLOR
        Local: Field: Medium Prompt: Style      : Normal Bold Italic
     
    [Field: AftDueDtFld]
        Use: Short Name Field
        Storage: AftDueDtStorage
        Set as: #EIValueTotal*102%
        Set Always: Yes
        Skip: Yes
     
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Background : @@SV_VCHCOLOR
        Color      :  "Blue" ;@@SV_VCHTYPE
    
    [System: UDF]
        DueDateStorage: String: 8500
        LateFeeStorage: String: 8600
        AftDueDtStorage: String: 8700
    Code:
    ;; ================= Voucher Type Modify Narration Field ================== ;;
    
    [#Field: VCH Narration]
        Add: Option: VCHNarrationOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHNarrationOpt]
        Set as: " Being " +$$String:#VCHStockItem +" Opening Reading was " + $$String:#VCHOpReding + " and Closing Reading is "    + $$String:#VCHClReding + " Total Consumption unit is " + $$String:#VCHBilledQty
        Background:   "Released Pale Yellow" ;@@SV_VCHTYPE
        Color: Blue;@@SV_VCHCOLOR
        Style: Normal Bold Italic    
    Code:
    ;; ================== Voucher Type Due Date Column Title ================== ;;
    
    [#Line: EI ColumnOne]
        Add: Option: EIColumnOneOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No 
     
    
    [!Line: EIColumnOneOpt]
        Add: Right Field: Before: VCH QtyTitle: VCH OpRedingTitle, VCH ClRedingTitle
        Local: Field: Default: Style: Normal Bold Italic
    
     
    [Field: VCH OpRedingTitle]
     
        Setas       : $$LocaleString:"Opening Reading"
        Style       : Small Bold
        Align       : Centre 
        Skip        : Yes
        Fixed       : Yes
        Background : @@SV_VCHCOLOR
        Color      :  "Leaf Green" ;@@SV_VCHCOLOR
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Width       : 12
     
    [Field: VCH ClRedingTitle]
     
        Setas       : $$LocaleString:"Closing Reading"
        Style       : Small Bold
        Align       : Centre 
        Skip        : Yes
        Fixed       : Yes
        Background : @@SV_VCHCOLOR
        Color      :  "Leaf Green" ;@@SV_VCHCOLOR
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Width       : 12
    Code:
    ;; =================== Voucher Type Inventory Info =================== ;;
    
    [#Line: EI InvInfo]
        Add: Option: EIInvInfoOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Line: EIInvInfoOpt]
        Add: Right Field: Before: VCH ActualQty: VCH OpReding, VCH ClReding
     
    [Field: VCH OpReding]
    
        Use         : Qty Field
        Width       : 12
        Set always  : Yes
        Storage     : OpRedingStorage
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Border: Thin Top Bottom
        Background    : Crystal Blue
     
    [Field: VCH ClReding]
    
        Use         : Qty Field
        Width       : 12
        Set always  : Yes
        Storage     : ClRedingStorage
    ;    Invisible: ##SVvouchertype<>"ElectricityBill"
        Border: Thin Top Bottom
        Background    : Crystal Blue
    
    [System: UDF]
        OpRedingStorage: Quantity: 1001
        ClRedingStorage: Quantity: 1002
    
    
    Code:
    ;; ================== Print Invoice Terms Part ========================= ;;
    
    [#Part: EXPINV Terms]
        Add: Line: EXPINV DueDateLn, EXPINV LateFeeLn, EXPINV AftDueDtLn
     
    [Line: EXPINV DueDateLn]
        Fields: Medium Prompt, EXPINV DueDateFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"Due Date"
     
    [Field: EXPINV DueDateFld] 
        Set as: $DueDateStorage
     
    [Line: EXPINV LateFeeLn]
        Fields: Medium Prompt, EXPINV LateFeeFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"Late Fees"
     
    [Field: EXPINV LateFeeFld] 
        Set as: $LateFeeStorage
     
    [Line: EXPINV AftDueDtLn]
        Fields: Medium Prompt, EXPINV AftDueDtFld
     
        Local: Field: Medium Prompt: Info: $$LocaleString:"After Due Date"
     
    [Field: EXPINV AftDueDtFld] 
        Set as: $AftDueDtStorage
    Code:
    ;;===================== Defaul field value ===========================;;
    
    [#Field: VCH BilledQty]
        ResetVal: If ($ClRedingStorage-$OpRedingStorage) < 0 Then 0 else ($ClRedingStorage-$OpRedingStorage)
     
         
    [#Field: VCH QtyTitle]
        Add: Option: VCHQtyTitleOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHQtyTitleOpt]
        Set as: $$LocaleString:"Consump"
        Background : @@SV_VCHCOLOR
        Color      :  "Blue"
     
    [#Field: VCH AmtTitle]
        Add: Option: VCHAmtTitleOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHAmtTitleOpt]
        Background : @@SV_VCHCOLOR
        Color      :  "Blue"
     
    [#Field: VCH RateTitle]
        Add: Option: VCHRateTitleOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHRateTitleOpt]
        Background : @@SV_VCHCOLOR
        Color :  "Blue"
     
    [#Field: VCH RateUnitsTitle]
        Add: Option: VCHRateUnitsTitleOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHRateUnitsTitleOpt]
        Background : @@SV_VCHCOLOR
        Color      :  "Blue"
    
    [#Field: VCH DiscTitle]
        Add: Option: VCHDiscTitleOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Field: VCHDiscTitleOpt]
        Background : @@SV_VCHCOLOR
        Color : "Red"
    
    
    [#Line: EXPINV Column1]
        Add: Option: EXPINV Column1Opt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Line: EXPINV Column1Opt]
        Add: Left Fields: After: EXPINV DescTitle: EXPINV OpReadingTitle, EXPINV ClReadingTitle
     
    [Field: EXPINV OpReadingTitle]
    
        Set as      : $$LocaleString:"Op Reading"
        Width       : 7.6 ;@@QtyWidth
        Style       : Small
        Align       : Centre
        Cells         : @@ExcelItemColumn
        Border      : Thin Left
     
    [Field: EXPINV ClReadingTitle]
    
        Set as      : $$LocaleString:"Cl Reading"
        Width       : 7.6;@@QtyWidth
        Style       : Small
        Align       : Centre
        Cells         : @@ExcelItemColumn
        Border      : Thin Left
     
    
    [#Line: EXPINV InvDetails]
        Add: Option: EXPINV InvDetailsOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Line: EXPINV InvDetailsOpt]
        Add: Left Field: After: EXPINV Desc: EXPINV OpReading, EXPINV ClReading
     
    [Field: EXPINV OpReading]
    
        Width       : 7.6;@@QtyWidth 
        Set as      : $OpRedingStorage
        Style       : Normal Bold
        Cells       : @@ExcelItemColumn
        Border      : Thin Left
     
    [Field: EXPINV ClReading]
    
        Width       : 8;@@QtyWidth 
        Set as      : $ClRedingStorage
        Style       : Normal Bold
        Cells       : @@ExcelItemColumn
        Border      : Thin Left
             
    
    ;; End of Code
    
    Code:
    ;; ================================= Voucher Form Sub Title ===================================== ;;
    
    
    [#Form: VCHBASIC Form]
        Add: Option: VCHBASICFormOpt: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
     
    [!Form: VCHBASICFormOpt]
    
         Add    : Part : Before    : VCH Title    :  Form SubTitle
    
     
            Local    : Field    :  Form SubTitle    : Info        : " Ajmer Vidyut Vitran Nigam Limited "
            Local    : Field    :  Form SubTitle    : Color         : ActiveWindow
            Local    : Field    :  Form SubTitle    : Style         : New Style
            Local    : Field    :  Form SubTitle    : Wide Space    : Yes
           ; Local    : Field    :  Form SubTitle    : Background    : @@SV_VCHCOLOR
    
    
    [Style: New Style]
        Font    : if $$SysInfo:IsWindows then "Verdana" else "Helvetica" 
        Use         : Large Bold
        Italic      : Yes
        Height      : 15
     
    
    
    Code:
    ;; ============================= Sub form Formate ===================================== ;;
    
    
    [#Part:    VCH narration]
     
    Add: Option:    Part AutoChallan: If ##SVVoucherType = "Electricity Bill" Then Yes Else No
    
    [!Part:    Part AutoChallan]
     
    Add:    Line:    At Beginning:    Line AutoChallan
    
    [Line:    Line AutoChallan]
     
    Field:    Medium Prompt, Field AutoChallan
    
    Local:    Field: Medium Prompt:    Set as:    $$LocaleString:"Electricity Bill :"
    Local:  Field: Medium Prompt:   Background : @@SV_VCHTYPE
    Local:  Field: Medium Prompt:   Color      :  @@SV_VCHCOLOR
    Local:  Field: Medium Prompt:   Style      : Normal Bold Italic
    ;Invisible : If Not @@IsSales Then Yes Else No
    
    
    [Field:    Field AutoChallan]
     
    Use      : Logical field
    Storage  : VchTypeConfirm
      Type : String
       Set as : if $$isempty:$$value then "No" else $$Value
        Set Always : Yes
         ;Inactive : Not @@IsSales
         ; Invisible : If Not @@IsSales Then Yes Else No
    Background : @@SV_VCHCOLOR
    Color      :   @@SV_VCHTYPE
      Sub Form : ElectricityBillRpt: $$Value
    [System : Formula]
    VchType   : $$IsSales:$Parent
    NewAllow   : $VchTypeConfirm1:VoucherType:$VoucherTypeName
    [System : UDF]
    VchTypeConfirm1 : Logical  : 1781
    
    [Report: ElectricityBillRpt]
    
    
    Title : "Electricity Bill"
    Use    : DSP Template
    Form   : Global Form
      Object : Voucher : ##SVVoucherType
    
    [Form:    Global Form]
    
    
    Parts       : RPTPart_A, RPTPart_B, RPTPart_C, RPTPart_D, RPTPart_E, RPTPart_F, RPTPart_G, RPTPart_H, RPTPartbody_A, RPTPartbody_B, RPTPartbody_C
    Button       : Print Button
    Width       : 70% Screen
    Height       : 80% Screen
    Background : FormClr
    
    Space Left  : 1
    Space Right : 1
    
    ;Space Top   : if $$InPrintMode  then 0.5  else ""
    ;Space Left  : if $$InPrintMode  then 0.5  else ""
    ;Space Right : if $$InPrintMode  then 0.5  else ""
     
    
    ;;=========================== RPTPart_A ===============;
    
    
    [Part:    RPTPart_A]
    
      Parts: RPTPart_A Left, RPTPart_A Right
       Border: Thin box
       Background: white
    
    [Part:    RPTPart_A Left]
    
      Lines : RPTPart_A LeftA, RPTPart_A LeftB, RPTPart_A LeftC
      Width : 65% Screen
      Border: thin right
       [Line: RPTPart_A LeftA] 
       Space Top:    0.5
    
       Field:    RPTPart_A LeftA
    
    
    [Field:    RPTPart_A LeftA]
    Info  : "Ajmer Vidyut Vitran Nigam Limited"
    Align : Center
       Type : String
        Color : Red
         Style : Header Title
         ; Wide Space: Yes
           Full Width: Yes
    
    
    [Line:    RPTPart_A LeftB]
    Space Top: 0.5 
    
    Field:    RPTPart_A LeftB
    
    [Field:    RPTPart_A LeftB]
    
    Info  : "V.B.M.W. Road Ajmer - 305001"
    Align : Center
       Type : String
        Color : "Blue"
         Style : Small Italic
         Full Width: Yes
    
    
    [Line:    RPTPart_A LeftC]
     
    Space Top: 0.5 
    Field:    RPTPart_A LeftC
    
    [Field:    RPTPart_A LeftC]
    
    Info  : "Electricity Consumption Bill ( Consumer Copy )"
    Align : Center
       Type : String
       ; Color : " Geranium "
         Style : Small Italic
         FullWidth: yes
    
    
    
    
    [Part :    RPTPart_A Right]
    Lines:    RPTPart_A RightA, RPTPart_A RightB, RPTPart_A RightC
    Width: 35% Screen
    
    
    [Line:    RPTPart_A RightA]
    Space Top:0.5 
    
    Field: Medium Prompt, RPTPart_A RightA
    
    Local: Field: Medium Prompt: Info  : " Due Date "
    Local: Field: Medium Prompt: Style: Normal Bold Italic
    Local: Field: Medium Prompt: Wide Space: Yes
    
    [Field:    RPTPart_A RightA]
    
    Set as  : If $$IsEmpty:#VCHBilledQty Then "" Else #PlainVchDate + 15
    
    Align : Center
       Type : String
        Color : Blue
         Style : Normal
          FullWidth: yes
            Skip: Yes
     
    
    [Line: RPTPart_A RightB] 
    Space Top: 0.5
    ;Indent: 4
    Field:    Medium Prompt, RPTPart_A RightB
    
    Local: Field: Medium Prompt: Info  : " Late Fees "
    Local: Field: Medium Prompt: Style: Normal Bold Italic
    Local: Field: Medium Prompt: Wide Space: Yes
    
    [Field:    RPTPart_A RightB]
    Use : Amount Field
    Set as  : #EIValueTotal*2%
    Align : Center
      ; Type : String
        Color : Blue
         Style : Normal
          FullWidth: yes
            Skip: Yes
            Format  : "Show Base Currency"
    
    
    [Line:    RPTPart_A RightC] 
    Space Top: 0.5
    ;Indent: 8
    Field:    Medium Prompt, RPTPart_A RightC
    
    Local: Field: Medium Prompt: Info  : " After Due Date "
    Local: Field: Medium Prompt: Style: Normal Bold Italic
    Local: Field: Medium Prompt: Wide Space: Yes
    
    [Field:    RPTPart_A RightC]
    Use : Amount Field
    Set as  : #EIValueTotal*102%
    Align : Center
      ; Type : String
        Color : Blue
         Style : Normal
          FullWidth: yes
           Skip: Yes
           Format  : "Show Base Currency"
    
    
    
    ;;================================== RPTPart_B ======================;
    
    [Part:    RPTPart_B]
    Lines: RPTPartempty
    Background : Light Grey
    Print BG:Light Grey
    
    [Line: RPTPartempty] 
    
    Fields: Simple Prompt
    
    Local: Field: Simple Prompt : Set as  : ""
    
    ;;================================= RPTPart_C =====================;
    
    [Part :    RPTPart_C]
    
       Parts : RPTPart_C Left, RPTPart_C Right
       Border: thin Box
       Background: white
    
    
    [Part:    RPTPart_C Left]
    
    Lines :    RPTPart_C LeftA, RPTPart_C LeftB
    Width : 65% Screen
      Border: thin right
    
    [Line:    RPTPart_C LeftA]
    Space Top:0.2 
    
    Fields: Simple Prompt, Global VCHNo
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as   : $$localestring:"Bill Issue Date :"
      Local: Field: Simple Prompt: Width: 20
       Local: Field: Simple Prompt: Style    : Small bold
        Local: Field: Simple Prompt: Color    : Geranium
    [Field:    Global VCHNo]
    
    Set as: $Date     ;;setting the voucher number storage value
    Style :    small
      Skip  : Yes
       Indent:    2
        Color : Blue
    fullwidth: yes
    
    [Line:    RPTPart_C LeftB]
    Space Top: 0.2
    
    Fields: Simple Prompt, Global VCHDate
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : $$localestring:"Bill Month :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field: Global VCHDate]
    
    Set as: $Date  ;;setting the date storage value to a field
    Skip  : Yes
      Style :    small
       Indent:    2
        Color : Blue
    fullwidth: yes
    
    
    
    [Part:    RPTPart_C Right]
    
    Lines:    RPTPart_C RightA, RPTPart_C RightB, RPTPart_C RightC
    Width: 35% Screen
    
    [Line:    RPTPart_C RightA]
    
    Fields: Simple Prompt, Global Trans Mode
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : $$localestring:"Consumer K. No. :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    [Field: Global Trans Mode]
    
    Set as:    " 123456789012 "
    Skip  : Yes
      Style : small 
        Color : Blue
    fullwidth: yes
    
    
    [Line:    RPTPart_C RightB]
    
    Fields: Simple Prompt, DateofSupply 
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : $$localestring:"Bill Number :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field:    DateofSupply]
    
    Set as:    $VoucherNumber
    Skip  : Yes
      Style : small 
       Color : Blue
    fullwidth: yes
    
    
    
    [Line:    RPTPart_C RightC]
    
    Fields: Simple Prompt, Place of Supply
     
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : $$localestring:"Service Number :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    
    [Field: Place of Supply ]
    
    Set as     : "2670000"
    Skip  : Yes
      Style : small 
       Color : Blue
    fullwidth: yes
    
    
    ;;================================= RPTPart_D ==================;
    
    [Part:    RPTPart_D]
    
    Lines:    RPTPartempty1
    Background : Light Grey
    
    
    [Line:    RPTPartempty1] 
    
    Fields: Simple Prompt
    
    Local: Field: Simple Prompt : Set as  : ""
    
    ;;================================== RPTPart_E ===============;
    
    [Part :    RPTPart_E]
    Lines    : RPTPart_E A, RPTPart_E B
    Print BG:Light Grey
    Background: white
    Width    : 40% Screen
    Border  : Thin box
    
    [Line:    RPTPart_E A] 
    Space Top: 0.1
    
    Fields    : Simple Prompt, Global State
    
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : $$localestring:"Accepted Category :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field:    Global State]
    
    Set as:    "Domestic"
    Skip  : Yes
      Style : small 
       Color : Blue
    fullwidth: yes
    
    
    
    [Line:    RPTPart_E B]
    Space Bottom: 0.1
    
    Fields    : Simple Prompt, Global Code
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as : "Sanction Lode :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field:    Global Code]
    
    Set as:    "2.00 KW"
    Skip  : Yes
      Style : small 
       Color : Blue
    fullwidth: yes
    
    ;;=============================== RPTPart_F =============;
    
    
    [Part:    RPTPart_F]
    Lines:    RPTPart4Line1
    Width: 40% Screen
    
    [Line:    RPTPart4Line1]
     
    Space Top:    0.5
    Space bottom:    0.5
    
    Fields    : Simple Prompt, Global Shipped
    
    Local: Field: Default: Type: String
    
    Local: Field: Simple Prompt: Set as  : $$localestring:"Details of Consignee :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Blue
    
    
    [Field:    Global Shipped]
    
    Set as:    "Shipped to"
    Skip  : Yes
      Style : Small bold
       Color : Blue
    fullwidth: yes
    
    
    ;;============================================
    
    
    [Part :    RPTPart_G]
    Parts : RPTPart_G Left, RPTPart_G Right
    Border: Thin box
    
    
    [Part :    RPTPart_G Left]
    Lines: RPTPart_G LeftA, RPTPart_G LeftB, RPTPart_G LeftC
    Width: 65% Screen
    Background: white
    Border: Thin Right
    
    [Line:    RPTPart_G LeftA]
    
    Fields        : Simple Prompt, Global PartyName
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : $$localestring:"Name :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Normal bold Italic
       Local: Field: Simple Prompt: Color    : Blue
    
    [Field:    Global PartyName]
    
    Set as:    $PartyLedgerName
    Skip  : Yes
      Style : Normal Italic
       Color : Blue
    fullwidth: yes
    
    
     
    [Line: RPTPart_G LeftB]
    Space Bottom: 1
     
    Fields        : Simple Prompt, Global PartyAddress
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Info       : $$LocaleString:"Address"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Normal Italic
       Local: Field: Simple Prompt: Color    : Blue
     
    
    
    [Field:    Global PartyAddress]
     
    Set as:    $$FullList:BasicBuyerAddress:$BasicBuyerAddress
    Skip  :    Yes
      Style : Normal Italic
       Color : Blue
        Line:    0
    fullwidth: yes
    
    
    [Line: RPTPart_G LeftC]
    Border : Thin Top
     
    Fields    : Simple Prompt, Global GSTIN
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : $$localestring:"GSTIN No. :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Blue
    
    
    
    [Field:    Global GSTIN]
     
    ;Set as:    $PartyGSTIN:Ledger:$PartyName ;;;$IncomeTaxNumber:Ledger:$BasicBuyerName
    Skip  :    Yes
      Style : Normal Italic
       Color : Blue
     
    fullwidth: yes
    
    
    
    
    
    [Part :    RPTPart_G Right]
    Lines:    RPTPart_G RightA, RPTPart_G RightB, RPTPart_G RightC, RPTPart_G RightD
    ;Width: 35% Screen
    Background: white
    
    [Line:    RPTPart_G RightA]
    
    Fields: Simple Prompt,  Global State Name 
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : "Billing Status :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field:    Global State Name]
    
    Set as:    "Regular"
    Skip  :    Yes
      Style : Small
       Color : Blue 
    fullwidth: yes
    
    
     
    [Line: RPTPart_G RightB]
     
    Fields        : Simple Prompt, Global bill
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : "Feeder Code :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field    :    Global bill]
     
    Set as:  "11K1018744"
    Skip    :    Yes
    Style : Small
       Color : Blue 
    fullwidth: yes
    
    
    [Line: RPTPart_G RightC]
     
    Fields        : Simple Prompt, Tarif Code
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : "Tarriff Code :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field    :    Tarif Code]
     
    Set as:  "1100"
    Skip    :    Yes
    Style : Small
       Color : Blue 
    fullwidth: yes
    
    
    [Line: RPTPart_G RightD]
     
    Fields        : Simple Prompt, Total Month
    
    Local: Field: Default: Type: String
    Local: Field: Simple Prompt: Set as  : "Total Month :"
    Local: Field: Simple Prompt: width: 20
      Local: Field: Simple Prompt: Style    : Small bold
       Local: Field: Simple Prompt: Color    : Geranium
    
    
    [Field    :    Total Month]
     
    Set as:  "2 (Month)"
    Skip    :    Yes
    Style : Small
       Color : Blue 
    fullwidth: yes
    
    ;;======================================================================;
    
    [Part:    RPTPart_H]
    
    Lines:    RPTPart_H
    ;Background : Light Grey
    
    
    [Line:    RPTPart_H] 
    
    Fields: Simple Prompt
    
    Local: Field: Simple Prompt : Set as  : ""
    
    
    ;;=======================================================================;
    
    [Border:box]
        Top:Thin
        Bottom:Thin
        ;Left:Thin
        ;Right:Thin
    
    
    [Part:RPTPartbody_A]
    
     
            Line:invcoltitle
            Border : column titles
                    Background: Light Grey
    
            [Line:invcoltitle]
                Left Field:Sr, Prod Name
                Right Field:HSN Code, INV GST rate, Inv Qty, Inv Rate, Inv Dper, Inv Damt, Taxableam
                            Local: Field: Default: Skip    :    Yes
    
                [Field:Sr]
                    Border:Thin left
                    Width:3
                    Align:Center
                    Style: Small Bold
                    Set as:"Sr."
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                [Field:Prod Name]
                    Border:Thin left
                    Width:35
                    Full Width:Yes
                    Align:Left
                    Indent:5
                    Style:Small Bold
                    Print BG:Light Grey
                                    Print FG:Blue
                    Set as:"Product Name"
                                    Color: Blue
    
                [Field:HSN Code]
                    Border:Thin left
                    Width:12
                    Align:Center
                    Style:Small Bold
                    Set as:"Op Reading"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                [Field:INV GST rate]
                    Border:Thin left
                    Width:12
                    Align:Center
                    Style:Small Bold
                    Set as:"Cl Reading"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                [Field:Inv Qty]
                    Border:Thin left
                    Width:12
                    Align:Center
                    Style:Small Bold
                    Set as:"Consumption"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                [Field:Inv Rate]
                    Border:Thin left
                    Width:8
                    Align:Center
                    Style:Small Bold
                    Set as:"Rate"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                            [Field:Inv Dper]
                    Border:Thin left
                    Width:8
                    Align:Center
                    Style:Small Bold
                    Set as:"Per."
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                             [Field:Inv Damt]
                    Border:Thin left
                    Width:6
                    Align:Center
                    Style:Small Bold
                    Set as:"Disc%"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Blue
    
                [Field:taxableam]
                    Border:Thin left Right
                    Width:15
                    Align:Center
                    Style:Small Bold
                    Set as:"Taxable Amt"
                    Print BG:Light Grey
                                    Print FG:Blue
                                    Color: Geranium
    
                                               
    [Part:RPTPartbody_B]
    
            Line:inventries
                    Repeat:Inventries:Inventory entries
                    ;Border: Thin Right
                    Background: white
                    [Line:inventries]
                Use:inv col title
                Local:Field:Sr:Set as:$$Line
                Local:Field:Prod Name:Lines:2
                Local:Field:Prod Name:Delete:Indent
                Local:Field:Prod Name:Set as:$StockItemName
                local:Field:HSN Code:Set as:$OpRedingStorage
                Local:Field:INV GST rate:Set as:$ClRedingStorage
                Local:Field:Inv Qty:Use:number field
                Local:Field:Inv Qty:Set as:$billedQty
                Local:Field:Inv Rate:Use:number field
                Local:Field:Inv Rate:Set as:$$Number:$rate
                            ;Local:Field:Inv Dper:Use: Rate Units Field
                            Local:Field:Inv Dper:Set as: $BaseUnits:StockItem:$StockItemName
                            Local:Field:Inv Damt:Use:number field
                            Local:Field:Inv Damt:Set as:$$Number:$Discount
                Local:Field:Taxableam:Use:Amount field
                Local:Field:Taxableam:Set as:$Amount
                Empty:$Ledgername=$PartyLedgerName
    
                Local:Field:Sr:Style:Verdana Normal
                Local:Field:Prod Name:Style:Verdana Normal
                local:Field:HSN Code:Style:Verdana Normal
                Local:Field:INV GST rate:Style:Verdana Normal
                Local:Field:Inv Qty:Style:Verdana Normal
                            Local:Field:Inv Dper:Style:Verdana Normal
                            Local:Field:Inv Damt:Style:Verdana Normal
                Local:Field:Inv Rate:Style:Verdana Normal
                Local:Field:Taxableam:Style:Verdana Normal
    
                Local:Field:Sr:Delete:Print BG
                Local:Field:Prod Name:Delete:Print BG
                local:Field:HSN Code:Delete:Print BG
                Local:Field:INV GST rate:Delete:Print BG
                Local:Field:Inv Qty:Delete:Print BG
                Local:Field:Inv Rate:Delete:Print BG
                            Local:Field:Inv Dper:Delete:Print BG
                            Local:Field:Inv Damt:Delete:Print BG
                Local:Field:Taxableam:Delete:Print BG
    
                ;Local:Field:Sr:Border:thin Left right
                ;Local:Field:Prod Name:Border:thin right
                ;local:Field:HSN Code:Border:thin right
                ;Local:Field:INV GST rate:Border:thin right
                ;Local:Field:Inv Qty:Border:thin right
                ;Local:Field:Inv Rate:Border:thin right
                            ;Local:Field:Inv Dper:Border:thin right
                            ;Local:Field:Inv Damt:Border:thin right
                ;Local:Field:Taxableam:Border:thin right
    
    
    
    [Part:RPTPartbody_C]
    
            Line:Inv Total
                    ;Border: Thin Right
                    Background: Light Grey
    
                    [Line:Inv Total]
                ;Space Bottom:1
                Use:inv col title
                Local:Field:Sr:Set as:""
                Local:Field:Prod Name:Set as:""
                local:Field:HSN Code:Set as:"Total"
                            local:Field:HSN Code:Color: Blue
                Local:Field:INV GST rate:Set as:""
                            Local:Field:INV GST rate: Print FG : Blue
                Local:Field:Inv Qty:Use:number fild
                Local:Field:Inv Qty:Set as:$$CollQtyTotal:InventoryEntries:$BilledQty
                Local:Field:Inv Rate:Set as:""
                            Local:Field:Inv Dper:Set as:""
                            Local:Field:Inv Damt:Set as:""
                Local:Field:Taxableam:Use:Amount field
                Local:Field:Taxableam:Set as:$$CollAmtTotal:InventoryEntries:$Amount
                            Local:Field:Taxableam:Format  : "Show Base Currency"
                            Local:Field:Taxableam:Print BG:light Grey
                            Local:Field:Taxableam:Print FG:Red
                            Local:Field:Taxableam:Color: Red
    
                Local:Field:Sr:Delete:Print BG
                Local:Field:Prod Name:Delete:Print BG
                local:Field:HSN Code:Delete:Print BG
                Local:Field:INV GST rate:Delete:Print BG
                Local:Field:Inv Qty:Delete:Print BG
                Local:Field:Inv Rate:Delete:Print BG
                            Local:Field:Inv Dper:Delete:Print BG
                            Local:Field:Inv Damt:Delete:Print BG
                   ;Local:Field:Taxableam:Delete:Print BG
                            Local:Field:Taxableam:Align:Right
    
    Border: totals
     


  6. ch ruchitha

    ch ruchitha Member


    Any doubt in this code ?
    Can I solve it
     


  7. Mahesh Sethi

    Mahesh Sethi Member


    Hi Rohit Ji,

    Pls Try This. its for example, Hope it will help full to you.

    Mani

    [#Part: MST LED Explode Sundry] ;; (Here I want sundry debtors or its sun groups ledger)
    Add : Lines : After : ACADEMICDETAILS : FatherName,MotherName,ScholerNo,DOB,Gender,

    [Line :FatherName]
    Field : Medium Prompt ,FatherName
    Local : Field : Medium Prompt : Info:"Father Name"
    ;;Local : Field : Medium Prompt : Color : Block
    Space Top : 5 MMS
    Border : Thin Top
    [Line :MotherName]
    Field : Medium Prompt ,MotherName
    Local : Field : Medium Prompt : Info:"Mother Name"
    ;;Local : Field : Medium Prompt : Color : Block
    [Line : ScholerNo]
    Field : Medium Prompt ,ScholerNo
    Local : Field : Medium Prompt : Set as :"Scholer No"
    ;;Local : Field : Medium Prompt : Color : Block
    [Line : DOB]
    Field : Medium Prompt ,DOB
    Local : Field : Medium Prompt : Set as :"DOB"
    [Line : Gender]
    Field : Medium Prompt ,Gender
    Local : Field : Medium Prompt : Set as :"Gender"


    [Field : FatherName]
    Use : Name Field
    Storage : FathNam
    Color : Blue
    Case : Proper Case
    [Field : MotherName]
    Use : Name Field
    Storage : MotherNam
    Color : Blue
    Case : Proper Case
    [Field : ScholerNo]
    Use : Name Field
    Storage : ScholerNo
    Color : Blue
    [Field : DOB]
    Use : uni Date Field
    Storage : Birth Date
    Color : Blue

    [Field : Gender]
    Use : Name Field
    Storage : Gen
    Color : Blue


    [System : UDF]
    FathNam : String : 10001
    MotherNam : String : 10008
    ScholerNo : String : 10002
    Birth Date : Date : 10003
    Gen : String : 10007
     


  8. Rohit Khedar

    Rohit Khedar Member


    thanks
    my field is too much and there is not much space in ledger master so i want add my sub form in ledger master and when I print invoice of this ledger voucher then same field value should be pickup in this invoice
     


  9. Rohit Khedar

    Rohit Khedar Member


    Thanks
    Ruchita main all Field ko nahi main es sub form ko ledger master me add karna chahta hu and screenshot wale format me ledger master me ji sub form h iski sabhi Field value es screenshot format me pickup honing chahiy
     

    Attached Files:



  10. Mahesh Sethi

    Mahesh Sethi Member


    Hi Rohit,

    Try This..........



    [#Part: MST LED Explode Sundry] ;; (Here I want sundry debtors or its sun groups ledger)
    Add : Line : At End : Details,
    [Line : Details]
    Field : Long Prompt, DetailsSetings
    Local : Field : Long Prompt : Set As : " Details :"
    [Field : DetailsSetings]
    use : Logical Field
    Set aS : No
    Width:10
    Sub Forms : Details : $$Value
    [Report : Details]
    Form :Details
    [Form :Details]
    Height:99 % Page
    Width:50 % Page
    Part :ItemRateSF
    [Part :ItemRateSF]

    Line : ACCDETHEAD, ;; Here Add Your required Multipal Lines & Fields
    [Line : ACCDETHEAD]
    Field : MEdium Prompt,
    Local:Field:Medium Prompt:Set as:"Detail's"
    Local:Field:Medium Prompt:Width : 50% Page
    Local:Field:Medium Prompt:Align :Center
    Local:Field:Medium Prompt:Style :Large Bold
    Local:Field:Medium Prompt:Color :Red
     


  11. Rohit Khedar

    Rohit Khedar Member


    Maine full code post kar rakha ha agar aapse modify ho sakta ha to modify karlo and post kardo
     


  12. NainaSiraj

    NainaSiraj Member


    KIDLY SIR AGR AP I HI FILE PROPER SORTING MAIN CODE POST KER DAIN TO I WILL TRY TO MODOFY
    THANKS
     


  13. NainaSiraj

    NainaSiraj Member


    sir i want to modify this code and i want to add two filds kidly see screen shot adn fields plzz
     

    Attached Files:

    • add.JPG
      add.JPG
      File size:
      30.9 KB
      Views:
      114


  14. Mahesh Sethi

    Mahesh Sethi Member


    Yes...... What do you want . Ping me on my what's up no. 9826026109
     


  15. NainaSiraj

    NainaSiraj Member


    THANK U SIR FOR FAVORABLE REPLY

    SORRY I CANT PM YOU BCOZ I CANT SHARE MY PERSONAL NUMBER

    I HAVE 2 QUERIES ABOIT THIS CODE

    I WANT TO ADD 2 FIELDS

    FIELD 1
    +FIELD2
    TOTAL
     


  16. nasir

    nasir Member


    hi Good Afternoon

    i have a updated code for electricity bill
     


  17. nasir

    nasir Member


    THANKS GOD
    I HAVE DONE ELECTRICITY BILL WITH THE HELP OF THIS CODE
     

    Attached Files:

    Rohit Khedar likes this.


  18. Rohit Khedar

    Rohit Khedar Member


    Very nice Share code on rohit_khedar@yahoo.co.in
     


  19. nasir

    nasir Member


    THANKS

    I AVE 1 QUERY CAN JU HELP ME PLZZ

    upload_2023-6-14_14-15-9.png
     


  20. Rohit Khedar

    Rohit Khedar Member



  21. nasir

    nasir Member


    FOR SECOND QUERY I ALSO NEED CODE
     


Share This Page