Ledger Sub Total Not Working After Invoice Customization

Discussion in 'Free Source Codes' started by Sanjay preethi, Apr 15, 2021.

    

  1. Any One Help Me....

    ;;;;My Code Below;;;;;

    [Style:O9]
    Font:Calibri (Body)
    Height:9

    [Style:O9B]
    Use:O9
    Bold: Yes

    [Style:O11B]
    Font: Berlin Sans FB Demi
    Height:15
    Bold: Yes
    ;Berlin Sans FB Demi
    [Style:O11BC]
    Font: Berlin Sans FB Demi
    Height:15
    Bold: Yes
    [Style:O11BCD]
    Font: Arial;Berlin Sans FB Demi
    Height:11
    ;Bold: Yes

    [Style:O11BCDb]
    Font: Arial;Berlin Sans FB Demi
    Height:13
    Bold: Yes
    [Style:O11BCDT]
    Font: Arial;Berlin Sans FB Demi
    Height:20
    Bold: Yes
    [Style:O11BCDTi]
    Font: Arial;Berlin Sans FB Demi
    Height:10
    ;Bold: Yes
    [Style:O11BCDTT]
    Font: Arial;Berlin Sans FB Demi
    Height:14
    Bold: Yes

    [#Form: Sales Color]
    Option: OTS Customized Invoice: Yes

    [!Form:OTS Customized Invoice]
    Delete : Print
    Add : Print : OTS Custom Invoice

    [Report :OTS Custom Invoice]
    Use : Printed Invoice
    Delete: Form : Printed Invoice
    Form : OTS Custom Invoice

    [Form:OTS Custom Invoice]
    Space Top : 0.25 inch
    Space Right : 0.25 inch
    Space Left : 0.50 inch
    Space Bottom: 0.25 inch

    Part: OTS Opening Page Break, OTS Invoice Body
    Bottom Part:OTS Bottom Part, OTS Bottom Part4.0
    Page Break : OTS Closing Page Break, OTS Opening Page Break

    [Part:OTS Closing Page Break]
    Lines :OTS Closing Page Break Line

    [Line: OTS Closing Page Break Line]
    Fields : Simple Field
    Local : Field: Simple Field : Set As : "Continued..."
    Local : Field: Simple Field : FullWidth : Yes
    Local : Field: Simple Field : Align : Right
    Border : Full Thin Top

    ;;;;;;;;;;;;;;;;;;;;;;;OTS Opening Page Break;;;;;;;;;;;;;;;;;;;;;;;;;;;

    [Part:OTS Opening Page Break]
    Part: OTS Invoice Title, OTS Body Coloumns Title
    Vertical: Yes

    [Part: OTS Invoice Title]
    Line: OTS Invoice Title


    [Line:OTS Invoice Title]
    ;Field: Simple Field
    Field:Name Field
    Local: Field: Name Field: Set as: "ESTIMATE"
    Local: Field: Name Field: Style: O11BCDT
    Local: Field: Name Field: Align:Center
    Local: Field: Name Field: Full Width: Yes

    Space Top: 0.25
    Space Bottom: 0.25

    Border:Thin Box

    ;;;;;;;;;;;;;;;;;;;;;;;INVOICE BODY STARTS;;;;;;;;;;;;;;;;;;;;;;;;;;
    [Part:OTS Body Coloumns Title]
    Line: OTS Coloumns Title1;, OTS Coloumns Title2
    Border: Thin Cover
    Common Border: Yes

    [Line: OTS Coloumns Title1]

    Use: OTS Invoice Body
    Local: Field: Default: Type: String
    Local: Field: Default: Style: O11BCDTT
    Local: Field: Default: Align: Center
    Local: Field: Default:Line:1
    Local: Field: OTS SrNo: Set as: "S.NO"
    Local: Field: OTS Description:Set as:"DESCRIPTION"
    Local: Field: OTS Qty: Set as:"QTY"
    Local: Field: OTS Rate: Set as:"RATE"
    Local: Field: EXPINVAmount: Set as:"AMOUNT"



    [Part:OTS Invoice Body]
    Line: OTS Invoice Body
    Repeat:OTS Invoice Body: Inventory Entries
    Bottom Line: OTS Coloumn Total
    Border: Thick Cover
    Scroll: Vertical
    Float: No
    Common Border: Yes

    [Line: OTS Invoice Body]
    Field: OTS SrNo, OTS Description
    Right Field: OTS Qty, OTS Rate, EXPINVAmount
    Local: Field: OTS SrNo: Width:6
    Local:Field:default :Style:O11BCDTi
    Local: Field: OTS Qty: Width:17
    Local: Field: OTS Rate: Width: 18
    Local: Field: OTS Per: Width: 3
    Local: Field: OTS Rate: Align:Right
    Local: Field: OTS Rate:Space Right:1
    Local: Field: OTS Qty: Align:Right
    Local: Field: OTS Qty:Space Right:1
    Local: Field: EXPINVAmount: Width: 22.7
    Local: Field: EXPINVAmount: Space Right:1
    Local: Field: OTS SrNo: Border: ThiN Right
    Local: Field: OTS SrNo:Align:Center
    Local: Field: OTS Qty: Border: Thin Left
    Local: Field: OTS Rate: Border: Thin Left
    Local: Field: OTS Per: Border: Thin Left

    Local: Field: EXPINVAmount: Border: Thin Left
    Space Top: 0.15

    [Field:OTS SrNo]
    Use: Simple Field
    Set as: $$Line
    Style: O9

    [Field:OTS Description]
    Use: Simple Field
    Style: O9
    Set as: $StockItemName
    Full Width: Yes
    Line: 0

    [Field:OTS Qty]
    Use: Simple Field
    Set as: $BilledQty
    Style:O9

    [Field:OTS Rate]
    Use: Rate Price Field
    Set as: $Rate
    Style:O9
    [Field:OTS Per]
    Use: Name Field
    Set as: $BaseUnits:StockItem:$StockItemName
    Style:O9

    [Field:Gross]
    Use: Amount Field
    Set as: $Amount
    Style:O9

    [Line:OTS Coloumn Total]
    Use:OTS Invoice Body
    Border: Thin Top Bottom
    Local: Field:default:Style:O11BCdb
    Local: Field: OTS SrNo: Set as: ""
    Local: Field: OTS Description:Set as:"Total"
    Local: Field: OTS Qty: Set as:$$collqtytotal:inventoryentries:$billedqty
    Local: Field: OTS Rate: Set as:""
    Local: Field: EXPINVAmount: Set as:$$CollAmtTotal:InventoryEntries:$Amount

    ;;;;;;;;;;;;;;;;OTS Bottom Part;;;;;;;;;;;;;;;;;;;;;;;

    [Part:OTS Bottom Part]
    Part:OTS Bottom Part 1
    Vertical: Yes

    [Part:OTS Bottom Part 1]
    Left Part: OTS Bottom Part 1 Left
    Right Part: OTS Bottom Part 1 Rightss
    Border: Thin Left Right
    ;Height: 15 mm
    [Part:OTS Bottom Part 1 Left]
    Line:OTS Bottom Part 1 Left

    [Line:OTS Bottom Part 1 Left]
    Field:OTS Bottom Part 1 Left

    [Field:OTS Bottom Part 1 Left]
    Set as:""
    [Part: OTS Bottom Part 1 Rightss]
    Line: OTS Invoice Ledger Entries
    Repeat: OTS Invoice Ledger Entries:LedgerEntries
    Common Border: Yes
    ;Border: Thick Left
    Space Right:1

    [Line: OTS Invoice Ledger Entries]
    Field: Name Field, EXPINV AccAmount,EXPINVSubTot
    Local: Field: Name Field: Set as:$LedgerName
    Local: Field: Name Field: Style: O11BCD
    Local: Field: Name Field: Width:32.70
    Local: Field: Name Field: Align: Right
    Remove if: $LedgerName contains $PartyLedgerName
    Space Top:0.25
    Options : EXPINV PrevSubTot : @@IsExciseDuty
    Explode : EXPINV AccSubTotal My : Yes


    [Part: EXPINV AccSubTotal My]

    Line : EXPINV AccSubTotal My


    [Line: EXPINV AccSubTotal My]

    Right Fields : EXPINV AccSubTot

    [#Field: EXPINV PrevSubTot]

    Type : Amount : Base
    Set as : $$PrevLine:#EXPINVSubTot
    Invisible : Yes

    [#Field: EXPINV AccSubTot]

    Use : Amount Forex Field
    Set as : #EXPINVSubTot
    Border : Thin Top : NOT $$IsSysName:$LedgerName
    Inactive : $$IsSysName:$LedgerName
    Style : Normal
    Option : EXPINV_InBaseCurr : @@IsGSTVchInBasecurrency OR (##SVRuleinBaseCurrency AND @@IsExciseTraderOn AND $$IsMultiCurrencyOn AND NOT @@VTYPHasNoExciseUnit)

    [#Field: EXPINV SubTot]

    Use : Amount Forex Field
    Set as : $$SignedAmount:mad:LocSubTotal:mad:@VchOpposite
    LocSubTotal : $$NettAmount:mad:InvTotal:$$SubTotal:EXPINVAccAmount
    InvTotal : $$Total:EXPINVAmount
    Inactive : $$IsSysName:$LedgerName
    Invisible : Yes



    ;;;;;;;;;;;;;;;;;;;;;;;;;;;Invoice Customization Code End;;;;;;;;;;;;;;;;;;;;;;
    [Part:OTS Bottom Part4.0]
    Part:OTS Bottom Final part
    Vertical: Yes



    [Part:OTS Bottom Final part]
    Right Part: OTS Signature1
    Left Part: OTS Terms and Conditions1
    Border: Thin Box
    [Part:OTS Terms and Conditions1]
    Line: OTS01
    Width: 70 % Page
    Space Left:1
    [Line: OTS01]
    Field: Simple Field,Name Field
    Local: Field: Simple Field: Set as: "PrePared"
    Local: Field: Simple Field: Style: O11BCD
    Local: Field: Simple Field: Width: 40
    Local: Field: Name Field: Set as: "Checked"
    Local: Field: Name Field: Style: O11BCD
    Local: Field: Name Field:Align:Right
    Space Top: 0.25

    [Part:OTS Signature1]
    Line: OTS For, OTS Authorised
    ;Border:thick left
    Space Right:1
    [Line:OTS For]
    Right Field: Simple Field
    Local: Field: Simple Field: Set as: "For" +" "+ @@CmpMailName
    Local: Field: Simple Field: Style: O11BCDb
    Local: Field: Simple Field:Full Width:Yes
    Local: Field: Simple Field:Align:Right

    [Line:OTS Authorised]
    Right Field: Simple Field
    Local: Field: Simple Field: Set as: "Authorised Signature"
    Local: Field: Simple Field: Style: O11BCD
    Local: Field: Simple Field:Full Width:Yes
    Local: Field: Simple Field:Align:Right
    Space Top:6 mm
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     


  2. Samiksha

    Samiksha New Member


    You have not defined the TOTALs at Part level.
     


  3. udaya

    udaya Active Member


    upload_2021-4-16_7-40-19.png

    Sub total is showing.... but INV totaal not show......
     



  4. ::::::
    sir i want leder sub total for example for image
     

    Attached Files:



  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What you want (as per pic) and what you have coded ---- is totally different.

    First make the code as per your requirement.
     



  6.  

    Attached Files:

    • abc.png
      abc.png
      File size:
      27 KB
      Views:
      36


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    a ready code is there within developer......for subtotals. See the Invoice mode with sub-totals.

    You can use the same methodology in your code.
     



  8. sorry for inconvenience....

    thank you for suggestion sir
     


Share This Page