FREE Custom Report - Unsold Inventory Products / Clearance

Here's a useful custom report. For a given date range, it lists all UNSOLD inventory products.

Go to View -> Reports -> Custom click ADD and paste in the SQL below

---------------- SQL BELOW ----------------

SELECT
(
SELECT
vendors.VENDOR_NAME
FROM
vendors
WHERE
vendors.VENDOR_ID = pr.vendor_id
) AS Vendor,
pr.description AS Description,
pr.SIZE_DESC AS Size,
pr.COLOR_DESC AS Color,
date(
(
SELECT
max(restock.postdate)
FROM
restock
WHERE
restock.product_id = pr.product_id
)
) AS Latest_Restock_Date
FROM
products pr
WHERE
NOT pr.product_id IN (
SELECT DISTINCT
(product_id)
FROM
invoice_items ii
JOIN invoices i ON ii.invoice_id = i.invoice_id
AND i.POSTDATE BETWEEN '{STARTDATE}'
AND '{ENDDATE}'
)
AND PRODUCT_TYPE IN ('ICHILD', 'ISINGLE')
AND INACTIVE = 0 order by VENDOR_ID, pr.DESCRIPTION

0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post