Skip to main content
Answer

How to Prevent Duplicate Line Items in Sales Order Report While Keeping Correct Tax Data?

  • July 2, 2025
  • 7 replies
  • 136 views

Forum|alt.badge.img

Hello everyone,

I’m facing an issue with the Sales Order (LA) report/form where some line items are unexpectedly shown twice, even though the underlying data looks correct. I suspect the problem is related to how the SOLine and SOTax tables are joined or how the data is grouped in the report.

I’ve tried adjusting the joins (like using a LEFT JOIN between SOLine and SOTax) and filtering tax records, but so far without success. Removing the SOTax join causes errors or missing data in the report.

My goal is to display each line item only once, while still showing the correct tax information, so that invoices and shipment documents don’t have duplicate lines.

 

If anyone has any ideas or could help me troubleshoot and resolve this, I would really appreciate it!

Thanks so much!
Pantea

 

 

Best answer by plambert

It’s suspicious that BAccount is joined with Location without any filtering or conditions to limit it to the location of the Sales Order. That could be the source of your duplication for particular Customers. 

7 replies

Forum|alt.badge.img+3
  • Varsity I
  • July 2, 2025

Hi ​@PanteaShahrian , Joins between SOLine and SOTax seems to be correct. Did you remove those joins and verified, to confirm the duplicate is getting because of this relation between SOLine and SOTax.

If possible, share the report in .rpx format to review groups and other relation of the tables


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • July 2, 2025

Sorry, I can only upload it as a ZIP file.


Forum|alt.badge.img+3
  • Varsity I
  • July 2, 2025

Yes, that is fine.


Manikanta Dhulipudi
Captain II
Forum|alt.badge.img+15

@PanteaShahrian 

I believe if you have multiple TAX line in Taxes Tab the report shows duplicate lines.


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • July 2, 2025

@arthia98 , ​@Manikanta Dhulipudi 
Actually, there aren’t multiple tax lines on the Taxes tab. The duplicate line items only seem to happen when the customer is located outside the country.
I think this might be related to different tax types or rules that apply to international vs. domestic customers.


plambert
Semi-Pro I
Forum|alt.badge.img+2
  • Semi-Pro I
  • Answer
  • July 14, 2025

It’s suspicious that BAccount is joined with Location without any filtering or conditions to limit it to the location of the Sales Order. That could be the source of your duplication for particular Customers. 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • September 26, 2025

@Manikanta Dhulipudi  ​@arthia ​@plambert
Thank you for your support.