procedure GetSalesInvoicesExcludingCreditMemos() var SalesInvoiceHeader: Record "Sales Invoice Header"; begin SalesInvoiceHeader.SETRANGE("Cancelled", false); // Exclude canceled invoices SalesInvoiceHeader.SETRANGE("Closed", false); // Exclude fully applied/closed invoices if SalesInvoiceHeader.FINDSET then repeat // Process your sales invoice data here until SalesInvoiceHeader.NEXT = 0; end;
Hi,
You can use the filter option or exclude negative amounts to refine the data. However, does this apply to the Sales Invoice Header?
Also, the Sales Cr. Memo Header table number is different from the Sales Invoice Header—I believe they are 112 and 114, respectively.
Thanks! Ramesh
If this helped you, please check the box Does this answer your question?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Rishabh Kanaskar 3,808
Sumit Singh 2,554
Nimsara Jayathilaka. 2,140