Edit Report:NEW ATD ITEMS
Menu Anchors
'customers', 'orders', 'sales', 'payables', 'warehouse', 'dispatching', 'receivables', 'payables-dash', 'inventory', 'purchases', 'generallendger', 'users',-- NEW ATD ITEMS
--
--
-- VARIABLE: {
-- name: "brand",
-- display: "Brand",
-- type: "select",
-- database_options: { table: "atd_brand_status", display: "brand", column: "brand", order:{ column: "brand" , order: "ASC"} },
-- multiple:true,
-- empty:false,
-- }
--
select * from atdonline where ATDProductNumber
not in (select remotestockid from versioneight.remotestock where loccode in (select warehouse from versioneight.remotemapping where api_id = 1))
and UPPER(brand) in (select UPPER(name) from versioneight.manufacturer where a2 ='ATD')
{% if brand[0] != '' %}
{% if brand|length > 0 %}
and brand in (
{% for m in brand %}
'{{ m }}'
{{ not loop.last ? ',' }}
{% endfor %})
{% endif %}
{% endif %}
order by brand, ATDProductNumber asc