Untitled
unknown
plain_text
9 months ago
1.2 kB
11
Indexable
t2.siteflag,
'',
t2.brandname,
'',
'',
t1.internalRANum,
t1.product,
DATE(t5.inputdate),
DATE(t5.inputdate),
t1.invoicenum,
rastatus,
t2.currency,
ROUND((COUNT(DISTINCT t1.serialnumber) * ROUND(t2.costcoopdisc, 2)),
2) AS extendedcoopcost,
ROUND((COUNT(DISTINCT t1.serialnumber) * (ROUND(t2.costcoopdisc, 2) * t2.currencyrate)),
2) AS extendeddiscountedcoopcostusd,
t2.pocategory,
'',
IF(t4.creditmemo IS NULL,
'',
t4.creditmemo),
IF(t2.wlbrand IS NULL, '', t2.wlbrand),
t1.apComment,
t1.creditmemonumber,
t1.collectionstatus,
t5.rareason
FROM
inventoryitem t1
LEFT JOIN
poitem t2 ON t1.product = t2.productcode
AND t1.ponum = t2.ponum
LEFT JOIN
brandvendormapping t3 ON t2.brandname = t3.brandname
LEFT JOIN
apcreditmemo t4 ON t1.ponum = t4.ponum
AND t1.product = t4.productcode
LEFT JOIN
rarequest t5 ON t1.internalRANum = t5.revolveranumber
AND t1.product = t5.productcode
WHERE
t5.inputdate >='2024-01-01' and t5.inputdate <'2024-12-31'
and rastatus= 'shipped'
GROUP BY t1.product , t1.internalranum;
Editor is loading...
Leave a Comment