src/org/openbravo/erpCommon/ad_forms/EdiFileImport_data.xsql
author Asier Lostalé <asier.lostale@openbravo.com>
Mon, 05 May 2008 06:59:24 +0000
changeset 799 fef2c5e2feb7
parent 593 42d0fd250393
child 1605 8a0fe0193bef
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-2006 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->





<SqlClass name="EdiFileImportData" package="org.openbravo.erpCommon.ad_forms">
	<SqlClassComment></SqlClassComment>

	<SqlMethod name="select" type="preparedStatement" return="multiple">
			<SqlMethodComment></SqlMethodComment>
			<Sql> <![CDATA[
				select I_ORDER_ID, AD_CLIENT_ID, AD_ORG_ID, AD_ORGTRX_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY,
				I_ISIMPORTED, I_ERRORMSG, PROCESSING, PROCESSED, SALESREP_ID, M_WAREHOUSE_ID, M_PRICELIST_ID, C_CURRENCY_ID,
				M_SHIPPER_ID, ISSOTRX, C_BPARTNER_ID, BPARTNERVALUE, NAME, C_BPARTNER_LOCATION_ID, BILLTO_ID, C_LOCATION_ID,
				ADDRESS1, ADDRESS2, POSTAL, CITY, C_REGION_ID, REGIONNAME, C_COUNTRY_ID, COUNTRYCODE, AD_USER_ID, CONTACTNAME,
				EMAIL, PHONE, C_PROJECT_ID, C_ACTIVITY_ID, C_DOCTYPE_ID, DOCTYPENAME, C_PAYMENTTERM_ID, PAYMENTTERMVALUE,
				C_ORDER_ID, DOCUMENTNO, DESCRIPTION, M_PRODUCT_ID, PRODUCTVALUE, UPC, SKU, C_TAX_ID, TAXINDICATOR, TAXAMT,
				C_ORDERLINE_ID, LINEDESCRIPTION, C_UOM_ID, QTYORDERED, PRICEACTUAL, C_CAMPAIGN_ID, DATEORDERED,
				DATEPROMISED, ORDER_REFERENCENO, BPARTNERUPC, BILLTO_UPC, C_BPARTNER_LOCATION_UPC, VENDOR_UPC
				from i_order
				where I_ORDER_ID = TO_NUMBER(?)
			]]></Sql>
		<Parameter name="iOrderId"/>
	</SqlMethod>

	<SqlMethod name="insert" type="preparedStatement" connection="true" return="rowCount" static="false">
		<SqlMethodComment></SqlMethodComment>
		<Sql>
			<![CDATA[
				INSERT INTO I_ORDER (
				i_order_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, i_isimported,
				issotrx, processing, processed, order_Referenceno, dateordered, datepromised, upc,
				linedescription, qtyordered, bpartnerupc, doctypename, billto_upc, description, c_bpartner_location_upc, vendor_upc)
				VALUES(TO_NUMBER(?), TO_NUMBER(?), TO_NUMBER(?), 'Y', now(), TO_NUMBER(?), now(), TO_NUMBER(?), ?, ?, ?, ?, ?, to_date(?, 'yyyymmdd'), to_date(?, 'yyyymmdd'), ?, ?, TO_NUMBER(?), ?, ?, ?, ?, ?, ?)
		]]>
		</Sql>
		<Parameter name="iOrderId"/>
		<Parameter name="adClientId"/>
		<Parameter name="adOrgId"/>
		<Parameter name="adUserId"/>
		<Parameter name="adUserId"/>
		<Parameter name="iIsimported"/>
		<Parameter name="issotrx"/>
		<Parameter name="processing"/>
		<Parameter name="processed"/>
		<Parameter name="orderReferenceno"/>
		<Parameter name="dateordered"/>
		<Parameter name="datepromised"/>
		<Parameter name="upc"/>
		<Parameter name="linedescription"/>
		<Parameter name="qtyordered"/>
		<Parameter name="bpartnerupc"/>
		<Parameter name="doctypename"/>
		<Parameter name="billtoUpc"/>
		<Parameter name="description"/>
		<Parameter name="cBpartnerLocationUpc"/>
		<Parameter name="vendorUpc"/>
	</SqlMethod>

	<SqlMethod name="delete" type="preparedStatement" connection="true" return="rowCount">
		<SqlMethodComment></SqlMethodComment>
		<Sql>
			<![CDATA[
				DELETE FROM I_ORDER
				where ad_client_ID = TO_NUMBER(?)
		]]>
		</Sql>
		<Parameter name="client"/>
	</SqlMethod>

</SqlClass>