src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql
changeset 1605 8a0fe0193bef
parent 423 ecf368072c48
child 6701 690d2af86089
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql	Wed Sep 03 17:10:52 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql	Wed Sep 03 17:55:37 2008 +0000
@@ -35,7 +35,7 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       SELECT COALESCE(SUM(QTYONHAND),0) AS QTYONHAND FROM M_STORAGE_DETAIL
-      WHERE M_LOCATOR_ID = TO_NUMBER(?)
+      WHERE M_LOCATOR_ID = ?
     </Sql>
     <Parameter name="mLocatorId"/>
   </SqlMethod>
@@ -44,8 +44,8 @@
     <Sql>
     <![CDATA[
       SELECT COALESCE(SUM(QTYONHAND),0) AS QTYONHAND FROM M_STORAGE_DETAIL
-      WHERE M_LOCATOR_ID = TO_NUMBER(?)
-      AND M_PRODUCT_ID <> TO_NUMBER(?)
+      WHERE M_LOCATOR_ID = ?
+      AND M_PRODUCT_ID <> ?
       ]]>
     </Sql>
     <Parameter name="mLocatorId"/>
@@ -54,10 +54,10 @@
   <SqlMethod name="filledLocator" type="preparedStatement" return="String" default="">
     <SqlMethodComment></SqlMethodComment>
     <Sql>   
-      SELECT COALESCE(MAX(M_INOUTLINE.M_INOUTLINE_ID),0) AS FILLEDLOCATOR FROM M_INOUT, M_INOUTLINE
+      SELECT COALESCE(MAX(M_INOUTLINE.M_INOUTLINE_ID),'0') AS FILLEDLOCATOR FROM M_INOUT, M_INOUTLINE
       WHERE M_INOUT.M_INOUT_ID = M_INOUTLINE.M_INOUT_ID
-      AND M_INOUT.M_INOUT_ID = TO_NUMBER(?)
-      AND M_INOUTLINE.M_LOCATOR_ID = TO_NUMBER(?)
+      AND M_INOUT.M_INOUT_ID = ?
+      AND M_INOUTLINE.M_LOCATOR_ID = ?
     </Sql>  
     <Parameter name="mInoutId"/>
     <Parameter name="mLocatorId"/>