Run this query first to check if these are the correct Invoice Lines (items) to delete:
Select * from InvoiceLine where InvoiceLIneType = 'Item' and InvoiceLineQuantity = 0
And if that's what you want, backup your company file and run:
Delete from InvoiceLine where InvoiceLIneType = 'Item' and InvoiceLineQuantity = 0
and they will all disappear! After that run:
sp_optimizefullsync InvoiceLine
to fully re-sync your optimized InvoiceLine table with all the new deleted invoice lines! |