src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice_data.xsql
author Asier Lostalé <asier.lostale@openbravo.com>
Mon, 05 May 2008 06:59:24 +0000
changeset 799 fef2c5e2feb7
parent 423 ecf368072c48
child 895 ae9ae8e8c9cc
permissions -rw-r--r--
Merged cleanup branch (r3931) with trunk
<?xml version="1.0" encoding="UTF-8"?>
<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
 * All portions are Copyright (C) 2001-2007 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->

<SqlClass id="class" name="ExpenseAPInvoiceData" package="org.openbravo.erpCommon.ad_process">
  <SqlClassComment>Clase ExpenseAPInvoiceData</SqlClassComment>
  <SqlMethod name="select" type="preparedStatement" return="multiple">
    <SqlMethodComment>Select for relation</SqlMethodComment>
    <Sql><![CDATA[
      SELECT  st.AD_Client_ID, st.AD_Org_ID, st.C_BPartner_ID, stl.C_Project_ID, stl.C_Activity_ID, stl.C_Campaign_ID, stl.M_Product_ID, stl.S_ResourceAssignment_ID, stl.C_UOM_ID, stl.Qty, stl.Description, stl.Note, stl.ExpenseAmt, stl.C_Currency_ID, stl.ConvertedAmt, st.DocumentNo, stl.S_TimeExpenseLine_ID, stl.invoiceprice, '' AS Pricestd, '' AS Pricelimit, '' AS Pricelist, '' AS C_INVOICELINE_ID, '' AS QTYINVOICED, '' AS C_INVOICELINE_ACCTDIMENSION_ID, '' AS AMT
        FROM S_TimeExpense st, S_TimeExpenseLine stl
        WHERE st.S_TimeExpense_Id = stl.S_TimeExpense_Id
        AND st.AD_Client_ID IN ('1')
        AND st.AD_Org_ID IN ('1')
        AND st.DateReport >= TO_DATE(?)
        AND st.DateReport < TO_DATE(?)
        AND stl.ISTIMEREPORT <> 'Y'
        AND st.PROCESSED = 'Y'
        AND stl.C_InvoiceLine_ID IS NULL
        ORDER BY st.C_BPartner_ID, st.S_TimeExpense_ID, stl.line
        ]]></Sql>
    <Parameter name="userClient" optional="true" type="replace" after="AND st.AD_Client_ID IN (" text="'1'"/>
    <Parameter name="userOrg" optional="true" type="replace" after="AND st.AD_Org_ID IN (" text="'1'"/>
    <Parameter name="dateReportFrom"/>
    <Parameter name="dateReportTo"/>
    <Parameter name="cBpartnerId" optional="true" after="AND stl.C_InvoiceLine_ID IS NULL"><![CDATA[ AND st.C_BPartner_ID = TO_NUMBER(?)]]></Parameter>
  </SqlMethod>

  <SqlMethod name="set" type="constant" return="multiple">
      <SqlMethodComment>Create a registry</SqlMethodComment>
      <Sql></Sql>
  </SqlMethod>

  <SqlMethod name="selectInvoiceHeader" type="preparedStatement" connection="true" return="String" default="">
    <SqlMethodComment>Select for relation</SqlMethodComment>
    <Sql><![CDATA[
      SELECT MAX(C_INVOICE.C_INVOICE_ID) AS C_INVOICE_ID
      FROM C_INVOICE, C_INVOICELINE
      WHERE C_INVOICE.AD_CLIENT_ID = TO_NUMBER(?)
      AND C_INVOICE.AD_ORG_ID = TO_NUMBER(?)
      AND C_INVOICE.DATEINVOICED = TO_DATE(?)
      AND C_INVOICE.C_BPARTNER_ID = TO_NUMBER(?)
      AND C_INVOICE.C_CURRENCY_ID = TO_NUMBER(?)
      AND C_INVOICE.DOCSTATUS = 'DR'
      AND C_INVOICE.PROCESSED <> 'Y'
      AND C_INVOICE.ISACTIVE = 'Y'
      AND C_INVOICE.ISSOTRX = 'N'
      ]]></Sql>
    <Parameter name="adClientId"/>
    <Parameter name="adOrgId"/>
    <Parameter name="dateinvoiced"/>
    <Parameter name="cBpartnerId"/>
    <Parameter name="cCurrencyId"/>
    <Parameter name="cProjectId" optional="true" after="AND C_INVOICE.ISSOTRX = 'N'"><![CDATA[ AND C_INVOICE.C_PROJECT_ID = TO_NUMBER(?)]]></Parameter>
    <Parameter name="cActivityId" optional="true" after="AND C_INVOICE.ISSOTRX = 'N'"><![CDATA[ AND C_INVOICE.C_ACTIVITY_ID = TO_NUMBER(?)]]></Parameter>
    <Parameter name="cCampaignId" optional="true" after="AND C_INVOICE.ISSOTRX = 'N'"><![CDATA[ AND C_INVOICE.C_CAMPAIGN_ID = TO_NUMBER(?)]]></Parameter>
  </SqlMethod>

  <SqlMethod name="selectInvoiceLine" type="preparedStatement" connection="true" return="multiple">
    <SqlMethodComment>Select for relation</SqlMethodComment>
    <Sql><![CDATA[
      SELECT C_INVOICELINE_ID, SUM(QTYINVOICED) AS QTYINVOICED
      FROM C_INVOICELINE
      WHERE C_INVOICE_ID = TO_NUMBER(?)
      AND AD_CLIENT_ID = TO_NUMBER(?)
      AND AD_ORG_ID = TO_NUMBER(?)
      AND M_PRODUCT_ID = TO_NUMBER(?)
      AND C_UOM_ID = TO_NUMBER(?)
      AND PRICESTD = TO_NUMBER(?)
      AND PRICELIST = TO_NUMBER(?)
      AND PRICELIMIT = TO_NUMBER(?)
      AND C_INVOICELINE.ISACTIVE = 'Y'
      GROUP BY C_INVOICELINE_ID
      ]]></Sql>
    <Parameter name="cInvoiceId"/>
    <Parameter name="adClientId"/>
    <Parameter name="adOrgId"/>
    <Parameter name="mProductId"/>
    <Parameter name="cUomId"/>
    <Parameter name="pricestd"/>
    <Parameter name="pricelist"/>
    <Parameter name="pricelimit"/>
    <Parameter name="description" optional="true" after="AND C_INVOICELINE.ISACTIVE = 'Y'"><![CDATA[ AND C_INVOICELINE.DESCRIPTION = ?]]></Parameter>
    <Parameter name="cTaxId" optional="true" after="AND C_INVOICELINE.ISACTIVE = 'Y'"><![CDATA[ AND C_INVOICELINE.C_TAX_ID = TO_NUMBER(?)]]></Parameter>
  </SqlMethod>

  <SqlMethod name="selectAcctdimension" type="preparedStatement" connection="true" return="multiple">
    <SqlMethodComment>Select for relation</SqlMethodComment>
    <Sql><![CDATA[
      SELECT C_INVOICELINE_ACCTDIMENSION_ID, SUM(AMT) AS AMT
      FROM C_INVOICELINE_ACCTDIMENSION
      WHERE AD_CLIENT_ID = TO_NUMBER(?)
      AND AD_ORG_ID = TO_NUMBER(?)
      AND C_INVOICELINE_ID = TO_NUMBER(?)
      AND ISACTIVE = 'Y'
      GROUP BY C_INVOICELINE_ACCTDIMENSION_ID
      ]]></Sql>
    <Parameter name="adClientId"/>
    <Parameter name="adOrgId"/>
    <Parameter name="cInvoicelineId"/>
    <Parameter name="cProjectId" optional="true" after="AND ISACTIVE = 'Y'"><![CDATA[ AND C_PROJECT_ID = TO_NUMBER(?)]]></Parameter>
    <Parameter name="cCampaignId" optional="true" after="AND ISACTIVE = 'Y'"><![CDATA[ AND C_CAMPAIGN_ID = TO_NUMBER(?)]]></Parameter>
  </SqlMethod>

  <SqlMethod name="selectLine" type="preparedStatement" connection="true" return="String" default="10">
    <SqlMethodComment>Select for relation</SqlMethodComment>
    <Sql><![CDATA[
      SELECT MAX(LINE) AS LINE
      FROM C_INVOICELINE
      WHERE C_INVOICE_ID = TO_NUMBER(?)
      ]]></Sql>
    <Parameter name="cInvoiceId"/>
  </SqlMethod>

  <SqlMethod name="cDoctypeTarget" type="preparedStatement" return="string" default="">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
     SELECT AD_GET_DOCTYPE(TO_NUMBER(?),TO_NUMBER(?),'API',NULL) FROM DUAL
      ]]>
    </Sql>
    <Parameter name="adClientId"/>
    <Parameter name="adOrgId"/>
  </SqlMethod>
  
   <SqlMethod name="help" type="preparedStatement" return="string" default="">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
       SELECT HELP
       FROM AD_PROCESS
       WHERE VALUE = TO_CHAR(?)
      ]]>
    </Sql>
    <Parameter name="process"/>
  </SqlMethod>
  
  <SqlMethod name="description" type="preparedStatement" return="string" default="">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
       SELECT DESCRIPTION
       FROM AD_PROCESS
       WHERE VALUE = TO_CHAR(?)
      ]]>
    </Sql>
    <Parameter name="process"/>
  </SqlMethod>
  
  <SqlMethod name="cDoctypeId" type="preparedStatement" return="string" default="">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
     SELECT C_DocTypeInvoice_ID
     FROM C_DOCTYPE
     WHERE C_DocType_ID = TO_NUMBER(?)
    ]]>
    </Sql>
  <Parameter name="cDoctypeId"/>
  </SqlMethod>
  <SqlMethod name="bPartnerDescription" type="preparedStatement" return="String" default="">
    <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
       SELECT NAME FROM C_BPARTNER
       WHERE C_BPARTNER_ID = TO_NUMBER(?)
    ]]></Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>

  <SqlMethod name="bPartnerLocation" type="preparedStatement" return="String" default="">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
      <![CDATA[
        SELECT MAX(C_BPARTNER_LOCATION_ID) AS ID
        FROM C_BPARTNER_LOCATION
        WHERE C_BPARTNER_ID = TO_NUMBER(?)
        AND ISBILLTO = 'Y'
      ]]></Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>
  
  <SqlMethod name="shipto" type="preparedStatement" return="String" default="">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
      <![CDATA[
        SELECT MAX(C_BPARTNER_LOCATION_ID) AS ID
        FROM C_BPARTNER_LOCATION
        WHERE C_BPARTNER_ID = TO_NUMBER(?)
        AND ISSHIPTO = 'Y'
      ]]></Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>

  <SqlMethod name="salesrepId" type="preparedStatement" return="String" default="">
    <SqlMethodComment>nt></SqlMethodComment>
    <Sql>
      <![CDATA[
      SELECT MAX(AD_USER_ID)
      FROM AD_USER
      WHERE C_BPARTNER_ID = TO_NUMBER(?)
     ]]></Sql>
      <Parameter name="cBpartnerId"/>
  </SqlMethod>

  <SqlMethod name="paymentrule" type="preparedStatement" return="String" default="">
    <SqlMethodComment>nt></SqlMethodComment>
    <Sql>
      <![CDATA[
      SELECT PaymentrulePO
      FROM C_BPARTNER
      WHERE C_BPARTNER_ID = TO_NUMBER(?)
      ]]></Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>

  <SqlMethod name="pricelistId" type="preparedStatement" return="String" default="">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
      <![CDATA[
      SELECT PO_PriceList_ID
      FROM C_BPartner
      WHERE C_BPartner_ID = TO_NUMBER(?)
     ]]></Sql>
      <Parameter name="cBpartnerId"/>
    </SqlMethod>

  <SqlMethod name="selectPrice" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
      <![CDATA[
      SELECT Pricelist, Pricestd, Pricelimit
      FROM M_ProductPrice
      WHERE M_ProductPrice.M_Product_ID = TO_NUMBER(?)
      AND M_ProductPrice.M_PriceList_Version_ID = get_pricelist_version(TO_NUMBER(?), TO_DATE(?)) 
      ]]></Sql>
    <Parameter name="mProductID"/>
    <Parameter name="mPricelistId"/>
    <Parameter name="validfrom"/>
    </SqlMethod>


  <SqlMethod name="paymentterm" type="preparedStatement" return="String" default="">
    <Sql>
      <![CDATA[
        SELECT PO_PaymentTerm_ID
        FROM C_BPARTNER
        WHERE C_BPARTNER_ID = TO_NUMBER(?)
      ]]>
    </Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>

  <SqlMethod name="mProductUomId" type="preparedStatement" return="String" default="">
    <Sql>
      <![CDATA[
        SELECT M_PRODUCT_UOM_ID
        FROM M_PRODUCT_UOM
        WHERE M_PRODUCT_ID = TO_NUMBER(?)
      ]]>
    </Sql>
    <Parameter name="cBpartnerId"/>
  </SqlMethod>

                      
  <SqlMethod name="insert" type="preparedStatement" connection="true" return="rowCount">
    <Sql><![CDATA[
        INSERT INTO C_Invoice
        (
C_Invoice_ID
, Processing
, DatePrinted
, IsPrinted
, Processed
, SendEMail
, IsSOTrx
, IsSelfService
, IsTaxIncluded
, IsTransferred
, AD_Client_ID
, AD_Org_ID
, C_Order_ID
, DateOrdered
, DocumentNo
, POReference
, Description
, IsActive
, C_DocTypeTarget_ID
, DateInvoiced
, DateAcct
, C_BPartner_ID
, C_BPartner_Location_ID
, AD_User_ID
, M_PriceList_ID
, C_Currency_ID
, SalesRep_ID
, IsDiscountPrinted
, C_Charge_ID
, ChargeAmt
, PaymentRule
, C_PaymentTerm_ID
, CreateFrom
, GenerateTo
, C_Project_ID
, C_Activity_ID
, C_Campaign_ID
, AD_OrgTrx_ID
, User1_ID
, User2_ID
, TotalLines
, GrandTotal
, DocStatus
, C_DocType_ID
, CopyFrom
, DocAction
, Posted

, created, createdby, updated, updatedBy)
        VALUES (
TO_NUMBER(?)
, (?)
, TO_DATE(?)
, (?)
, (?)
, (?)
, (?)
, (?)
, (?)
, (?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_DATE(?)
, (?)
, (?)
, (?)
, (?)
, TO_NUMBER(?)
, TO_DATE(?) 
, TO_DATE(?) 
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, TO_NUMBER(?)
, (?)
, (?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, TO_NUMBER(?)
, (?)
, (?)
, (?)

, now(), to_number(?), now(), to_number(?))
    ]]></Sql>
    
<Parameter name="cInvoiceId"/>
<Parameter name="processing"/>
<Parameter name="dateprinted"/>
<Parameter name="isprinted"/>
<Parameter name="processed"/>
<Parameter name="sendemail"/>
<Parameter name="issotrx"/>
<Parameter name="isselfservice"/>
<Parameter name="istaxincluded"/>
<Parameter name="istransferred"/>
<Parameter name="adClientId"/>
<Parameter name="adOrgId"/>
<Parameter name="cOrderId"/>
<Parameter name="dateordered"/>
<Parameter name="documentno"/>
<Parameter name="poreference"/>
<Parameter name="description"/>
<Parameter name="isactive"/>
<Parameter name="cDoctypetargetId"/>
<Parameter name="dateinvoiced"/>
<Parameter name="dateacct"/>
<Parameter name="cBpartnerId"/>
<Parameter name="cBpartnerLocationId"/>
<Parameter name="adUserId"/>
<Parameter name="mPricelistId"/>
<Parameter name="cCurrencyId"/>
<Parameter name="salesrepId"/>
<Parameter name="isdiscountprinted"/>
<Parameter name="cChargeId"/>
<Parameter name="chargeamt"/>
<Parameter name="paymentrule"/>
<Parameter name="cPaymenttermId"/>
<Parameter name="createfrom"/>
<Parameter name="generateto"/>
<Parameter name="cProjectId"/>
<Parameter name="cActivityId"/>
<Parameter name="cCampaignId"/>
<Parameter name="adOrgtrxId"/>
<Parameter name="user1Id"/>
<Parameter name="user2Id"/>
<Parameter name="totallines"/>
<Parameter name="grandtotal"/>
<Parameter name="docstatus"/>
<Parameter name="cDoctypeId"/>
<Parameter name="copyfrom"/>
<Parameter name="docaction"/>
<Parameter name="posted"/>
<Parameter name="createdby"/>
<Parameter name="updatedby"/>
</SqlMethod>

 <SqlMethod name="insertLine" type="preparedStatement" connection="true" return="rowCount">
     <Sql><![CDATA[
INSERT INTO C_InvoiceLine
(
AD_Client_ID
, AD_Org_ID
, C_Invoice_ID
, C_OrderLine_ID
, Line
, M_InOutLine_ID
, M_Product_ID
, C_Charge_ID
, Description
, QuantityOrder
, M_Product_Uom_Id
, QtyInvoiced
, C_UOM_ID
, PriceActual
, PriceList
, C_Tax_ID
, LineNetAmt
, S_ResourceAssignment_ID
, PriceStd
, PriceLimit
, M_Offer_ID
, M_AttributeSetInstance_ID
, TaxAmt
, IsActive
, ChargeAmt
, C_Projectline_ID
, C_Invoice_Discount_ID
, C_InvoiceLine_ID
, A_Asset_ID
, IsDescription
, created, createdby, updated, updatedBy)
VALUES (
TO_NUMBER(?)
,  TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
,  TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, TO_NUMBER(?)
, TO_NUMBER(?)
, TO_NUMBER(?)
 , TO_NUMBER(?)
, TO_NUMBER(?)
, (?)
, now(), to_number(?), now(), to_number(?))
]]></Sql>
<Parameter name="adClientId"></Parameter>
<Parameter name="adOrgId"></Parameter>
<Parameter name="cInvoiceId"></Parameter>
<Parameter name="cOrderlineId"></Parameter>
<Parameter name="line"></Parameter>
<Parameter name="mInoutlineId"></Parameter>
<Parameter name="mProductId"></Parameter>
<Parameter name="cChargeId"></Parameter>
<Parameter name="description"></Parameter>
<Parameter name="quantityorder"></Parameter>
<Parameter name="mProductUomId"></Parameter>
<Parameter name="qtyinvoiced"></Parameter>
<Parameter name="cUomId"></Parameter>
<Parameter name="priceactual"></Parameter>
<Parameter name="pricelist"></Parameter>
<Parameter name="cTaxId"></Parameter>
<Parameter name="linenetamt"></Parameter>
<Parameter name="sResourceassignmentId"></Parameter>
<Parameter name="pricestd"></Parameter>
<Parameter name="pricelimit"></Parameter>
<Parameter name="mOfferId"></Parameter>
<Parameter name="mAttributesetinstanceId"></Parameter>
<Parameter name="taxamt"></Parameter>
<Parameter name="isactive"></Parameter>
<Parameter name="chargeamt"></Parameter>
<Parameter name="cProjectlineId"></Parameter>
<Parameter name="cInvoiceDiscountId"></Parameter>
<Parameter name="cInvoicelineId"></Parameter>
<Parameter name="aAssetId"></Parameter>
<Parameter name="isdescription"></Parameter>
<Parameter name="createdby"></Parameter>
<Parameter name="updatedby"></Parameter>
</SqlMethod>

<SqlMethod name="insertInvoicelineAcctdimension" type="preparedStatement" connection="true" return="rowCount">
  <Sql>
    <![CDATA[
      INSERT INTO C_INVOICELINE_ACCTDIMENSION(C_INVOICELINE_ACCTDIMENSION_ID
      , AD_CLIENT_ID
      , AD_ORG_ID
      , ISACTIVE
      , CREATED
      , CREATEDBY
      , UPDATED
      , UPDATEDBY
      , C_INVOICELINE_ID
      , AMT
      , C_PROJECT_ID
      , C_CAMPAIGN_ID
      , USER1_ID
      , USER2_ID)
      VALUES(TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , ?
      , now()
      , TO_NUMBER(?)
      , now()
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?)
      , TO_NUMBER(?))
      ]]>
    </Sql>
    <Parameter name="cInvoicelineAcctdimension"/>
    <Parameter name="adClientId"/>
    <Parameter name="adOrgId"/>
    <Parameter name="isactive"/>
    <Parameter name="createdby"/>
    <Parameter name="updatedby"/>
    <Parameter name="cInvoicelineId"/>
    <Parameter name="amt"/>
    <Parameter name="cProjectId"/>
    <Parameter name="cCampaignId"/>
    <Parameter name="user1Id"/>
    <Parameter name="user2Id"/>
  </SqlMethod>

  <SqlMethod name="updateExpense" type="preparedStatement" connection="true" return="rowCount">
    <Sql><![CDATA[
        UPDATE S_TimeExpenseLine SET C_InvoiceLine_ID = TO_NUMBER(?)
        WHERE S_TimeExpenseLine_ID = TO_NUMBER(?)
    ]]></Sql>
  <Parameter name="cInvoiceLineId"/>
  <Parameter name="sTimeExpenseLineId"/>
</SqlMethod>

 <SqlMethod name="updateInvoiceline" type="preparedStatement" connection="true" return="rowCount">
   <Sql><![CDATA[
        UPDATE C_INVOICELINE SET QTYINVOICED = ?, LINENETAMT = ?
        WHERE C_INVOICELINE_ID = TO_NUMBER(?)
    ]]></Sql>
  <Parameter name="qtyinvoiced"/>
  <Parameter name="linenetamt"/>
  <Parameter name="cInvoicelineId"/>
</SqlMethod>

<SqlMethod name="updateAcctdimension" type="preparedStatement" connection="true" return="rowCount">
  <Sql><![CDATA[
      UPDATE C_INVOICELINE_ACCTDIMENSION SET AMT = ?
      WHERE C_INVOICELINE_ACCTDIMENSION_ID = TO_NUMBER(?)
    ]]></Sql>
  <Parameter name="qtyinvoiced"/>
  <Parameter name="cInvoicelineId"/>
</SqlMethod>
</SqlClass>