kyariexcel
Programmer
Hello all!
I have been working on a web report that pulls from our SAGE 300 database and I have run into a weird situation. We have an order 0272122 that shows a LASTINVNUM of 20240201. But, if you go to the last invoice shown in Order Entry, the date shows 20240117. This report pulls all invoices within 01/01 to 01/31 by looking in table OEINVH, but then in the table of my report, pulling OEORDH.LASTINVNUM is showing us this other date for some reason and I can't figure out why. I thought it might be a bug with credit notes, but there are no credit notes on any invoice tied to this order except for the one created on 01/17 alongside the second (and most recent) invoice.
All of my totals seem accurate here in my report, but it's puzzling and a little worrying to me that it's not showing the right date, as if something might be wrong in my query (which is very large with many subqueries).
Any thoughts?
Thanks,
- Cary A.
I have been working on a web report that pulls from our SAGE 300 database and I have run into a weird situation. We have an order 0272122 that shows a LASTINVNUM of 20240201. But, if you go to the last invoice shown in Order Entry, the date shows 20240117. This report pulls all invoices within 01/01 to 01/31 by looking in table OEINVH, but then in the table of my report, pulling OEORDH.LASTINVNUM is showing us this other date for some reason and I can't figure out why. I thought it might be a bug with credit notes, but there are no credit notes on any invoice tied to this order except for the one created on 01/17 alongside the second (and most recent) invoice.
All of my totals seem accurate here in my report, but it's puzzling and a little worrying to me that it's not showing the right date, as if something might be wrong in my query (which is very large with many subqueries).
Any thoughts?
Thanks,
- Cary A.