How to Link Sales invoice and purchase invoice in SQL QUERY

I want Insight report for individual purchase order against sales invoice profit and loss percentage so how to link Purchase invoice to Sales invoice

I think you’ll need a third docType like Projects. Projects is a great place to track profits on a small scale (smaller than Accounting Dimensions). Purchase Invoice and Sales Invoice already have links to Projects.

With a customization, you might be able to create a link field or child table in sales invoices (which will link to one or multiple Purchase invoices).

To my knowledge there is no existing link between Purchase Invoice and Sales Invoice.

No matter the solution, you’ll need to keep your Purchase Invoices from involving multiple projects/3rdDocTypes.

Okay thanks for your replay