src-util/modulescript/src/org/openbravo/modulescript/UpdateBpPaymentLine_data.xsql
changeset 25772 5ef45cfcb9a5
parent 25593 f5b23fe2295b
child 26141 b9fc7e8e60ae
equal deleted inserted replaced
25771:1669f11b74c1 25772:5ef45cfcb9a5
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    11  * License for the specific  language  governing  rights  and  limitations
    11  * License for the specific  language  governing  rights  and  limitations
    12  * under the License.
    12  * under the License.
    13  * The Original Code is Openbravo ERP.
    13  * The Original Code is Openbravo ERP.
    14  * The Initial Developer of the Original Code is Openbravo SLU
    14  * The Initial Developer of the Original Code is Openbravo SLU
    15  * All portions are Copyright (C) 2014 Openbravo SLU
    15  * All portions are Copyright (C) 2014-2015 Openbravo SLU
    16  * All Rights Reserved.
    16  * All Rights Reserved.
    17  * Contributor(s):  ______________________________________.
    17  * Contributor(s):  ______________________________________.
    18  ************************************************************************
    18  ************************************************************************
    19 -->
    19 -->
    20 <SqlClass name="UpdateBpPaymentLineData" package="org.openbravo.modulescript">
    20 <SqlClass name="UpdateBpPaymentLineData" package="org.openbravo.modulescript">
    33 				update fin_payment_scheduledetail psd
    33 				update fin_payment_scheduledetail psd
    34 				set c_bpartner_id = (select c_bpartner_id from c_invoice i, fin_payment_schedule ps
    34 				set c_bpartner_id = (select c_bpartner_id from c_invoice i, fin_payment_schedule ps
    35 				                     where ps.fin_payment_schedule_id = fin_payment_schedule_invoice 
    35 				                     where ps.fin_payment_schedule_id = fin_payment_schedule_invoice 
    36 				                     and ps.c_invoice_id = i.c_invoice_id)
    36 				                     and ps.c_invoice_id = i.c_invoice_id)
    37 				where c_bpartner_id is null and fin_payment_schedule_invoice is not null 
    37 				where c_bpartner_id is null and fin_payment_schedule_invoice is not null 
    38 					and fin_payment_schedule_order is null
       
    39       ]]>
    38       ]]>
    40     </Sql>
    39     </Sql>
    41   </SqlMethod>
    40   </SqlMethod>
    42   <SqlMethod name="updateBpPaymentLineOrder" type="preparedStatement" return="rowcount">
    41   <SqlMethod name="updateBpPaymentLineOrder" type="preparedStatement" return="rowcount">
    43     <SqlMethodComment></SqlMethodComment>
    42     <SqlMethodComment></SqlMethodComment>
    56     <SqlMethodComment></SqlMethodComment>
    55     <SqlMethodComment></SqlMethodComment>
    57     <Sql>
    56     <Sql>
    58       <![CDATA[
    57       <![CDATA[
    59     SELECT count(*) as exist
    58     SELECT count(*) as exist
    60     FROM ad_preference
    59     FROM ad_preference
    61     WHERE attribute = 'UpdateBpPaymentLine' and isactive = 'Y'
    60     WHERE attribute = 'UpdateBpPaymentLine2' and isactive = 'Y'
    62       ]]>
    61       ]]>
    63     </Sql>
    62     </Sql>
    64   </SqlMethod>
    63   </SqlMethod>
    65    <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
    64    <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
    66     <SqlMethodComment></SqlMethodComment>
    65     <SqlMethodComment></SqlMethodComment>
    69     INSERT INTO ad_preference (
    68     INSERT INTO ad_preference (
    70     ad_preference_id, ad_client_id, ad_org_id, isactive,
    69     ad_preference_id, ad_client_id, ad_org_id, isactive,
    71     createdby, created, updatedby, updated, attribute
    70     createdby, created, updatedby, updated, attribute
    72     ) VALUES (
    71     ) VALUES (
    73     get_uuid(), '0', '0', 'Y', 
    72     get_uuid(), '0', '0', 'Y', 
    74     '0', NOW(), '0', NOW(), 'UpdateBpPaymentLine')
    73     '0', NOW(), '0', NOW(), 'UpdateBpPaymentLine2')
    75       ]]>
    74       ]]>
    76     </Sql>
    75     </Sql>
    77   </SqlMethod>
    76   </SqlMethod>
    78 </SqlClass>
    77 </SqlClass>