CA
select cu.OKCUNO,cu.OKCUNM, SUM(CASE WHEN st.UCOFQS>0 THEN (UCOFQS) ELSE 0 END) QTY_SALE, SUM(CASE WHEN st.UCOFQS<0 THEN (UCOFQS) ELSE 0 END) QTY_CN, sum(UCOFQS) as TOTAL_QTY from MVXJDTA.OSBSTD as st INNER JOIN MVXJDTA.OCUSMA AS cu ON st.UCCUNO = cu.OKCUNO RIGHT JOIN MVXJDTA.MITMAS AS it ON st.UCITNO = it.MMITNO where UCIVDT like '%' AND (st.UCORTP IN ('A31')) and and OKSDST='' and UCSAAM>=1 GROUP BY cu.OKCUNO,cu.OKCUNM ORDER BY cu.OKCUNO

Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'and'., SQL state 37000 in SQLExecDirect in E:\www\_mango2\ps\ps_show_cust11sku.php on line 125
Distribution ร้านค้า สินค้ากลุ่ม :


Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in E:\www\_mango2\ps\ps_show_cust11sku.php on line 138

storeCode

storeName

จำนวนหีบ
ขาย

จำนวนหีบ
รับคืน

จำนวนหีบ หลังหักรับคืน

รวม Carton0.000.00

รวมร้านค้าที่ขาย : ร้านค้า

รวมจำนวนสินค้าที่ขายหลังหักสินค้ารับคืน : 0.00 หีบ