Dear experts, please help me to show sales, purchase, debit note & credit note amount in my report

Discussion in 'Tally Developer' started by Mithun Das, Dec 7, 2022.

    
  1. Mithun Das

    Mithun Das New Member


    Dear experts, I am trying to make a report of Parties Register but in this report I can't get purchase, sales , debit note & credit note amount I am new in tdl learning so can you please help me to get these column in my reports. Thanks in advance. My code is here:


    [#Menu: Gateway Of Tally]
    Add : Item : Before : @@locQuit : Parties Register : Menu : PartiesRegister

    [Menu: PartiesRegister]
    Add : Item : Sundry Debtors Details : Display : TMSD Parties Register
    Add : Item : Sundry Creditors Details : Display : TMSC Parties Register

    [Report: TMSD Parties Register]
    Use : DSP Template
    Form : TMSD Parties Register

    [Form: TMSD Parties Register]
    Use : DSP Template
    Part : TMSD PartiesRegister Title, TMSD PartiesRegister
    Width : 100% Screen
    [Part : TMSD PartiesRegister Title]
    Line : TMSD Parties Register Title

    [Line : TMSD Parties Register Title]
    Use : TMSD Parties Register
    Local : Field : SD Sr No : Set as : "S.N."
    Local : Field : SD Name : Set as : "Name"
    ;;Local : Field : SD ST : Set as : "Sales Tax No"
    Local : Field : SD Debit Note : Set as : "Debit Note"
    ;;Local : Field : SD Contact No: Set as : "Contact Person"
    ;Local : Field : SD Phone : Set as : "Phone No."
    Local : Field : SD Opening : Set as : "Opening Balance"
    Local : Field : SD Sales : Set as : "Sales"
    Local : Field : SD Credit Note : Set as : "Credit Note"
    Local : Field : SD Closing Balance : Set as : "Closing Balance"
    Local : Field : SD Purchase : Set as : "Purchase"

    Border : Column Titles

    [Part : TMSD Parties Register]
    Line : TMSD Parties Register
    Repeat : TMSD Parties Register : TM Sundry Debtors
    Scroll : Vertical
    Common Border : Yes

    [Line : TMSD Parties Register]
    Field : SD Sr No, SD Name, SD Opening, SD Sales, SD Purchase, SD Debit Note, SD Credit Note, SD Closing Balance,

    [Field : SD Sr No]
    Use : Short Name Field
    Set as : $$Line
    Style : Normal
    Width : 10
    Align : Centre

    [Field : SD Name]
    Use : Name Field
    Set as : $Name
    Width : 50
    Style : Normal
    Border : Thin Left
    Align : Centre

    [Field : SD Opening]
    Use : Short Name Field
    Set as : $OpeningBalance

    Style : Normal
    Border : Thin Left
    Align : Centre

    [Field : SD ST]
    Use : Short Name Field
    Set as : $STno
    Style : Normal
    Border : Thin Left
    Width : 9
    Align : Centre

    [Field : SD Debit Note]
    Use : Short Name Field
    Set as : $IncomeTaxNumber
    Style : Normal
    Border : Thin Left

    Align : Centre

    [Field : SD Credit Note]
    Use : Short Name Field
    Set as : $LedgerContact
    Style : Normal
    Border : Thin Left

    Align : Centre

    [Field : SD Phone]
    Use : Short Name Field
    Set as : $LedgerPhone
    Style : Normal
    Border : Thin Left
    Align : Centre

    [Field : SD Sales]
    Use : Short Name Field
    Set as : $Sales
    Style : Normal
    Border : Thin Left
    Full Width : No
    Align : Centre

    [Field : Mobile No]
    Use : Short Name Field
    Set as : $ledgermobile
    Style : Normal
    Border : Thin Left
    Width : 20
    Align : Centre

    [Field : SD Closing Balance]
    Use : Short Name Field
    Set as : $ClosingBalance
    Style : Normal
    Border : Thin Left

    Align : Centre

    [Field : SD Purchase]
    Use : Name Field
    Set as : $PartyAmt
    Style : Normal
    Border : Thin Left
    Width : 12
    Align : Centre

    [Collection: TM Sundry Debtors]
    Type : Ledger
    Child of : $$GroupSundryDebtors
    Belongs To : Yes


    [Report : TMSC Parties Register]
    Use : TMSD Parties Register
    Local : Collection : TM Sundry Debtors : Child Of : $$GroupSundryCreditors


    Hope anyone expert will help me. waiting...
     

    Attached Files:



  2. Vijay Shetye

    Vijay Shetye Member


    For Eg For Sales you Use the following Collection
    [Collection: Sales Voucher]
    Type : Voucher : VoucherTYpe
    Child Of : $$VchTypeSales
    Belongs To : Yes

    Fetch : PartyLedgerName

    and at FieldLevel you can

    [Field: SD Sales]
    Set as : $$FilterAmtTotal:SalesVoucher:IsSameParty:$Amount

    [System: Formula]
    IsSameParty : $PartyLedgerName = #SDName
     
    Mithun Das likes this.



  3. I'm little bit busy. If u got the answer up to coming Sunday its okay. Otherwise I will update the solution on Sunday....
     
    Mithun Das likes this.



  4. Code:
    [#Menu: Gateway Of Tally]
        Add : Item : Before : @@locQuit : Parties Register : Menu : PartiesRegister
    
    [Menu: PartiesRegister]
        Add : Item : Sundry Debtors Details : Display : TMSD Parties Register
        Add : Item : Sundry Creditors Details : Display : TMSC Parties Register
    
    [Report: TMSD Parties Register]
        Use : DSP Template
        Form : TMSD Parties Register
    
    [Form: TMSD Parties Register]
        Use : DSP Template
        Part : TMSD PartiesRegister Title, TMSD PartiesRegister
        Width : 100% Screen
       
        [Part : TMSD PartiesRegister Title]
            Line : TMSD Parties Register Title
    
            [Line : TMSD Parties Register Title]
                Use : TMSD Parties Register
                Local : Field : SD Sr No : Set as : "S.N."
                Local : Field : SD Name : Set as : "Name"
                ;;Local : Field : SD ST : Set as : "Sales Tax No"
                Local : Field : SD Debit Note : Set as : "Debit Note"
                ;;Local : Field : SD Contact No: Set as : "Contact Person"
                ;Local : Field : SD Phone : Set as : "Phone No."
                Local : Field : SD Opening : Set as : "Opening Balance"
                Local : Field : SD Sales : Set as : "Sales"
                Local : Field : SD Credit Note : Set as : "Credit Note"
                Local : Field : SD Closing Balance : Set as : "Closing Balance"
                Local : Field : SD Purchase : Set as : "Purchase"
    
                Border : Column Titles
    
        [Part : TMSD Parties Register]
            Line : TMSD Parties Register
            Repeat : TMSD Parties Register : TM Sundry Debtors
            Scroll : Vertical
            Common Border : Yes
    
            [Line : TMSD Parties Register]
                Field : SD Sr No, SD Name, SD Opening, SD Sales, SD Purchase, SD Debit Note, SD Credit Note, SD Closing Balance,
    
    [Field : SD Sr No]
        Use : Short Name Field
        Set as : $$Line
        Style : Normal
        Width : 10
        Align : Centre
    
    [Field : SD Name]
        Use : Name Field
        Set as : $Name
        Width : 50
        Style : Normal
        Border : Thin Left
        Align : Centre
    
    [Field : SD Opening]
        Use : Short Name Field
        Set as : $OpeningBalance
    
        Style : Normal
        Border : Thin Left
        Align : Centre
    
    [Field : SD ST]
        Use : Short Name Field
        Set as : $STno
        Style : Normal
        Border : Thin Left
        Width : 9
        Align : Centre
    
    [Field : SD Debit Note]
        Use : Amount Field
        Set as : $DNoteAmt
        Style : Normal
        Border : Thin Left
    
        Align : Centre
    
    [Field : SD Credit Note]
        Use : Short Name Field
        Set as : $CNoteamt
        Style : Normal
        Border : Thin Left
    
        Align : Centre
    
    [Field : SD Phone]
        Use : Short Name Field
        Set as : $LedgerPhone
        Style : Normal
        Border : Thin Left
        Align : Centre
    
    [Field : SD Sales]
        Use : Short Name Field
        Set as : $Salesamt
        Style : Normal
        Border : Thin Left
        Full Width : No
        Align : Centre
    
    [Field : Mobile No]
        Use : Short Name Field
        Set as : $ledgermobile
        Style : Normal
        Border : Thin Left
        Width : 20
        Align : Centre
    
    [Field : SD Closing Balance]
        Use : Short Name Field
        Set as : $ClosingBalance
        Style : Normal
        Border : Thin Left
    
        Align : Centre
    
    [Field : SD Purchase]
        Use : Name Field
        Set as : $purchamt
        Style : Normal
        Border : Thin Left
        Width : 12
        Align : Centre
    
    [Collection: TM Sundry Debtors]
        Type         : Ledger
        Child of     : $$GroupSundryDebtors
        Belongs To     : Yes
        Compute        : Salesamt    : $$ReportObject:$$CollectionFieldByKey:$Salesamt:$Name:SummaryColl
        Compute        : purchamt    : $$ReportObject:$$CollectionFieldByKey:$purchamt:$Name:SummaryColl
        Compute        : DNoteamt    : $$ReportObject:$$CollectionFieldByKey:$DNoteamt:$Name:SummaryColl
        Compute        : CNoteamt    : $$ReportObject:$$CollectionFieldByKey:$CNoteamt:$Name:SummaryColl
    
    [Report : TMSC Parties Register]
        Use : TMSD Parties Register
        Local : Collection : TM Sundry Debtors : Child Of : $$GroupSundryCreditors
       
    [Collection: Common Coll]    ;;Gather All Vouchers
        Type    : Voucher
       
        [Collection: Summary Coll]    ;; summarize as per your requirement
            Source Collection    : Common Coll
            Walk                : Ledger Entries
            By                    : LedgerName    : $LedgerName
            Aggr Compute        : Salesamt        : Sum    : IF $$IsSales:$VoucherTypeName Then $Amount else 0
            Aggr Compute        : purchamt        : Sum    : IF $$IsPurchase:$VoucherTypeName Then $Amount else 0
            Aggr Compute        : DNoteamt        : Sum    : IF $$IsDebitNote:$VoucherTypeName Then $Amount else 0
            Aggr Compute        : CNoteamt        : Sum    : IF $$IsCreditNote:$VoucherTypeName Then $Amount else 0
            Search Key            : $LedgerName
    Screenshot 2023-03-21 102825.png Screenshot 2023-03-21 103355.png
     


  5. Rupal Agarwal

    Rupal Agarwal Member


    Try this code
    Now this report is looking a bit better.


    Code:
    [#Menu: Gateway Of Tally]
        Add : Item : Before : @@locQuit : Parties Register : Menu : PartiesRegister
    
    [Menu: PartiesRegister]
        Add : Item : Sundry Debtors Details : Display : TMSD Parties Register
        Add : Item : Sundry Creditors Details : Display : TMSC Parties Register
    
    [Report: TMSD Parties Register]
        Use : DSP Template
        Form : TMSD Parties Register
    
    [Form: TMSD Parties Register]
        Use : DSP Template
        Part : TMSD PartiesRegister Title, TMSD PartiesRegister
        Width : 100% Screen
     
    [Part : TMSD PartiesRegister Title]
        Line : TMSD Parties Register Title
    
    [Line : TMSD Parties Register Title]
        Use : TMSD Parties Register
        Local     : Field : SD Sr No                 : Info : "S.N."
        Local     : Field : SD Name                 : Info : "Name"
        Local     : Field : SD Debit Note         : Info : "Debit Note"
        Local     : Field : SD Opening             : Info : "Opening Balance"
        Local     : Field : SD Sales                 : Info : "Sales"
        Local     : Field : SD Credit Note         : Info : "Credit Note"
        Local     : Field : SD Closing Balance     : Info : "Closing Balance"
        Local     : Field : SD Purchase             : Info : "Purchase"
        Local    : Field    : default                : Align: Center
        Local    : Field    : default                : Style: Normal Bold
        Border     : Column Titles
        Space Top: 0.2
        Space Bottom: 0.2
    
    [Part : TMSD Parties Register]
        Line : TMSD Parties Register
        Repeat : TMSD Parties Register : TM Sundry Debtors
        Bottom Line: TMSD Totals
        Total: SD Opening, SD Sales, SD Purchase, SD Debit Note, SD Credit Note, SD Closing Balance
        Scroll : Vertical
        Common Border : Yes
    
    [Line : TMSD Parties Register]
    Field : SD Sr No, SD Name, SD Opening, SD Sales, SD Purchase, SD Debit Note, SD Credit Note, SD Closing Balance,
    
    [Field : SD Sr No]
        Use : Name Field
        Set as : $$String:$$Line + $$string:".)"
        Style : Normal
        Width : 5% Page
        Align : Right
        Space Right: 1
    
    [Field : SD Name]
        Use : Name Field
        Set as : $Name
        Width : 35% Page
        Style : Normal
        Border : Thin Left
        Align : Left
        Indent: 1
    
    [Field : SD Opening]
        Use : Number Field
        Set as : $OpeningBalance
        Format: "Decimal : 2 , no zero"
        Style : Normal
        Border : Thin Left
        Align : Right
        Width: 10% Page
        Space Right: 0.5
    
    [Field : SD Sales]
        Use : Number Field
        Set as : $Salesamt
        Style : Normal
        Border : Thin Left
         Width: 10% Page
        Align : Right
        Format: "Decimal : 2 , no zero"
        Space Right: 0.5
      
    [Field : SD Purchase]
        Use : Number Field
        Set as : $purchamt
        Style : Normal
        Border : Thin Left
        Width: 10% Page
        Align : Right
        Format: "Decimal : 2 , no zero"
        Space Right: 0.5
      
    [Field : SD Debit Note]
        Use : Number Field
        Set as : $DNoteAmt
        Style : Normal
        Border : Thin Left
        Format: "Decimal : 2 , no zero"
        Align : Right
        Width: 10% Page
        Space Right: 0.5
      
    [Field : SD Credit Note]
        Use : Number Field
        Set as : $CNoteamt
        Style : Normal
        Border : Thin Left
        Format: "Decimal : 2 , no zero"
        Align : Right
        Width: 10% Page
        Space Right: 0.5
      
    [Field : SD Closing Balance]
        Use : Number Field
        Set as : $ClosingBalance
        Style : Normal
        Border : Thin Left
        Width: 10% Page
        Align : Right
        Format: "Decimal : 2 , no zero"
        Space Right: 0.5
      
    [Line : TMSD Totals]
        Use : TMSD Parties Register
        Local     : Field : SD Sr No                 : setas:""
        Local     : Field : SD Name                 : setas:""
        Local     : Field : SD Debit Note         : setas:$$total:SDDebitNote
        Local     : Field : SD Opening             : setas:$$total:SDOpening
        Local     : Field : SD Sales                 : setas:$$total:SDSales
        Local     : Field : SD Credit Note         : setas:$$total:SDCreditNote
        Local     : Field : SD Closing Balance     : setas:$$total:SDClosingBalance
        Local     : Field : SD Purchase             : setas:$$total:SDPurchase
        Local    : Field    : default                : Align: Center
        Local    : Field    : default                : Style: Normal Bold
        Border     : Totals
        Space Top: 0.2
        Space Bottom: 0.2
    
    [Collection: TM Sundry Debtors]
        Type         : Ledger
        Child of     : $$GroupSundryDebtors
        Belongs To     : Yes
        Compute        : Salesamt    : $$ReportObject:$$CollectionFieldByKey:$Salesamt:$Name:SummaryColl
        Compute        : purchamt    : $$ReportObject:$$CollectionFieldByKey:$purchamt:$Name:SummaryColl
        Compute        : DNoteamt    : $$ReportObject:$$CollectionFieldByKey:$DNoteamt:$Name:SummaryColl
        Compute        : CNoteamt    : $$ReportObject:$$CollectionFieldByKey:$CNoteamt:$Name:SummaryColl
    
    
    ;;==================================== Creditors Report ==========================================
    
    [Report : TMSC Parties Register]
        Use : TMSD Parties Register
        Local : Collection : TM Sundry Debtors : Child Of : $$GroupSundryCreditors
     
    [Collection: Common Coll]    ;;Gather All Vouchers
        Type    : Voucher
     
    [Collection: Summary Coll]    ;; summarize as per your requirement
        Source Collection   : Common Coll
        Walk                : Ledger Entries
        By                  : LedgerName    : $LedgerName
        Aggr Compute        : Salesamt        : Sum    : IF $$IsSales:$VoucherTypeName Then $Amount else 0
        Aggr Compute        : purchamt        : Sum    : IF $$IsPurchase:$VoucherTypeName Then $Amount else 0
        Aggr Compute        : DNoteamt        : Sum    : IF $$IsDebitNote:$VoucherTypeName Then $Amount else 0
        Aggr Compute        : CNoteamt        : Sum    : IF $$IsCreditNote:$VoucherTypeName Then $Amount else 0
        Search Key          : $LedgerName
     


  6. shaikh kd

    shaikh kd New Member


    HOW ADD PAYMENT & RECEIPT COLUMN
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Then it is equivalent to DayBook .... Go to daybook, filter on vouchers you need to display and get the report.
     


  8. Mithun Das

    Mithun Das New Member


    Thanks yo so much Vijay sir, Tushar sir &Rupa mam for your valuable help.:)
     


Share This Page