gemma-l
6/26/2017 - 11:17 AM

Emydex Order Detail

Emydex Order Detail

SELECT oms_wo_lines.WOType, oms_wo_lines.WONo,  PLUID, Text3, PLUCode,oms_wo_lines.WOLineQuantity, PLUDescription
-- *, vw_df_plu_file.PLUDescription as WOLineDFDescription,  
--(CASE WHEN WOLineByWeight = 1 THEN wolineweight ELSE wolineQuantity END ) * WOLinePrice as WOTotalLinePrice
FROM  oms_wo_lines LEFT OUTER JOIN ce_oms_wo_lines ON oms_wo_lines.WOType = ce_oms_wo_lines.WOType  AND oms_wo_lines.WONo = ce_oms_wo_lines.WONo AND  oms_wo_lines.WOVersion = ce_oms_wo_lines.WOVersion AND oms_wo_lines.WOLineNo = ce_oms_wo_lines.WOLineNo AND oms_wo_lines.WOLineDFID = ce_oms_wo_lines.WOLineDFID  
LEFT JOIN vw_df_plu_file ON oms_wo_lines.WOLineDFID = vw_df_plu_file.PLUID
WHERE oms_wo_lines.WOType = 'SO' 
AND oms_wo_lines.WONo='SODR00108508' 
 AND oms_wo_lines.WOVersion='0' 
ORDER BY PLUCode