How to find the Sales Tax Master Link and Table which are not matching?

Hi,

We have many sales invoices where the link field of the Sales Tax Charges Master is something else whereas the table is from some other sales tax charge.

For example one invoice could have link field as the Sales Tax Charges masters as for VAT whereas the loaded table would be of probable some other charge master.

Can anyone please guide me how to compare the table of invoice with the master so as to find out which invoices have wrong selection of the Sales Tax.

Hi Aditya,

Maybe you can use an sql query to check this? How often you want to do this?

-Anand.

Hi Anand,

The problem is I guess prior to v4 since in v4 the child table automatically loads(I hope). So I would need to check this only once. But the problem is that I am unable to find a way to write the sql query.

Since there are no examples in erpnext to do a similar check, maybe you can guide me in the right direction.