src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
changeset 1686 e5a629fb644c
parent 1605 8a0fe0193bef
child 1787 84217f37d788
equal deleted inserted replaced
1685:71c1b26d487b 1686:e5a629fb644c
   283       <![CDATA[
   283       <![CDATA[
   284         SELECT s.M_InOut_ID AS ID, Ad_Column_Identifier(to_char('M_InOut'), to_char(s.M_InOut_ID), to_char(?)) AS NAME 
   284         SELECT s.M_InOut_ID AS ID, Ad_Column_Identifier(to_char('M_InOut'), to_char(s.M_InOut_ID), to_char(?)) AS NAME 
   285         FROM M_INOUT s 
   285         FROM M_INOUT s 
   286         WHERE s.IsSOTrx='N' 
   286         WHERE s.IsSOTrx='N' 
   287         AND s.DocStatus IN ('CL','CO') 
   287         AND s.DocStatus IN ('CL','CO') 
       
   288         AND s.ISLOGISTIC <> 'Y'
   288         AND s.AD_Client_ID IN ('1') 
   289         AND s.AD_Client_ID IN ('1') 
   289         AND s.AD_Org_ID IN ('1') 
   290         AND s.AD_Org_ID IN ('1') 
   290         AND s.C_BPartner_ID = ? 
   291         AND s.C_BPartner_ID = ? 
   291         AND EXISTS (SELECT 1 
   292         AND EXISTS (SELECT 1 
   292                      FROM M_INOUTLINE l left join M_MATCHINV mi on l.M_InOutLine_ID=mi.M_InOutLine_ID
   293                      FROM M_INOUTLINE l left join M_MATCHINV mi on l.M_InOutLine_ID=mi.M_InOutLine_ID
   337     <Sql>
   338     <Sql>
   338       <![CDATA[
   339       <![CDATA[
   339         SELECT s.M_InOut_ID AS ID, Ad_Column_Identifier(to_char('M_InOut'), to_char(s.M_InOut_ID), to_char(?)) AS NAME 
   340         SELECT s.M_InOut_ID AS ID, Ad_Column_Identifier(to_char('M_InOut'), to_char(s.M_InOut_ID), to_char(?)) AS NAME 
   340         FROM M_INOUT s 
   341         FROM M_INOUT s 
   341         WHERE s.IsSOTrx='Y' 
   342         WHERE s.IsSOTrx='Y' 
       
   343         AND s.ISLOGISTIC <> 'Y'
   342         AND s.DocStatus IN ('CL','CO') 
   344         AND s.DocStatus IN ('CL','CO') 
   343         AND s.AD_Client_ID IN ('1') 
   345         AND s.AD_Client_ID IN ('1') 
   344         AND s.AD_Org_ID IN ('1')
   346         AND s.AD_Org_ID IN ('1')
   345         AND s.C_BPartner_ID = ?  
   347         AND s.C_BPartner_ID = ?  
   346         AND EXISTS (SELECT 1 FROM M_INOUTLINE l 
   348         AND EXISTS (SELECT 1 FROM M_INOUTLINE l