Good Evening,
I'm Mark and I am using Magento 2.3.0 this year to support a non-profit fund raiser, allowing us to finally have on-line ordering and credit card processing.
I am having a problem where the Default Stock column of the Catalog->Products view doesn't always correctly match the quantity remaining when you subtract the actual invoiced purchases from the Quantity column. Most match, but there are exceptions.
I am using the query:
select i.sku, sum(i.qty_invoiced) from sales_order so , sales_order_item i
where so.entity_id = i.order_id and so.status != 'canceled'
group by sku
order by sku;
to determine actual items sold, and it is returning results that match ground truth.
One example has a sku in which the catalog product view claims 5 of 5 available, however, the query reveals the correct amount sold of 2. The default stock column _should_ be reading 3 unless I am not understanding its purpose correctly.
What information should I provide to help me troubleshoot this issue?
Cordially,
-Mark