Common Party Ledger

How can i view a common ledger of a party who is both customer and supplier i have linker both the parties.

Hi @sahilsinghania,

If you haven’t checked the documentation of the Common Paty Accounting then check it.

Thank You!

it is fine but what about the general ledger we can not set the filter common party-wise in the general ledger. how I solve this guide me if you can

Hi @riddhi1,

There is no built-in option to filter the GL based on a common party (i.e., customer or supplier).

One way to achieve this is by creating a custom report in ERPNext. You can create a report that fetches data from the GL and filters it based on the common party. Here’s how you can do it:

  1. Go to the “Customize” module in ERPNext and create a new report.
  2. Choose “Query Report” as the report type.
  3. Write a SQL query to fetch the GL data and filter it based on the common party. Here’s an example query:
SELECT
    `tabGL Entry`.posting_date,
    `tabGL Entry`.account,
    `tabGL Entry`.debit,
    `tabGL Entry`.credit,
    `tabGL Entry`.against_account,
    `tabGL Entry`.party_type,
    `tabGL Entry`.party
FROM
    `tabGL Entry`
WHERE
    (`tabGL Entry`.party_type = 'Customer' AND `tabGL Entry`.party = 'ABC Corp') OR
    (`tabGL Entry`.party_type = 'Supplier' AND `tabGL Entry`.party = 'XYZ Inc')
ORDER BY
    `tabGL Entry`.posting_date ASC

This query fetches GL entries for a specific customer (ABC Corp) and supplier (XYZ Inc).

  1. Save the report and test it by running it from the “Reports” module.

Please set you according to report, field name, etc.

Thank You!