From 1e57d9ff53b53abfaee9b5dca2cd79f18cf57f8e Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Fri, 12 Oct 2012 10:51:24 +0530 Subject: [PATCH] IDEMPIERE-460 - Integratind and migrating 3e service to idempiere --- org.idempiere.webservices/.classpath | 24 + org.idempiere.webservices/.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 7 + .../.settings/org.eclipse.pde.core.prefs | 3 + .../META-INF/MANIFEST.MF | 39 + .../Notes/HowToAddNewWebService.txt | 31 + .../HowToCallWebServiceFromOraclePLSQL.txt | 93 + org.idempiere.webservices/Notes/notes.txt | 42 + .../WEB-INF/classes/META-INF/context.xml | 2 + .../WEB-INF/classes/META-INF/cxf/services.xml | 29 + .../WEB-INF/src/META-INF/context.xml | 2 + .../WEB-INF/src/META-INF/cxf/services.xml | 29 + .../_3e/ADInterface/ADDataStatusListener.java | 87 + .../src/com/_3e/ADInterface/ADInfo.java | 16 + .../src/com/_3e/ADInterface/ADLookup.java | 528 ++++++ .../src/com/_3e/ADInterface/ADService.java | 63 + .../com/_3e/ADInterface/ADServiceImpl.java | 1626 +++++++++++++++++ .../com/_3e/ADInterface/CompiereService.java | 339 ++++ .../src/com/_3e/ADInterface/CompiereUtil.java | 62 + .../src/com/_3e/ADInterface/InfoBPartner.java | 312 ++++ .../src/com/_3e/ADInterface/InfoProduct.java | 473 +++++ .../src/com/_3e/ADInterface/Info_Column.java | 143 ++ .../com/_3e/ADInterface/ModelADService.java | 69 + .../_3e/ADInterface/ModelADServiceImpl.java | 1058 +++++++++++ .../src/com/_3e/ADInterface/Process.java | 1090 +++++++++++ .../com/_3e/ADInterface/ReportEngineEx.java | 344 ++++ .../com/_3e/ADInterface/WWindowStatus.java | 200 ++ .../src/com/adaxa/ws/WebstoreService.java | 22 + .../src/com/adaxa/ws/WebstoreServiceImpl.java | 579 ++++++ .../ObPOSInterface/ExternalSales.java | 56 + .../ObPOSInterface/ExternalSalesImpl.java | 171 ++ .../globalqss/ObPOSInterface/WebService.java | 60 + .../ObPOSInterface/WebServiceImpl.java | 78 + .../data/CompiereDataSourceFactory.java | 51 + .../src/net/sf/compilo/data/DBDataSource.java | 241 +++ .../sf/compilo/data/ReportViewDataSource.java | 103 ++ .../sf/compilo/data/compiereDataSource.java | 49 + .../src/net/sf/compilo/data/sqlProcessor.java | 44 + .../src/net/sf/compilo/report/FileFilter.java | 63 + .../src/net/sf/compilo/report/ReportInfo.java | 385 ++++ .../src/net/sf/compilo/report/ReportPool.java | 102 ++ .../sf/compilo/report/ReportProcessor.java | 268 +++ .../engine/util/JRQueryExecuter.java | 341 ++++ .../org/compiere/model/I_WS_WebService.java | 170 ++ .../model/I_WS_WebServiceFieldInput.java | 144 ++ .../model/I_WS_WebServiceFieldOutput.java | 144 ++ .../compiere/model/I_WS_WebServiceMethod.java | 181 ++ .../compiere/model/I_WS_WebServiceType.java | 207 +++ .../model/I_WS_WebServiceTypeAccess.java | 148 ++ .../compiere/model/I_WS_WebService_Para.java | 160 ++ .../src/org/compiere/model/MWebService.java | 214 +++ .../org/compiere/model/MWebServiceType.java | 273 +++ .../org/compiere/model/X_WS_WebService.java | 170 ++ .../model/X_WS_WebServiceFieldInput.java | 154 ++ .../model/X_WS_WebServiceFieldOutput.java | 154 ++ .../compiere/model/X_WS_WebServiceMethod.java | 195 ++ .../compiere/model/X_WS_WebServiceType.java | 250 +++ .../model/X_WS_WebServiceTypeAccess.java | 151 ++ .../compiere/model/X_WS_WebService_Para.java | 170 ++ .../webservices/WebServiceActivator.java | 28 + .../fault/IdempiereServiceFault.java | 27 + org.idempiere.webservices/WEB-INF/web.xml | 31 + .../WEB-INF/xsd/BiziWrapper.xsd | 45 + .../WEB-INF/xsd/WebstoreSchema.xsd | 58 + .../WEB-INF/xsd/obschema.xsd | 239 +++ .../WEB-INF/xsd/schema.xsd | 482 +++++ org.idempiere.webservices/build.properties | 28 + .../migration/oracle/WS001_WebServices.sql | 1538 ++++++++++++++++ .../oracle/WS002_WebServicesDefinition.sql | 145 ++ ...003_WebServicesConfigGardenWorldSample.sql | 83 + .../oracle/WS004_WebServicesFixDict.sql | 1 + .../postgresql/WS001_WebServices.sql | 1538 ++++++++++++++++ .../WS002_WebServicesDefinition.sql | 143 ++ ...003_WebServicesConfigGardenWorldSample.sql | 83 + .../postgresql/WS004_WebServicesFixDict.sql | 1 + .../org/idempiere/webservices/Activator.java | 30 + .../AdempiereWebServices-soapui-project.xml | 849 +++++++++ .../testScripts/MsgModelRunProcess | 23 + .../testScripts/MsgModelSetDocAction | 25 + .../testScripts/TestModelMsg.sh | 18 + 80 files changed, 17652 insertions(+) create mode 100644 org.idempiere.webservices/.classpath create mode 100644 org.idempiere.webservices/.project create mode 100644 org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs create mode 100644 org.idempiere.webservices/META-INF/MANIFEST.MF create mode 100644 org.idempiere.webservices/Notes/HowToAddNewWebService.txt create mode 100644 org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt create mode 100644 org.idempiere.webservices/Notes/notes.txt create mode 100644 org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml create mode 100644 org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml create mode 100644 org.idempiere.webservices/WEB-INF/src/META-INF/context.xml create mode 100644 org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADServiceImpl.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ReportEngineEx.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/ReportViewDataSource.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportInfo.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java create mode 100644 org.idempiere.webservices/WEB-INF/src/net/sf/jasperreports/engine/util/JRQueryExecuter.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java create mode 100644 org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java create mode 100644 org.idempiere.webservices/WEB-INF/web.xml create mode 100644 org.idempiere.webservices/WEB-INF/xsd/BiziWrapper.xsd create mode 100644 org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd create mode 100644 org.idempiere.webservices/WEB-INF/xsd/obschema.xsd create mode 100644 org.idempiere.webservices/WEB-INF/xsd/schema.xsd create mode 100644 org.idempiere.webservices/build.properties create mode 100644 org.idempiere.webservices/migration/oracle/WS001_WebServices.sql create mode 100644 org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql create mode 100644 org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql create mode 100644 org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql create mode 100644 org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql create mode 100644 org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql create mode 100644 org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql create mode 100644 org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql create mode 100644 org.idempiere.webservices/src/org/idempiere/webservices/Activator.java create mode 100644 org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml create mode 100644 org.idempiere.webservices/testScripts/MsgModelRunProcess create mode 100644 org.idempiere.webservices/testScripts/MsgModelSetDocAction create mode 100644 org.idempiere.webservices/testScripts/TestModelMsg.sh diff --git a/org.idempiere.webservices/.classpath b/org.idempiere.webservices/.classpath new file mode 100644 index 0000000000..00507cc099 --- /dev/null +++ b/org.idempiere.webservices/.classpath @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/.project b/org.idempiere.webservices/.project new file mode 100644 index 0000000000..06105d6c9b --- /dev/null +++ b/org.idempiere.webservices/.project @@ -0,0 +1,28 @@ + + + org.idempiere.webservices + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs b/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f287d53cf4 --- /dev/null +++ b/org.idempiere.webservices/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs b/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..b7e72d019c --- /dev/null +++ b/org.idempiere.webservices/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/org.idempiere.webservices/META-INF/MANIFEST.MF b/org.idempiere.webservices/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..e939c9af2e --- /dev/null +++ b/org.idempiere.webservices/META-INF/MANIFEST.MF @@ -0,0 +1,39 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Webservices +Bundle-SymbolicName: org.idempiere.webservices;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.idempiere.webservices.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: javax.servlet;version="3.0.0", + javax.servlet.http;version="3.0.0", + org.apache.commons.codec;version="1.3.0", + org.apache.commons.codec.binary;version="1.3.0", + org.apache.commons.logging;version="1.1.1", + org.osgi.framework;version="1.3.0" +Require-Bundle: org.adempiere.base;bundle-version="1.0.0", + org.adempiere.report.jasper.library;bundle-version="1.0.0", + org.adempiere.ui;bundle-version="1.0.0", + org.apache.ecs;bundle-version="1.0.0" +Bundle-ClassPath: WEB-INF/lib/stax2-api-3.1.1.jar, + WEB-INF/lib/spring-web-3.0.7.RELEASE.jar, + ., + WEB-INF/lib/spring-context-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-core-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar, + WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar, + WEB-INF/lib/wsdl4j-1.6.2.jar, + WEB-INF/lib/cxf-2.6.2.jar, + WEB-INF/lib/neethi-3.0.2.jar, + WEB-INF/lib/xmlschema-core-2.0.3.jar, + WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar, + WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar, + WEB-INF/lib/generated_xbeans.jar, + WEB-INF/lib/xmlbeans-2.5.0.jar, + WEB-INF/lib/composite_XMLSBean.jar +Export-Package: com._3e.ADInterface, + com.adaxa.ws, + com.adaxa.ws.impl, + com.globalqss.ObPOSInterface +Web-ContextPath: ADInterface diff --git a/org.idempiere.webservices/Notes/HowToAddNewWebService.txt b/org.idempiere.webservices/Notes/HowToAddNewWebService.txt new file mode 100644 index 0000000000..169c5043aa --- /dev/null +++ b/org.idempiere.webservices/Notes/HowToAddNewWebService.txt @@ -0,0 +1,31 @@ +How to add a new WebService in 3E_WebServices + +i.e. +we're going to add a webservice to complete documents +the new webservice will have the following parameters: +* ADLoginRequest - it's already defined in ADInterface/src/xsd/schema.xsd with the following parameters: + user, pass, lang, ClientID, RoleID, OrgID, WarehouseID, stage +* TableName String -> M_InOut +* Record_ID int -> 1000002 +* DocStatus String -> CO + +Note, if you need to define new datatypes you need to define them in ADInterface/src/xsd/schema.xsd +and generate the pl3xe.jar again with this command: + scomp -out ./lib/pl3xE.jar ADInterface/src/xsd/schema.xsd +scomp will generate the corresponding classes to manipulate the xml objects from the messages + + +The method will be called modelSetDocAction - the model in name indicates that the web service is going to be based on model classes, current web services are based in UI instead of model. + +So, we add this line: + public StandardResponseDocument modelSetDocAction(String tableName, int recordID, String newDocStatus, ADLoginRequestDocument reqlogin) throws XFireFault; +at the interface 3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADService.java +NOTE: In parameters, complex data must be at the end + +Now, we need to implement the method, so we open the file +3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADServiceImpl.java + +And add the new method and define the corresponding logic within. + + + diff --git a/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt b/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt new file mode 100644 index 0000000000..721cc5ce09 --- /dev/null +++ b/org.idempiere.webservices/Notes/HowToCallWebServiceFromOraclePLSQL.txt @@ -0,0 +1,93 @@ +-- Example about how to call modelSetDocAction from oracle pl/sql function +-- Following sample from http://technology.amis.nl/blog/358/consuming-web-services-from-plsql-part-ii-a-pure-plsql-solution-using-utl_http-oracle-9i-or-10g + +CREATE OR REPLACE FUNCTION ws_modelsetdocaction ( + p_table IN ad_table.tablename%TYPE, + p_recordid IN m_inout.m_inout_id%TYPE, + p_newdocstatus IN m_inout.docstatus%TYPE, + p_user IN ad_user.NAME%TYPE, + p_password IN ad_user.PASSWORD%TYPE, + p_language IN ad_language.ad_language%TYPE, + p_client_id IN ad_client.ad_client_id%TYPE, + p_role_id IN ad_role.ad_role_id%TYPE, + p_org_id IN ad_org.ad_org_id%TYPE, + p_warehouse_id IN m_warehouse.m_warehouse_id%TYPE +) + RETURN VARCHAR2 +AS + server VARCHAR2 (100) := '127.0.0.1:8081'; + soap_request VARCHAR2 (30000); + soap_respond VARCHAR2 (30000); + http_req UTL_HTTP.req; + http_resp UTL_HTTP.resp; + resp XMLTYPE; +BEGIN + soap_request := + ' + + + + ' || p_table || ' + ' || p_recordid || ' + ' || p_newdocstatus || ' + + ' || p_user || ' + ' || p_password || ' + ' || p_language || ' + ' || p_client_id || ' + ' || p_role_id || ' + ' || p_org_id || ' + ' || p_warehouse_id || ' + + + + +'; + UTL_HTTP.set_transfer_timeout (5); + http_req := + UTL_HTTP.begin_request ( 'http://' || server || '/ADInterface/services/ADService', + 'POST', + 'HTTP/1.1' + ); + UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml'); + UTL_HTTP.set_header (http_req, 'Content-Length', LENGTH (soap_request)); + UTL_HTTP.write_text (http_req, soap_request); + http_resp := UTL_HTTP.get_response (http_req); + UTL_HTTP.read_text (http_resp, soap_respond); + UTL_HTTP.end_response (http_resp); + RETURN soap_respond; +/* + -- Create an XMLType variable containing the Response XML + resp := XMLTYPE.createxml (soap_respond); + -- extract from the XMLType Resp the child-nodes of the element + resp := + resp.EXTRACT ('/soap:Envelope/soap:Body/child::node()', + 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' + ); + -- extract from the XMLType Resp the text() nodes from the n:getRateResponse/Result element + resp := + resp.EXTRACT ('n:getRateResponse/Result/text()', + 'xmlns:n="urn:xmethods-CurrencyExchange"' + ); + RETURN resp.getclobval (); +*/ +END; +/ + + +-- Now you can make a call to the function with this example: +-- example to COmplete M_InOut with M_Inout_ID=1000002 +/* +select ws_modelsetdocaction ( + 'M_InOut', + 1000002, + 'CO', + 'SuperUser', + 'System', + 'es_CO', + 11, + 102, + 11, + 103) + from dual; +*/ diff --git a/org.idempiere.webservices/Notes/notes.txt b/org.idempiere.webservices/Notes/notes.txt new file mode 100644 index 0000000000..71fbd02ad9 --- /dev/null +++ b/org.idempiere.webservices/Notes/notes.txt @@ -0,0 +1,42 @@ +== structure of exchanged data records: + + + + + + + + ... + + + + ... + + + + ... + + + +== Example. Still not finished! +open questions: +Where does it specify Table name? + + + + + 100000 + + + + + + 100000 + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml b/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml new file mode 100644 index 0000000000..3d17e74718 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/classes/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml b/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml new file mode 100644 index 0000000000..32b51508ad --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/classes/META-INF/cxf/services.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml b/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml new file mode 100644 index 0000000000..3d17e74718 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml b/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml new file mode 100644 index 0000000000..32b51508ad --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/META-INF/cxf/services.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java new file mode 100644 index 0000000000..a96ae189dd --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADDataStatusListener.java @@ -0,0 +1,87 @@ +package com._3e.ADInterface; + +import java.util.Properties; + +import org.compiere.model.DataStatusEvent; +import org.compiere.model.DataStatusListener; +import org.compiere.util.CLogger; +import org.compiere.util.Msg; + + +public class ADDataStatusListener implements DataStatusListener { + + protected static CLogger log = CLogger.getCLogger( ADDataStatusListener.class); + public String m_status_data; + public boolean m_is_status_error; + public String m_error_message; + public String m_error_info; + public boolean m_is_error; + private Properties m_ctx; + + public ADDataStatusListener( Properties _ctx ) + { + m_ctx = _ctx; + m_is_status_error = false; + m_is_error = false; + } + + public void dataStatusChanged(DataStatusEvent e) + { + this.m_status_data = e.getInfo(); + + + String dbInfo = e.getMessage(); + //if (curTab != null && curTab.isQueryActive()) + // dbInfo = "[ " + dbInfo + " ]"; + //m_status_db = dbInfo; + + log.info( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" "); + //System.out.println( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" "); + + // Set Message / Info + if (e.getAD_Message() != null || e.getInfo() != null) + { + StringBuffer sb = new StringBuffer(); + String msg = e.getMessage(); + if (msg != null && msg.length() > 0) + sb.append(Msg.getMsg(m_ctx, e.getAD_Message())); + String info = e.getInfo(); + if (info != null && info.length() > 0) + { + if (sb.length() > 0 && !sb.toString().trim().endsWith(":")) + sb.append(": "); + sb.append(info); + } + if (sb.length() > 0) + { + int pos = sb.indexOf("\n"); + if (pos != -1) // replace CR/NL + sb.replace(pos, pos+1, " - "); + setStatusLine (sb.toString (), e.isError ()); + } + } + + // Confirm Error + if (e.isError() && !e.isConfirmed()) + { + m_is_error = true; + m_error_message = e.getAD_Message(); + m_error_info = e.getInfo(); + //setStatusError( Msg.getMsg(m_ctx, e.getAD_Message()), Msg.getMsg(m_ctx, e.getInfo())); + e.setConfirmed(true); // show just once - if GridTable.setCurrentRow is involved the status event is re-issued + } else + m_is_error = false; + } + + public void setStatusLine( String msg, boolean is_error ) + { + this.m_status_data = msg ; + this.m_is_status_error = is_error; + //else + // this.m_status_data = " "+msg+" "; + } + + + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java new file mode 100644 index 0000000000..2c6ad6e124 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADInfo.java @@ -0,0 +1,16 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.SQLException; + +import pl.x3E.adInterface.DataRow; + +public interface ADInfo { + public void setParameters( PreparedStatement pstmt, boolean forCount) throws SQLException; + //public String getSQLWhere(); + public String getSQL(); + public String getSQLCount(); + + public DataRow getColumns(); + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java new file mode 100644 index 0000000000..c365c8c07a --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ADLookup.java @@ -0,0 +1,528 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.model.GridField; +import org.compiere.model.Lookup; +import org.compiere.model.MLookup; +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.ValueNamePair; +import org.compiere.util.WebSessionCtx; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.DataSet; +import pl.x3E.adInterface.LookupValue; +import pl.x3E.adInterface.LookupValues; + +/* + * ADEMPIERE/COMPIERE + * + * zamiana: + * GridField na GridField + * GridField + */ + +// TODO: Implement a better replacement for ROWNUM / LIMIT syntax + +public class ADLookup { + + + static final int TYPE_PRODUCT = 001; + static final int TYPE_ORDER = 002; + static final int TYPE_BUISNESS_PARTNER = 002; + + private String m_columnName; + private int m_type; + private String m_tableName; + private String m_keyColumnName; + private Boolean IsQueryJoin; + private boolean m_isSOTRX; + + private final int MAX_PRODUCT_ROWS=500; + + private WebSessionCtx wsc; + private Lookup m_lookup; + + protected static CLogger log = CLogger.getCLogger(ADLookup.class); + + + public ADLookup( String columnName ) + { + m_columnName = columnName; + + } + + + public ArrayList GetLookupData() + { + + return null; + } + + + + private String getWhereClause( String keyColumn, DataRow params ) { + String whereClause = "IsSummary='N'"; + String lookupColumn = keyColumn; + + return whereClause; + } + + private DataSet getResult( com._3e.ADInterface.ADInfo info, DataSet ds, int count, String mode ) { + if ("count".equals(mode) && count > 1) { + DataRow dr = ds.addNewDataRow(); + DataField df = dr.addNewField(); + df.setVal( ""+count ); + df.setColumn( "__count" ); + df.setType( "string" ); + return ds; + } + + try { + + PreparedStatement pstmt = DB.prepareStatement( info.getSQL() ); + info.setParameters( pstmt, false ); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + DataRow dr = ds.addNewDataRow(); + DataField df = null; + //DataField df = dr.addNewField(); + + DataRow cols = info.getColumns(); + + for (int i=0; i< cols.sizeOfFieldArray(); i++ ) { + df = dr.addNewField(); + DataField f = cols.getFieldArray(i); + //if ("string".equalsIgnoreCase(f.getType())) { + { + df.setVal(rs.getString( i + 1 )); + df.setColumn( f.getColumn() ); + df.setType( f.getType() ); + df.setLval( f.getLval() ); + } + } + + } + rs.close(); + pstmt.close(); + } + catch (Exception e) + { + System.out.println( e.getMessage() ); + } + return ds; + } + + + + + public void getLookupSearchValues( DataRow adr, DataSet ds, Properties ctx, int windowNo ) + { + //String whereClause = getWhere(adr); + String whereClause = getWhereClause(m_columnName, adr); + String finalSQL=""; + + IsQueryJoin = false; + + String mode = "normal"; + for (int i=0; i< adr.sizeOfFieldArray(); i++) { + DataField f = adr.getFieldArray(i); + if ("mode".equalsIgnoreCase(f.getColumn())) mode = f.getVal(); + } + + + ADInfo info = null; + + // TODO: Implement info for generic lookups !! + + if (m_columnName.equals("C_BPartner_ID")) + { + //finalSQL = getBuisnessPartnerSQL(whereClause, adr); + info = new InfoBPartner( adr, whereClause ); + } else if (m_columnName.equals("M_Product_ID")) + { + info = new InfoProduct( adr, whereClause, ctx, windowNo ); + //finalSQL = getProductSQL(whereClause); + }else if (m_columnName.equals("C_Order_ID")) { + //finalSQL = getOrderAccessSQL(whereClause); + } + if (finalSQL.equals("")) { + //finalSQL = getDirectAccessSQL(whereClause); + } + + + //Sprawdzam czy przy wykonaniu FinalSql zwr�ci mi 0, 1 lub wiele wierszy + //Je�eli zwr�ci mi 0 wierszy to ko�cz� + //Je�eli zwr�ci mi 1 wiersz to ko�cowy wynik b�dzie kwerend� normaln� (w przypadku join�w, np.: bp zostanie wykonana alternatywna kwerenda bez join�w) + //Je�eli zwr�ci mi n wierszy to zwracam je + int id = 0; + log.info("Starting execution to base"); + try + { + /* + PreparedStatement pstmt = DB.prepareStatement( finalSQL ); + info.setParameters( pstmt, true); + ResultSet rs = pstmt.executeQuery(); + //Wykonuje zapytanie do bazy z "normalnym" sql i sprawdzam ile, mam wierszy wyniku + int ile = 0; + while (rs.next()) + { + ile = ile+1; + }*/ + int ile = 0; + finalSQL = info.getSQLCount(); + PreparedStatement pstmt = DB.prepareStatement(finalSQL, null); + info.setParameters (pstmt, true); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + ile = rs.getInt(1); + rs.close(); + pstmt.close(); + + System.out.println("Znalaz�em " + ile + " wierszy / rekord�w"); + //Je�eli jest 0 wierszy to ko�czymy + //w kliencie spowoduje to wyswietlenie pustego okna lookUp + if (ile==0) + { + System.out.println("Nie znalaz�em rekord�w. W kliencie zostanie wy�wietlone okno LookUp'a bez rekord�w."); + } + //Je�eli jest tylko jeden wiersz to odpowiednie tabele b�d� wywo�ywane bez + //join�w + if ((ile==1)) + { + System.out.println("Znalaz�em 1 rekord wi�c szukam dla bez join. W kliencie zostanie automatycznie uzupe�niona warto�c"); + IsQueryJoin = false; + } + //Jesli wiecej niz jeden to uzywamy join�w + //Spowoduje to wyswietlenie rekord�w spe�niajacych kryterium + //w oknie LookUp'a + if (ile>1) + { + System.out.println("Znalaz�em wi�cej ni� 1 rekord wi�c szukam dla whereClause i z joinami. W kliencie zostanie wy�wietlone LookUpWindow z przefiltrowanymi rekordami."); + IsQueryJoin = true; + + } + ds = getResult(info, ds, ile, mode); + } + catch (Exception e) + { + log.log(Level.SEVERE, finalSQL, e); + id = -2; + } + // No (unique) result + if (id <= 0) + { + if (id == 0) + log.fine("Not Found - " + finalSQL); + else + log.fine("Not Unique - " + finalSQL); + //m_value = null; // force re-display + //actionButton(m_text.getText()); + //return r; + } + log.fine("Unique ID=" + id); + + } // actionText + + /** + * Generate Access SQL for Search. + * The SQL returns the ID of the value entered + * Also sets m_tableName and m_keyColumnName + * @param text uppercase text for LIKE comparison + * @return sql or "" + * Example + * SELECT C_Payment_ID FROM C_Payment WHERE UPPER(DocumentNo) LIKE x OR ... + */ + private String getDirectAccessSQL (String text) + { + //Tutaj trzeba doda� dodatkowe pole dla odpowiednich typ�w wyszukiwania w selectach + StringBuffer sql = new StringBuffer(); + m_tableName = m_columnName.substring(0, m_columnName.length()-3); // without _ID + m_keyColumnName = m_columnName; + if (m_columnName.equals("C_Invoice_ID")) + { + sql.append("SELECT C_Invoice_ID, DocumentNo FROM C_Invoice WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("M_InOut_ID")) + { + sql.append("SELECT M_InOut_ID, '' FROM M_InOut WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("C_Payment_ID")) + { + sql.append("SELECT C_Payment_ID, DocumentNo FROM C_Payment WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("GL_JournalBatch_ID")) + { + sql.append("SELECT GL_JournalBatch_ID, '' FROM GL_JournalBatch WHERE UPPER(DocumentNo) LIKE ") + .append(DB.TO_STRING(text)); + } + else if (m_columnName.equals("SalesRep_ID")) + { + sql.append("SELECT AD_User_ID, NAME FROM AD_User WHERE UPPER(Name) LIKE ") + .append(DB.TO_STRING(text)); + m_tableName = "AD_User"; + m_keyColumnName = "AD_User_ID"; + } + + // Predefined + if (sql.length() > 0) + { + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + sql.append(" AND IsActive='Y'"); + + if (DB.isOracle()) + sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + // *** + //log.finest("(predefined) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } + + // Check if it is a Table Reference + // TODO dorobic obsluge where z ad_ref_table !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + if (m_lookup != null && m_lookup instanceof MLookup) + { + int AD_Reference_ID = ((MLookup)m_lookup).getAD_Reference_Value_ID(); + if (AD_Reference_ID != 0) + { + String query = "SELECT kc.ColumnName, dc.ColumnName, t.TableName " + + "FROM AD_Ref_Table rt" + + " INNER JOIN AD_Column kc ON (rt.AD_Key=kc.AD_Column_ID)" + + " INNER JOIN AD_Column dc ON (rt.AD_Display=dc.AD_Column_ID)" + + " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID) " + + "WHERE rt.AD_Reference_ID=?"; + String displayColumnName = null; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query); + pstmt.setInt(1, AD_Reference_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + { + m_keyColumnName = rs.getString(1); + displayColumnName = rs.getString(2); + m_tableName = rs.getString(3); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + //log.log(Level.SEVERE, "getDirectAccessSQL", e); + } + try + { + if (pstmt != null) + pstmt.close(); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + if (displayColumnName != null) + { + sql = new StringBuffer(); + sql.append("SELECT ").append(m_keyColumnName).append(", "+displayColumnName) // kolec - bylo m_displayColumnName + .append(" FROM ").append(m_tableName) + .append(" WHERE UPPER(").append(displayColumnName) + .append(") LIKE ").append(DB.TO_STRING(text)) + .append(" AND IsActive='Y'"); + + if (DB.isOracle()) + sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + sql.append(" AND ").append(wc); + // *** + //log.finest("(Table) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(sql.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } + } // Table Reference + } // MLookup + + /** Check Well Known Columns of Table - assumes TableDir **/ + String query = "SELECT t.TableName, c.ColumnName " + + "FROM AD_Column c " + + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID AND t.IsView='N') " + + "WHERE (c.ColumnName IN ('DocumentNo', 'Value', 'Name') OR c.IsIdentifier='Y')" + + " AND c.AD_Reference_ID IN (10,14)" + + " AND EXISTS (SELECT * FROM AD_Column cc WHERE cc.AD_Table_ID=t.AD_Table_ID" + + " AND cc.IsKey='Y' AND cc.ColumnName=?)"; + m_keyColumnName = m_columnName; + sql = new StringBuffer(); + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement(query); + pstmt.setString(1, m_keyColumnName); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) + { + if (sql.length() != 0) + sql.append(" OR "); + m_tableName = rs.getString(1); + sql.append("UPPER(").append(rs.getString(2)).append(") LIKE ").append(DB.TO_STRING(text)); + } + rs.close(); + pstmt.close(); + pstmt = null; + } + catch (SQLException ex) + { + log.log(Level.SEVERE, "getDirectAccessSQL", ex); + } + try + { + if (pstmt != null) + pstmt.close(); + } + catch (SQLException ex1) + { + } + pstmt = null; + // + if (sql.length() == 0) + { + log.log(Level.SEVERE, "(TableDir) - no standard/identifier columns"); + return ""; + } + // + StringBuffer retValue = new StringBuffer ("SELECT ") + .append(m_columnName).append(" , NAME").append(" FROM ").append(m_tableName) + .append(" WHERE ").append(sql) + .append(" AND IsActive='Y' "); + + if (DB.isOracle()) + retValue.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" "); + String wc = getWhereClause(); + if (wc != null && wc.length() > 0) + retValue.append(" AND ").append(wc); + // *** + log.finest("(TableDir) " + sql.toString()); + + String sqlret = MRole.getDefault().addAccessSQL(retValue.toString(), + m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + if (DB.isPostgreSQL()) + sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS; + + return sqlret; + } // getDirectAccessSQL + + /** + * Get Where Clause + * @return where clause or "" + */ + private String getWhereClause() + { + String whereClause = ""; + if (m_lookup == null) + return ""; + if (m_lookup.getZoomQuery() != null) + whereClause = m_lookup.getZoomQuery().getWhereClause(); + String validation = m_lookup.getValidation(); + if (whereClause.length() == 0) + whereClause = validation; + else + if (validation.length()>0) // kolec + whereClause += " AND " + validation; + // log.finest("ZoomQuery=" + (m_lookup.getZoomQuery()==null ? "" : m_lookup.getZoomQuery().getWhereClause()) + // + ", Validation=" + m_lookup.getValidation()); + if (whereClause.indexOf('@') != -1) + { + String validated = Env.parseContext(wsc.ctx, m_lookup.getWindowNo(), whereClause, false); + if (validated.length() == 0) + log.severe("Cannot Parse=" + whereClause); + else + { + log.fine("Parsed: " + validated); + return validated; + } + } + return whereClause; + } // getWhereClause + + + + + + public static void fillLookupValues( LookupValues lvs, KeyNamePair[] kp ) + { + if (kp!=null && lvs != null) + for (int i=0; i deps = ff.getDependentOn(); + Lookup lookup = ff.getLookup(); + + LookupInfo li = f.addNewLookupInfo(); + if (fo.lookupInfo!=null) { + li.setZoomWindow( fo.lookupInfo.ZoomWindow ); + li.setZoomWindow( fo.lookupInfo.ZoomWindow ); + } + + //if (deps.size()==0) + if (lookup!=null && (fo.ValidationCode==null || (fo.ValidationCode!=null && fo.ValidationCode.length()==0))) { + LookupValues lvs = f.addNewLookup(); + //System.out.println( "lookup "+fo.ColumnName+" "+lookup.getSize() ); + + //if(lookup.size() == 0) - nie robic tego + // System.out.println("lookup refresh ["+fo.ColumnName+"]= "+lookup.refresh()); + /*if(lookup.getSize() > 0)*/ + ArrayList ar = lookup.getData(ff.isMandatory(false), true, !ff.isReadOnly(), true); // the last was false, 2007-05-11 + if (ar != null && ar.size()>0) { + Object[] list = ar.toArray(); + + for (int i=0; iFields = to.getFields(); // adempiere + //ArrayListFields = to.Fields; // compiere + + if (Fields !=null) { + FieldList fl = t.addNewFields(); + for (int i=0; i + 1000000 + + + 1000000 + */ + +// method to convert Document to String + public String getStringFromDocument(Document doc) + { + try + { + DOMSource domSource = new DOMSource(doc); + StringWriter writer = new StringWriter(); + StreamResult result = new StreamResult(writer); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.transform(domSource, result); + return writer.toString(); + } + catch(TransformerException ex) + { + ex.printStackTrace(); + return null; + } + } + + + private Map WindowStatusMap = new HashMap(); + + /* + public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData) { + return getWindowTabData(WindowNo, AD_Window_ID, AD_Menu_ID, TabNo, PrevTabNo, PrevRecNo, getData, 0, -1); + } + + public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData, int RowStart, int RowCount) + { + return null; //TODO + + }*/ + + private MQuery createQuery( String table_name, DataRow dr ) { + MQuery q = new MQuery(table_name); + DataField df[] = dr.getFieldArray(); + for (int i=0; i0 ) + { + q.addRestriction("UPPER("+df[i].getColumn()+")", MQuery.LIKE, df[i].getVal().toUpperCase(), df[i].getColumn(), df[i].getVal().toUpperCase()); + } + } + return q; + } + + + void authenticate(String webServiceName, String method) { + if (!m_cs.isLoggedIn()) + throw new IdempiereServiceFault( new Exception( "You need to login" ) ); + // TODO: Authenticate webservice and method + // TODO: Search for a service type for client and role access with the same value as the method + + // TODO: Increase security! + } + + public WindowTabDataDocument getWindowTabData(WindowTabDataReqDocument reqd) { + authenticate(webServiceName, "getWindowTabData"); + + WindowTabDataReq req = reqd.getWindowTabDataReq(); + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, req.getWindowNo(), false, 0, false, 0); + if (ws == null) + { + GridWindowVO wo = getWindowVO( req.getWindowNo(), req.getADWindowID(), req.getADMenuID() ); + ws = new WWindowStatus(wo); + WindowStatusMap.put(new Integer(req.getWindowNo()), ws); + + ws.curTab.query(ws.mWindow.isTransaction()); //!!!!!!!!!! + ws.curTab.navigate(0); + ws.curTab.setSingleRow(true); + } + + if (ws.curTab.getTabNo() != req.getPrevTabNo()) + { + ws.curTab.removeDataStatusListener(ws.ads); + ws.curTab = ws.mWindow.getTab(req.getPrevTabNo()); + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.updateRecIDMap(); + } + /* + if (ws.curTab.getCurrentRow() != req.getPrevRecNo()) + { + if (req.getPrevRecNo() >=0) + ws.curTab.navigate( req.getPrevRecNo() ); + } + */ + int prevRecNo = ws.getRowNoFromRecordID( req.getPrevRecNo()); // we assume that it RecordID + if (ws.curTab.getCurrentRow() != prevRecNo) + { + if (prevRecNo >=0) + ws.curTab.navigate( prevRecNo ); + } + + + WWindowStatus.changeTabIfNeeded( ws, req.getTabNo() ); + + if (req.getGetData()) + { + if (req.getFromZoom()) { + WWindowStatus ws2 = WWindowStatus.get(WindowStatusMap, req.getFromZoomWindowID(), true, req.getFromZoomTabID(), true, req.getFromZoomRowID()); + System.out.println(ws2.curTab.getTableName()); + GridField field = ws2.curTab.getField(req.getFromZoomColumnName()); + ws2 = null; + if (field == null) return null; + MLookup lookup = (MLookup)field.getLookup(); + if (lookup == null) + return null; + // + MQuery zoomQuery = lookup.getZoomQuery(); + Object value = field.getValue(); + if (value == null) + { + value = req.getFromZoomColumnValue(); + } + // If not already exist or exact value + if (zoomQuery == null || value != null) + { + zoomQuery = new MQuery(); // ColumnName might be changed in GridTab.validateQuery + zoomQuery.addRestriction( req.getFromZoomColumnName(), MQuery.EQUAL, value); + } + ws.curTab.setQuery(zoomQuery); + //ws.curTab.query(ws.mWindow.isTransaction()); + + // ADEMPIERE/COMPIERE + ws.curTab.query(false, 0, 0); // adempiere + //ws.curTab.query(false, 0); // compiere + + } else + { + DataRow findDR = req.getFindCriteria(); + MQuery currentQuery = ws.curTab.getQuery(); + MQuery newQuery = createQuery( ws.curTab.getTableName(), findDR ); + if (findDR.getFieldArray().length>0) { //(!currentQuery.getWhereClause().equals( newQuery.getWhereClause() )) { // change the query for zak�adki + ws.curTab.setQuery(newQuery); + //ws.curTab.query(ws.mWindow.isTransaction()); + + //ADEMPIERE/COMPIERE + ws.curTab.query(false, 0, 0); // adempiere + //ws.curTab.query(false, 0); // compiere + } + } + + + + int rc = 0; + if (req.getRowCount()>0) + rc = req.getRowCount(); else rc = ws.curTab.getRowCount(); + int initRowNo = 0; + if (req.getRowStart() > 0) initRowNo = req.getRowStart(); + + int lastRow = Math.min(rc, initRowNo + MAX_ROWS); //ok + //initRowNo + 5; // only for testing + + wd.setNumRows( lastRow ); + //lastRow += initRowNo; + + wd.setTotalRows( ws.curTab.getRowCount() ); // ok + //wd.setTotalRows( 5 ); // only for testing + + wd.setStartRow(initRowNo); + + Map RecordIDMap = ws.getRecordIDMap(); + try { + RecordIDMap.clear(); + for (int lineNo = initRowNo; lineNo < lastRow; lineNo++) + { + ws.curTab.navigate(lineNo); + + int recID = ws.curTab.getRecord_ID(); + RecordIDMap.put( recID, lineNo ); + + DataRow dr = ds.addNewDataRow(); + //System.out.println("row "+lineNo); + fillDataRow( dr, ws, false, false ); + + } + } catch (Exception ex) { ex.printStackTrace(); }; + + + if ( lastRow <= ws.curTab.getRowCount() ) { //last row + ws.updateRecIDMap(); + } + } + + + return ret; + + } + + + + public WindowTabDataDocument getDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "getDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow dr = ds.addNewDataRow(); + fillDataRow( dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + } + + return ret; + } + + public WindowTabDataDocument updateDataRow(int WindowNo, int TabNo, int RowNo, WindowTabDataDocument data ) { + authenticate(webServiceName, "updateDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + DataRow ret_dr = ds.addNewDataRow(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow[] dr = data.getWindowTabData().getDataSet().getDataRowArray(); + if (dr.length == 1) + { + DataRow dr0 = dr[0]; + boolean err = updateFields( ws, dr0 ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + //ws.curTab.dataRefresh(); + fillDataRow( ret_dr, ws, true, false ); + + } + + } + + return ret; + } + + private final String recordIDfield = "_rowNo"; + + + private void fillDataRow( DataRow dr, WWindowStatus ws, boolean handleLookups, boolean onlyUpdated ) { + authenticate(webServiceName, "fillDataRow"); + + int noFields = ws.curTab.getFieldCount(); + + //m_cs.dateFormat = new SimpleDateFormat( m_cs.datePattern ); + //m_cs.dateTimeFormat = new SimpleDateFormat( m_cs.datePattern ); + + String column = ""; + boolean isEditable = false; + // for all columns + + if (onlyUpdated) { + java.util.Date clientUpdated = new java.util.Date(); + java.util.Date updated = (java.util.Date)ws.curTab.getValue("Updated"); + if (!updated.after(clientUpdated)) { + DataField df = dr.addNewField(); + df.setColumn( recordIDfield ); + df.setDisp(false); + df.setVal( Integer.toString( ws.curTab.getRecord_ID() )); + return; + } + } + + for (int colNo = 0; colNo < noFields; colNo++) + { + GridField field = ws.curTab.getField(colNo); + column = field.getColumnName(); + + + if (!field.isDisplayed(true)) + { + DataField df = dr.addNewField(); + df.setColumn( column ); + df.setDisp(false); + df.setVal("" ); + //System.out.println(" *** not displayed: "+field.getColumnName()+" | "+field.getDisplayLogic()); + continue; + } + + if (field.getDisplayType() == DisplayType.Button) + continue; + + DataField df = dr.addNewField(); + + isEditable = field.isEditable(true); + df.setEdit(isEditable); + + // Get Data - turn to string + Object data = ws.curTab.getValue( column ); + String info = null; + //System.out.println( " displaytype = "+field.getDisplayType()); + // + if (data == null && !DisplayType.isLookup( field.getDisplayType())) + info = ""; + else + { + int dt = field.getDisplayType(); + switch (dt) + { + + case DisplayType.Date: + info = m_cs.dateFormat.format(data); + //System.out.println( "Date: "+info ); + break; + case DisplayType.DateTime: + // TODO + info = m_cs.dateFormat.format(data); //m_cs.dateTimeFormat.format(data); + //System.out.println( "DateTime: "+info ); + break; + case DisplayType.Amount: + info = m_cs.amountFormat.format(data); + break; + case DisplayType.Number: + case DisplayType.CostPrice: + info = m_cs.numberFormat.format(data); + break; + case DisplayType.Quantity: + info = m_cs.quantityFormat.format(data); + break; + case DisplayType.Integer: + info = m_cs.integerFormat.format(data); + break; + case DisplayType.YesNo: + info = data.toString(); + if ("Y".equals(info)) info="true"; + if ("N".equals(info)) info="false"; + //info = Msg.getMsg(ws.ctx, data.toString()); + break; + case DisplayType.Location: + info = data.toString(); + if (handleLookups) { + String x = DB.getSQLValueString(null, "select l.address1||', '||l.postal||', '||l.city from c_location l where c_location_id=?", Integer.parseInt(info)); + df.setLval( x ); + System.out.println( " location = "+x ); + } + break; + + default: + if (DisplayType.isLookup(dt)) + { + Lookup lookup = field.getLookup(); + //ArrayList deps = field.getDependentOn(); + + String lookupValue = null; + if (field.getValue()!=null) + { + lookupValue = lookup.getDisplay( field.getValue() ); + } + //lookup.refresh(); + if (data!=null) + { + info = lookup.getDisplay(data); + if (info==null) + { + lookup.refresh(); + info = lookup.getDisplay(data); + } + } + df.setLval(lookupValue); + + //System.out.println(field.getVO().ValidationCode); + + if (handleLookups /*&& isEditable*/ && lookup!=null + && (field.getVO().ValidationCode!=null && field.getVO().ValidationCode.length()>0))//deps.size()>0) + { + if (data!=null) + info = lookup.getDisplay(data); + + + LookupValues lvs = df.addNewLookup(); + + ADLookup.fillLookupValues( lvs, lookup, field ); + + } + if (data!=null) + info = data.toString(); + + } + else + { + info = data.toString(); + //System.out.println(">>>>>>>> UNKNOWN > "+field.getColumnName() +" = "+info); + } + } + } + //System.out.println(" "+column+" = "+info); + if ("M_Product_ID".equals(field.getColumnName())) + System.out.println("--- "+info); + + df.setDisp(true); + df.setVal( info ); + df.setColumn(field.getColumnName()); + if (field.isError()) + { + df.setError(true); + df.setErrorVal(field.getErrorValue()); + } + } + DataField df = dr.addNewField(); + df.setColumn( recordIDfield ); + df.setVal(Integer.toString( ws.curTab.getRecord_ID() )); + } + + + + public WindowTabDataDocument saveDataRow(int WindowNo, int TabNo, int RowNo, WindowTabDataDocument data ) { + authenticate(webServiceName, "saveDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + DataRow ret_dr = ds.addNewDataRow(); + + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + DataRow[] dr = data.getWindowTabData().getDataSet().getDataRowArray(); + if (dr.length == 1) + { + DataRow dr0 = dr[0]; + boolean error = updateFields( ws, dr0 ); + + DataField f[] = dr0.getFieldArray(); + HashMap fmap = new HashMap(); + for (int i=0; i " + (value==null ? "null" : value.toString())); + // same = both null + * + */ + + if (dbValue == null && value == null) + continue; + // new value null + else if (dbValue != null && value == null) + ws.curTab.setValue (GridField, null); + // from null to new value + else if (dbValue == null && value != null) + { + fieldError = !setFieldValue (ws, GridField, value); + } + // same + + else if (dbValue.equals(value)) + continue; + else + fieldError = !setFieldValue (ws, GridField, value); + + // + if (!error && fieldError) + { + //log.info("Error: " + GridField.getColumnName()); + error = true; + } + } + } // for all parameteres + + // Re-Do Changed Column to overwrite + /* + String columnName = f.getColumn(); //WebUtil.getParameter (request, P_ChangedColumn); + if (columnName != null && columnName.length() > 0) + { + ws.m_needSave = true; + GridField GridField = ws.curTab.getField(columnName); + if (GridField != null) + { + String value = "";//WebUtil.getParameter(request, columnName); + Object newValue = getFieldValue (GridField, value); + if (!ERROR.equals(newValue)) + { + // De-Selected Check Boxes are null + if (newValue == null && GridField.getDisplayType() == DisplayType.YesNo) + newValue = "N"; + //log.fine("ChangedColumn: " + columnName + "=" + newValue); + ws.curTab.setValue(GridField, newValue); + } + } + } + */ + + return error; + } // updateFields + + + /************************************************************************** + * Set Field Value + * @param wsc web session + * @param ws window status + * @param GridField field + * @param value as String + * @return true if correct + */ + private boolean setFieldValue ( WWindowStatus ws, + GridField GridField, String value) + { + Object newValue = getFieldValue (GridField, value); + if (ERROR.equals(newValue)) + { + GridField.setErrorValue(value); + return false; + } + Object dbValue = GridField.getValue(); + if ((newValue == null && dbValue != null) + || (newValue != null && !newValue.equals(dbValue))) + { + //GridField.setValue(newValue,true); + ws.curTab.setValue(GridField, newValue); + + } + return true; + } // setFieldValue + + + /** + * Get Field value (convert value to datatype of GridField) + * @param wsc session context + * @param GridField field + * @param value String Value + * @return converted Field Value + */ + private Object getFieldValue ( GridField GridField, String value) + { + if (value == null || value.length() == 0) + return null; + + int dt = GridField.getDisplayType(); + String columnName = GridField.getColumnName(); + + // BigDecimal + if (DisplayType.isNumeric(dt)) + { + BigDecimal bd = null; + try + { + Number nn = null; + if (dt == DisplayType.Amount) + nn = m_cs.amountFormat.parse(value); + else if (dt == DisplayType.Quantity) + nn = m_cs.quantityFormat.parse(value); + else // DisplayType.CostPrice + nn = m_cs.numberFormat.parse(value); + if (nn instanceof BigDecimal) + bd = (BigDecimal)nn; + else + bd = new BigDecimal(nn.toString()); + } + catch (Exception e) + { + //log.warning("BigDecimal: " + columnName + "=" + value + ERROR); + return ERROR; + } + //log.fine("BigDecimal: " + columnName + "=" + value + " -> " + bd); + return bd; + } + + // ID + else if (DisplayType.isID(dt)) + { + Integer ii = null; + try + { + ii = new Integer (value); + } + catch (Exception e) + { + //log.log(Level.WARNING, "ID: " + columnName + "=" + value, e); + ii = null; + } + // -1 indicates NULL + if (ii != null && ii.intValue() == -1) + ii = null; + //log.fine("ID: " + columnName + "=" + value + " -> " + ii); + return ii; + } + + + // Date/DateTime + else if (DisplayType.isDate(dt)) + { + Timestamp ts = null; + try + { + java.util.Date d = null; + + if (DisplayType.Date == dt) + d = m_cs.dateFormat.parse(value); + else if (DisplayType.DateTime == dt) + d = m_cs.dateTimeFormat.parse(value); + else if (DisplayType.Time == dt) + { + value = "2000/01/01 "+ value; + d = m_cs.dateTimeFormat.parse(value); + } + ts = new Timestamp(d.getTime()); + } + catch (Exception e) + { + //log.warning("Date: " + columnName + "=" + value + ERROR); + return ERROR; + } + //log.fine("Date: " + columnName + "=" + value + " -> " + ts); + return ts; + } + + // Checkbox + else if (dt == DisplayType.YesNo) + { + Boolean retValue = Boolean.FALSE; + if (value.equals("true")) + retValue = Boolean.TRUE; + //log.fine("YesNo: " + columnName + "=" + value + " -> " + retValue); + return retValue; + } + + // treat as string + //log.fine(columnName + "=" + value); + return value; + } // getFieldValue + + + public WindowTabDataDocument addNewDataRow(int WindowNo, int TabNo ) { + authenticate(webServiceName, "addNewDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, false, 0); + if (ws != null) + { + if (ws.curTab.dataNew(false)) + { + //ws.curTab.setSingleRow(true); + wd.setSuccess(true); + DataRow dr = ds.addNewDataRow(); + fillDataRow( dr, ws, true, false ); + updateRecIDMap( ws ); + System.out.println("New Row no = "+ws.curTab.getCurrentRow()); + } else + { + ws.curTab.dataIgnore(); + wd.setSuccess(false); + } + } + + return ret; + } + + public WindowTabDataDocument deleteDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "deleteDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + wd.setSuccess( + ws.curTab.dataDelete() + ); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + updateRecIDMap( ws ); + } + return ret; + } + + public WindowTabDataDocument ignoreDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "ignoreDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + ws.curTab.dataIgnore(); + + wd.setSuccess(true); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + updateRecIDMap( ws ); + + } + return ret; + } + + public WindowTabDataDocument refreshDataRow(int WindowNo, int TabNo, int RowNo ) { + authenticate(webServiceName, "refreshDataRow"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, false, 0, true, RowNo); + if (ws != null) + { + ws.curTab.dataRefresh(); + + wd.setSuccess(true); + + DataRow ret_dr = ds.addNewDataRow(); + fillDataRow( ret_dr, ws, true, false ); + + if (ws.ads.m_is_error) + { + wd.setError(ws.ads.m_error_message ); + wd.setErrorInfo(ws.ads.m_error_info ); + } + wd.setStatus(ws.ads.m_status_data); + wd.setStatusError(ws.ads.m_is_status_error); + + } + return ret; + + } + + public WindowTabDataDocument getLookupSearchData(GetLookupSearchDataReqDocument req) + { //int WindowNo, int TabNo, int RowNo, DataRow dr + authenticate(webServiceName, "getLookupSearchData"); + + GetLookupSearchDataReq reqt = req.getGetLookupSearchDataReq(); + + DataField[] df = reqt.getParams().getFieldArray(); + for (int i=0; i0 ) + log.info("LookUp COlumn: "+ df[i].getColumn()+ " " + df[i].getVal()); + } + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + int WindowNo = reqt.getWindowNo(); + int TabNo = reqt.getTabNo(); + int RowNo = reqt.getTabNo(); + + WWindowStatus ws = null; + if (WindowNo>0) + ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); //<-- Note changes to the active record (bledne action), probably are not properly communicated parameters + if (ws != null) { + + ADLookup lk = new ADLookup( df[0].getVal()); + lk.getLookupSearchValues( reqt.getParams(), ds, ws.ctx, WindowNo ); + } else { + ADLookup lk = new ADLookup( df[0].getVal()); + lk.getLookupSearchValues( reqt.getParams(), ds, this.m_cs.getM_ctx(), 0 ); + } + return ret; + } + + public WindowTabDataDocument getLookupData(int WindowNo, int TabNo, int RowNo, String columnName ) + { + authenticate(webServiceName, "getLookupData"); + + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData wd = ret.addNewWindowTabData(); + DataSet ds = wd.addNewDataSet(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + DataRow dr = ds.addNewDataRow(); + DataField df = dr.addNewField(); + GridField field = ws.curTab.getField(columnName); + Lookup lookup = field.getLookup(); + + df.setColumn(field.getColumnName()); + + String lookupValue = null; + if (field.getValue()!=null) + lookupValue = lookup.getDisplay( field.getValue() ); + df.setLval(lookupValue); + if (field.getValue()!=null) + df.setVal(field.getValue().toString()); + + LookupValues lvs = df.addNewLookup(); + + ADLookup.fillLookupValues(lvs, lookup, field); + } + return ret; + } + + + public ADMenuDocument getADMenu(int AD_Role_ID) + { + authenticate(webServiceName, "getADMenu"); + + ADMenuDocument res = ADMenuDocument.Factory.newInstance(); + ADMenuItem menu = res.addNewADMenu(); + menu.setName("Menu"); + menu.setType("Summary"); + + AD_Role_ID = Integer.parseInt( m_cs.getM_ctx().getProperty("#AD_Role_ID") ); + + // Load Menu Structure ---------------------- + int AD_Tree_ID = DB.getSQLValue(null, + "SELECT COALESCE(r.AD_Tree_Menu_ID, ci.AD_Tree_Menu_ID)" + + "FROM AD_ClientInfo ci" + + " INNER JOIN AD_Role r ON (ci.AD_Client_ID=r.AD_Client_ID) " + + "WHERE AD_Role_ID=?", AD_Role_ID); + if (AD_Tree_ID <= 0) + AD_Tree_ID = 10; // Menu + + //log.fine("doPost - AD_Tree_ID=" + AD_Tree_ID + " - " + Env.getAD_Language(wsc.ctx)); + + MTree tree = new MTree (m_cs.getM_ctx(), AD_Tree_ID, false, false, null); // Language set in WLogin + // Trim tree + MTreeNode root = tree.getRoot(); + Enumeration en = root.preorderEnumeration(); + + + ADMenuItemList itl = null;// menu.addNewItems(); + ADMenuItem it = menu;//, it_last = null; + + Stack stack = new Stack(); + //stack.push( itl ); + + while (en.hasMoreElements()) + { + MTreeNode nd = (MTreeNode)en.nextElement(); + if (nd.isTask() + || nd.isWorkbench() + || nd.isWorkFlow() + || nd.getNode_ID() == 383 // Reset Cache - kills the server + ) + { + MTreeNode parent = (MTreeNode)nd.getParent(); + parent.remove(nd); + } + } + tree.trimTree(); + + // Print tree + StringBuffer buf = new StringBuffer(); + StringBuffer barbuf = new StringBuffer(); + en = root.preorderEnumeration(); + int oldLevel = 0; + while (en.hasMoreElements()) + { + MTreeNode nd = (MTreeNode)en.nextElement(); + + // Level + int level = nd.getLevel(); // 0 == root + if (level == 0) + continue; + // + while (oldLevel < level) + { + if (itl != null) stack.push( itl ); + itl = it.addNewItems(); + oldLevel++; + } + while (oldLevel > level) + { + oldLevel--; + itl = (ADMenuItemList)stack.pop(); + } + + // Print Node + ADMenuItem it_last = printNode(nd, m_cs.getM_ctx(), itl ); + if (nd.isSummary()) + it = it_last; + //if(nd.isOnBar() && !nd.isSummary()) + //barbuf.append(printNode(nd, m_cs.getM_ctx() )); + } + // Final + + return res; + } + + private ADMenuItem printNode (MTreeNode node, Properties ctx, ADMenuItemList itl) + { + ADMenuItem i = itl.addNewItem(); + i.setName( node.getName() ); + i.setDescription(node.getDescription() ); + i.setADMenuID( node.getNode_ID()); + String type = ""; + if(node.isWindow())type="Window";else + if(node.isForm())type="Form";else + if(node.isReport())type="Report";else + if(node.isProcess())type="Process";else + if(node.isSummary())type="Summary";else + if(node.isTask())type="Task";else + if(node.isWorkbench())type="Workbench";else + if(node.isWorkFlow())type="Workbench"; + i.setType( type ); + return i; + } + + + + public ADLoginResponseDocument login( ADLoginRequestDocument req ) + { + authenticate(webServiceName, "login"); + + // TODO: Implement security layer + log.log(Level.SEVERE, "Warning: Security layer not implemented yet - opening web service " + webServiceName + " implies a security risk for server"); + + ADLoginResponseDocument res = ADLoginResponseDocument.Factory.newInstance(); + ADLoginResponse lr = res.addNewADLoginResponse(); + + ADLoginRequest r = req.getADLoginRequest(); + + if (r.getStage()==0) // initial phase - return possible translations + { + LookupValues langs = lr.addNewLangs(); + for (int i = 0; i < Language.getLanguageCount(); i++) + { + Language language = Language.getLanguage(i); + LookupValue lv = langs.addNewLv(); + lv.setKey( language.getAD_Language() ); + lv.setVal( language.getName() ); + } + } else + if (r.getStage()==1) // Verify user and pass + { + KeyNamePair[] roles = null; + KeyNamePair[] clients = null; + KeyNamePair[] orgs = null; + KeyNamePair[] warehouses = null; + + Login login = new Login(m_cs.getM_ctx()); + + roles = login.getRoles(r.getUser(), r.getPass()); + if (roles == null) + { + lr.setStatus(-1); + return res; + } else + { + if (r.getRoleID()==-1 && roles != null && roles.length>0) + r.setRoleID( Integer.parseInt( roles[0].getID() ) ); + if (r.getRoleID()>-1) clients = login.getClients( new KeyNamePair(r.getRoleID(), "" ) ); + + if (r.getClientID()==-1 && clients != null && clients.length>0) + r.setClientID( Integer.parseInt( clients[0].getID() ) ); + if (r.getClientID()>-1) orgs = login.getOrgs( new KeyNamePair(r.getClientID(), "" ) ); + + if (r.getOrgID()==-1 && orgs != null && orgs.length>0) + r.setOrgID( Integer.parseInt( orgs[0].getID() ) ); + if (r.getOrgID()>-1) warehouses = login.getWarehouses( new KeyNamePair(r.getOrgID(), "" ) ); + + ADLookup.fillLookupValues( lr.addNewRoles(), roles ); + ADLookup.fillLookupValues( lr.addNewClients(), clients ); + ADLookup.fillLookupValues( lr.addNewOrgs(), orgs ); + ADLookup.fillLookupValues( lr.addNewWarehouses(), warehouses ); + } + } else + if (r.getStage()==2) // Verify user and pass + { + Login login = new Login(m_cs.getM_ctx()); + KeyNamePair[] roles = login.getRoles(r.getUser(), r.getPass()); + if (roles != null) + { + KeyNamePair org = new KeyNamePair(r.getRoleID(), Integer.toString(r.getRoleID())); + String error = login.validateLogin(org); + if (error != null && error.length() > 0) + { + lr.setStatus(-1); + return res; + } + + int AD_User_ID = Env.getAD_User_ID(m_cs.getM_ctx()); + + if ( !m_cs.login( AD_User_ID, r.getRoleID(), r.getClientID(), r.getOrgID(), r.getWarehouseID(), r.getLang() ) ) { + lr.setStatus(-1); + return res; + } + } + else + { + lr.setStatus(-1); + return res; + } + } + + return res; + } + + + + + public ProcessParamsDocument getProcessParams( GetProcessParamsDocument req ) + { + authenticate(webServiceName, "getProcessParams"); + return Process.getProcessParams(m_cs, req ); + } + + public RunProcessResponseDocument runProcess( RunProcessDocument req ) + { + authenticate(webServiceName, "runProcess"); + return Process.runProcess(m_cs, req); + } + + public StandardResponseDocument saveLocation( LocationDocument req ) + { + authenticate(webServiceName, "saveLocation"); + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + + Location rloc = req.getLocation(); + + MLocation location = new MLocation(m_cs.getM_ctx(), rloc.getCLocationID(), null); + //log.fine("doPost updating C_Location_ID=" + C_Location_ID + " - " + targetBase); + + location.setAddress1 (rloc.getAddress1()); + location.setAddress2 (rloc.getAddress2()); + location.setCity ( rloc.getCity() ); + location.setPostal ( rloc.getPostalCode() ); + location.setC_Country_ID ( rloc.getCCountryID() ); + location.setC_Region_ID ( rloc.getCRegionID() ); + + // Save Location + location.save(); + resp.setRecordID( location.getC_Location_ID() ); + + return ret; + + } + + + public LocationDocument getLocation(@WebParam(name="req", targetNamespace="http://3e.pl/ADInterface") LocationDocument req ) + { + authenticate(webServiceName, "getLocation"); + LocationDocument ret = LocationDocument.Factory.newInstance(); + Location loc = ret.addNewLocation(); + + MLocation location = new MLocation(m_cs.getM_ctx(), req.getLocation().getCLocationID(), null); + loc.setAddress1( location.getAddress1() ); + loc.setAddress2( location.getAddress2() ); + loc.setCity( location.getCity() ); + loc.setPostalCode( location.getPostal() ); + loc.setCCountryID( location.getC_Country_ID() ); + loc.setCRegionID( location.getC_Region_ID()); + + loc.setCountries( this.getCountry( location )); + + return ret; + } + + private LookupValues getCountry (MLocation location) + { + MCountry[] countries = MCountry.getCountries (location.getCtx()); + int comp = location.getC_Country_ID(); + if (comp == 0) + comp = Env.getContextAsInt(m_cs.getM_ctx(), "C_Country_ID"); + + LookupValues lvs = LookupValues.Factory.newInstance(); + for (int i = 0; i < countries.length; i++) + { + LookupValue lv = lvs.addNewLv(); + lv.setKey(String.valueOf(countries[i].getC_Country_ID())); + lv.setVal( countries[i].getName() ); + } + + + return lvs; + } + + private LookupValues getRegion (MLocation location) + { + MRegion[] regions = MRegion.getRegions (location.getCtx(), location.getC_Country_ID()); + int comp = location.getC_Region_ID(); + if (comp == 0) + comp = Env.getContextAsInt(m_cs.getM_ctx(), "C_Region_ID"); + + LookupValues lvs = LookupValues.Factory.newInstance(); + for (int i = 0; i < regions.length; i++) + { + LookupValue lv = lvs.addNewLv(); + lv.setKey(String.valueOf(regions[i].getC_Region_ID())); + lv.setVal( regions[i].getName() ); + } + + return lvs; + } + + public DocActionDocument getDocAction(int WindowNo, int TabNo, int RowNo, String ColName ) + { + authenticate(webServiceName, "getDocAction"); + DocActionDocument ret = DocActionDocument.Factory.newInstance(); + DocAction da = ret.addNewDocAction(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + LookupValues lvs = da.addNewAction(); + Process.renderDocActionOptions(lvs, ws.curTab); + } + + return ret; + } + + public StandardResponseDocument setDocAction(int WindowNo, int TabNo, int RowNo, String ColName, String docAction ) + { + authenticate(webServiceName, "setDocAction"); + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse sr = ret.addNewStandardResponse(); + + WWindowStatus ws = WWindowStatus.get(WindowStatusMap, WindowNo, true, TabNo, true, RowNo); + if (ws != null) + { + ws.curTab.setValue("DocAction", docAction); + boolean result = false; + if (ws.curTab.needSave(true, false)) //slain - do not dispose of error, if not write musiales + { + if (! (result = ws.curTab.dataSave(true))) + ws.curTab.dataIgnore(); + + } + sr.setIsError(!result); + + } else + sr.setIsError( true ); + + return ret; + } + + + private void updateRecIDMap(WWindowStatus ws) { + ws.updateRecIDMap(); + /* + int rc = ws.curTab.getRowCount(); + int initRowNo = 0; + + Map RecordIDMap = ws.getRecordIDMap(); + + RecordIDMap.clear(); + + for (int lineNo = initRowNo; lineNo < rc; lineNo++) + { + int recID = ws.curTab.getKeyID( lineNo ); + //System.out.println(""+lineNo+" - "+recID); + RecordIDMap.put( recID, lineNo ); + + } */ + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java new file mode 100644 index 0000000000..7a64257895 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereService.java @@ -0,0 +1,339 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Properties; + +import org.compiere.model.MUser; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Language; +import org.compiere.util.Login; + +public class CompiereService { + + private static CLogger log = CLogger.getCLogger(CompiereService.class); + + public final static String datePattern = "dd-MM-yyyy"; + + private Properties m_ctx; + private String m_trx_name; + + private int m_AD_Client_ID; + private int m_AD_Org_ID; + private int m_AD_User_ID; + private int m_AD_Role_ID; + private int m_AD_Warehouse_ID; + private String m_Lang; + private String m_User; + + private boolean LoggedIn = false; + + + /** Localized Date format */ + public SimpleDateFormat dateFormat = null; + /** Localized Timestamp format */ + public SimpleDateFormat dateTimeFormat = null; + + /** Localized Amount format */ + public DecimalFormat amountFormat = null; + /** Localized Integer format */ + public DecimalFormat integerFormat = null; + /** Localized Number format */ + public DecimalFormat numberFormat = null; + /** Localized Quantity format */ + public DecimalFormat quantityFormat = null; + + /** Localized Date format */ + public SimpleDateFormat modelDateFormat = null; + /** Localized Timestamp format */ + public SimpleDateFormat modelDateTimeFormat = null; + + /** Localized Amount format */ + public DecimalFormat modelAmountFormat = null; + /** Localized Integer format */ + public DecimalFormat modelIntegerFormat = null; + /** Localized Number format */ + public DecimalFormat modelNumberFormat = null; + /** Localized Quantity format */ + public DecimalFormat modelQuantityFormat = null; + + private Language m_lang; + + public final String dateFormatOnlyForCtx = "yyyy-MM-dd"; + + public int getM_AD_Client_ID() { + return m_AD_Client_ID; + } + + public void setM_AD_Client_ID(int client_ID) { + m_AD_Client_ID = client_ID; + } + + public int getM_AD_Org_ID() { + return m_AD_Org_ID; + } + + public void setM_AD_Org_ID(int org_ID) { + m_AD_Org_ID = org_ID; + } + + public Properties getM_ctx() { + return m_ctx; + } + + public void setM_ctx(Properties m_ctx) { + this.m_ctx = m_ctx; + } + + public String getM_trx_name() { + return m_trx_name; + } + + public void setM_trx_name(String m_trx_name) { + this.m_trx_name = m_trx_name; + } + + + public CompiereService() + { + m_trx_name= null; //Trx.createTrxName(); + m_ctx = new Properties(); + LoggedIn = false; + } + + public void connect() + { + CompiereUtil.initWeb(); + + Env.setCtx(m_ctx); + Env.setContext( m_ctx, "#AD_Language", "en_US" ); + m_lang = Language.getLanguage("en_US"); + + // These variables are needed for ADClient.exe + Language m_lang2 = Language.getLanguage("pl_PL"); + + //dateFormat = DisplayType.getDateFormat(DisplayType.Date, m_lang2); + //dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2); + + dateFormat = new SimpleDateFormat( datePattern ); + dateTimeFormat = new SimpleDateFormat( datePattern ); + + //dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2); + // + amountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang2); + integerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang2); + numberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang2); + quantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang2); + + + } + + public Language getM_lang() { + return m_lang; + } + + public void setM_lang(Language m_lang) { + this.m_lang = m_lang; + } + + public boolean isLoggedIn() { + return LoggedIn; + } + + /* + public static Properties testLogin (boolean isClient) + { + //logger.entering("Env", "initTest"); + Compiere.startupEnvironment(true); + // Test Context + Properties ctx = Env.getCtx(); + org.compiere.util.Login login = new org.compiere.util.Login(ctx); + KeyNamePair[] roles = login.getRoles("SuperUser", "System1969"); + // load role + if (roles != null && roles.length > 0) + { + int x = -1; + for (int i=0; i 0) + { + KeyNamePair[] orgs = login.getOrgs(clients[0]); + // load org + if (orgs != null && orgs.length > 0) + { + KeyNamePair[] whs = login.getWarehouses(orgs[0]); + // + login.loadPreferences(orgs[0], null, null, null); + } + } + } + // + Env.setContext(ctx, "#Date", "2006-01-26"); + // logger.exiting("Env", "initTest"); + return ctx; + } // testInit + */ + + + + /** + * Check Login information and set context. + * @returns true if login info are OK + * @param ctx context + * @param AD_User_ID user + * @param AD_Role_ID role + * @param AD_Client_ID client + * @param AD_Org_ID org + * @param M_Warehouse_ID warehouse + */ + private String checkLogin (Properties ctx, int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int M_Warehouse_ID) + { + // Get Login Info + String loginInfo = null; + // Verify existance of User/Client/Org/Role and User's acces to Client & Org + String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name || ' [' || INITCAP(USER) || ']' AS Text " + + "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur " + + "WHERE u.AD_User_ID=?" // #1 + + " AND c.AD_Client_ID=?" // #2 + + " AND o.AD_Org_ID=?" // #3 + + " AND ur.AD_Role_ID=?" // #4 + + " AND ur.AD_User_ID=u.AD_User_ID" + + " AND (o.AD_Client_ID = 0 OR o.AD_Client_ID=c.AD_Client_ID)" + + " AND c.AD_Client_ID IN (SELECT AD_Client_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)" + + " AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)"; + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, AD_User_ID); + pstmt.setInt(2, AD_Client_ID); + pstmt.setInt(3, AD_Org_ID); + pstmt.setInt(4, AD_Role_ID); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) + loginInfo = rs.getString(1); + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + // log.log(Level.SEVERE, "checkLogin", e); + } + + // not verified + if (loginInfo == null) + return null; + + // Set Preferences + KeyNamePair org = new KeyNamePair(AD_Org_ID, String.valueOf(AD_Org_ID)); + KeyNamePair wh = null; + if (M_Warehouse_ID > 0) + wh = new KeyNamePair(M_Warehouse_ID, String.valueOf(M_Warehouse_ID)); + // + Timestamp date = null; + String printer = null; + Login login = new Login(ctx); + login.loadPreferences(org, wh, date, printer); + // Don't Show Acct/Trl Tabs on HTML UI + Env.setContext(ctx, "#ShowAcct", "N"); + Env.setContext(ctx, "#ShowTrl", "N"); + // + return loginInfo; + } // checkLogin + + public boolean login( int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int AD_Warehouse_ID, String Lang ) { + LoggedIn = false; + String loginInfo = checkLogin (getM_ctx(), AD_User_ID, AD_Role_ID, AD_Client_ID, AD_Org_ID, AD_Warehouse_ID ); + if (loginInfo == null) + return false; + + m_AD_Client_ID = AD_Client_ID; + m_AD_Org_ID = AD_Org_ID; + m_AD_User_ID = AD_User_ID; + m_AD_Role_ID = AD_Role_ID; + m_AD_Warehouse_ID = AD_Warehouse_ID; + m_Lang = Lang; + m_User = MUser.getNameOfUser(m_AD_User_ID); + + Env.setCtx(m_ctx); + Env.setContext( m_ctx, "#AD_Language", Lang); + m_lang = Language.getLanguage(Lang); + Env.verifyLanguage( getM_ctx(), m_lang ); + + modelDateFormat = new SimpleDateFormat( datePattern ); + modelDateTimeFormat = new SimpleDateFormat( datePattern ); + + modelAmountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang); + modelIntegerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang); + modelNumberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang); + modelQuantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang); + + // Set Date + Timestamp ts = new Timestamp(System.currentTimeMillis()); + + SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat( dateFormatOnlyForCtx ); + Env.setContext( getM_ctx(), "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format + log.info(" #Date = "+ Env.getContextAsDate( getM_ctx(), "#Date")); + + Env.setContext( getM_ctx(), "#M_Warehouse_ID", AD_Warehouse_ID ); + Env.setContext(m_ctx, Env.LANGUAGE, m_lang.getAD_Language()); + //Env.setContext( getM_ctx(), "#AD_Language", Lang ); + + LoggedIn = true; + return true; + } + + public void setM_AD_User_ID(int m_AD_User_ID) { + this.m_AD_User_ID = m_AD_User_ID; + } + + public int getM_AD_User_ID() { + return m_AD_User_ID; + } + + public void setM_AD_Role_ID(int m_AD_Role_ID) { + this.m_AD_Role_ID = m_AD_Role_ID; + } + + public int getM_AD_Role_ID() { + return m_AD_Role_ID; + } + + public void setM_Lang(String m_Lang) { + this.m_Lang = m_Lang; + } + + public String getM_Lang() { + return m_Lang; + } + + public void setM_AD_Warehouse_ID(int m_AD_Warehouse_ID) { + this.m_AD_Warehouse_ID = m_AD_Warehouse_ID; + } + + public int getM_AD_Warehouse_ID() { + return m_AD_Warehouse_ID; + } + + public void setUser(String m_User) { + this.m_User = m_User; + } + + public String getUser() { + return m_User; + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java new file mode 100644 index 0000000000..7465b3adb0 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/CompiereUtil.java @@ -0,0 +1,62 @@ +package com._3e.ADInterface; + + +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.Adempiere; +import org.compiere.model.MClient; +import org.compiere.model.MSystem; +import org.compiere.util.CLogger; + + +public class CompiereUtil { + + private static CLogger log = CLogger.getCLogger(CompiereUtil.class); + private static boolean s_initOK = false; + + + public static boolean initWeb() + { + if (s_initOK) + { + //log.info(context.getServletContextName()); + return true; + } + + // TODO: + // Load Environment Variables (serverApps/src/web/WEB-INF/web.xml) + + + try + { + //CLogMgt.setLevel(Level.OFF); + + /* ADEMPIERE/COMPIERE */ + //s_initOK = Compiere.startup(false); + s_initOK = Adempiere.startup(false); + } + catch (Exception ex) + { + log.log(Level.SEVERE, "startup", ex); + } + if (!s_initOK) + return false; + + // Logging now initiated + //log.info(info.toString()); + + // + Properties ctx = new Properties(); + MClient client = MClient.get(ctx, 0); + MSystem system = MSystem.get(ctx); + + // Env.setContext( ctx, "#AD_Language", "pl_PL" ); + //client.sendEMail(client.getRequestEMail(), + // "Server started: " + system.getName() + // ,"ServerInfo: " + context.getServerInfo() + //); + + return s_initOK; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java new file mode 100644 index 0000000000..8f9635650d --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoBPartner.java @@ -0,0 +1,312 @@ +package com._3e.ADInterface; + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.ArrayList; + +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; + + +public class InfoBPartner implements ADInfo { + + private static String s_partnerFROM = "C_BPartner" + + " LEFT OUTER JOIN C_BPartner_Location l ON (C_BPartner.C_BPartner_ID=l.C_BPartner_ID AND l.IsActive='Y')" + + " LEFT OUTER JOIN AD_User c ON (C_BPartner.C_BPartner_ID=c.C_BPartner_ID AND (c.C_BPartner_Location_ID IS NULL OR c.C_BPartner_Location_ID=l.C_BPartner_Location_ID) AND c.IsActive='Y')" + + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)"; + + private DataRow params; + private boolean m_isSOTrx = true; + private String m_tableName = "C_BPartner"; + + public InfoBPartner(DataRow dr, String whereClause) { + params = dr; + m_isSOTrx = true; // TODO + + StringBuffer where = new StringBuffer(); + where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'"); + if (whereClause != null && whereClause.length() > 0) + where.append(" AND ").append(whereClause); + + prepareTable(s_partnerFROM, where.toString(), "C_BPartner.Value"); + + setupParamsFromDataRow(); + } + + void setupParamsFromDataRow() { + for (int i=0; i< params.sizeOfFieldArray(); i++) { + DataField f = params.getFieldArray(i); + System.out.println(f.getColumn() +" - '"+f.getVal()+"'"); + if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("contact".equalsIgnoreCase(f.getColumn())) fieldContact = f.getVal(); + if ("checkCustomer".equalsIgnoreCase(f.getColumn())) checkCustomer = "Y".equalsIgnoreCase(f.getVal()); + if ("checkAND".equalsIgnoreCase(f.getColumn())) checkAND = "Y".equalsIgnoreCase(f.getVal()); + } + } + + String fieldValue = ""; + String fieldName = ""; + String fieldContact = ""; + String fieldEMail = ""; + String fieldPhone = ""; + + String fieldPostal = ""; + boolean checkAND = false; + boolean checkCustomer = false; + + + + protected CLogger log = CLogger.getCLogger(getClass()); + + + + public String getSQLWhere() + { + ArrayList list = new ArrayList(); + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + list.add ("UPPER(C_BPartner.Value) LIKE ?"); + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + list.add ("UPPER(C_BPartner.Name) LIKE ?"); + // => Contact + String contact = fieldContact.toUpperCase(); + if (!(contact.equals("") || contact.equals("%"))) + list.add ("UPPER(c.Name) LIKE ?"); + // => EMail + String email = fieldEMail.toUpperCase(); + if (!(email.equals("") || email.equals("%"))) + list.add ("UPPER(c.EMail) LIKE ?"); + // => Phone + String phone = fieldPhone.toUpperCase(); + if (!(phone.equals("") || phone.equals("%"))) + list.add ("UPPER(c.Phone) LIKE ?"); + // => Postal + String postal = fieldPostal.toUpperCase(); + if (!(postal.equals("") || postal.equals("%"))) + list.add ("UPPER(a.Postal) LIKE ?"); + + StringBuffer sql = new StringBuffer(); + int size = list.size(); + // Just one + if (size == 1) + sql.append(" AND ").append(list.get(0)); + else if (size > 1) + { + boolean AND = checkAND; + sql.append(" AND "); + if (!AND) + sql.append("("); + for (int i = 0; i < size; i++) + { + if (i > 0) + sql.append(AND ? " AND " : " OR "); + sql.append(list.get(i)); + } + if (!AND) + sql.append(")"); + } + + // Static SQL + if (checkCustomer) + { + sql.append(" AND "); + if (m_isSOTrx) + sql.append ("C_BPartner.IsCustomer='Y'"); + else + sql.append ("C_BPartner.IsVendor='Y'"); + } + System.out.println( sql.toString() ); + return sql.toString(); + } // getSQLWhere + + + + public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + { + int index = 1; + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + { + if (!value.endsWith("%")) + value += "%"; + pstmt.setString(index++, value); + log.fine("Value: " + value); + } + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + { + if (!name.endsWith("%")) + name += "%"; + pstmt.setString(index++, name); + log.fine("Name: " + name); + } + // => Contact + String contact = fieldContact.toUpperCase(); + if (!(contact.equals("") || contact.equals("%"))) + { + if (!contact.endsWith("%")) + contact += "%"; + pstmt.setString(index++, contact); + log.fine("Contact: " + contact); + } + // => EMail + String email = fieldEMail.toUpperCase(); + if (!(email.equals("") || email.equals("%"))) + { + if (!email.endsWith("%")) + email += "%"; + pstmt.setString(index++, email); + log.fine("EMail: " + email); + } + // => Phone + String phone = fieldPhone.toUpperCase(); + if (!(phone.equals("") || phone.equals("%"))) + { + if (!phone.endsWith("%")) + phone += "%"; + pstmt.setString(index++, phone); + log.fine("Phone: " + phone); + } + // => Postal + String postal = fieldPostal.toUpperCase(); + if (!(postal.equals("") || postal.equals("%"))) + { + if (!postal.endsWith("%")) + postal += "%"; + pstmt.setString(index++, postal); + log.fine("Postal: " + postal); + } + } // setParameters + + String m_sqlMain = ""; + String m_sqlCount = ""; + String m_sqlOrder = ""; + + + protected void prepareTable ( String from, String staticWhere, String orderBy) + { + + StringBuffer sql = new StringBuffer ("SELECT "); + // add columns & sql + sql.append( " C_BPartner.C_BPartner_ID, C_BPartner.Value, C_BPartner.Name, c.Name AS Contact, " ); + sql.append( " C_BPartner.SO_CreditLimit-C_BPartner.SO_CreditUsed AS SO_CreditAvailable, "); + sql.append( " C_BPartner.SO_CreditUsed, c.Phone, a.Postal, a.City, C_BPartner.TotalOpenBalance, C_BPartner.ActualLifetimeValue "); + + sql.append( " FROM ").append(from); + // + sql.append(" WHERE ").append(staticWhere); + m_sqlMain = sql.toString(); + m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere; + // + m_sqlOrder = ""; + if (orderBy != null && orderBy.length() > 0) + m_sqlOrder = " ORDER BY " + orderBy; + + //if (m_keyColumnIndex == -1) + // log.log(Level.SEVERE, "No KeyColumn - " + sql); + + } // prepareTable + + + public DataRow getColumns() { + DataRow col = DataRow.Factory.newInstance(); + DataField f = null; + + f = col.addNewField(); //0 + f.setType("int"); + f.setColumn("key" ); + f.setLval("20,0"); + + f = col.addNewField(); //1 + f.setType("string"); + f.setColumn("value" ); + f.setLval("20,100"); + + f = col.addNewField(); //2 + f.setType("string"); + f.setColumn("name" ); + f.setLval("20, 140"); + + f = col.addNewField(); //3 + f.setType("string"); + f.setColumn("contact" ); + f.setLval("20, 70"); + + f = col.addNewField(); //4 + f.setType("string"); + f.setColumn("SO_CreditAvailable" ); + f.setLval("20, 50"); + + f = col.addNewField(); //5 + f.setType("string"); + f.setColumn("SO_CreditUsed" ); + f.setLval("20, 40"); + + f = col.addNewField(); //6 + f.setType("string"); + f.setColumn("Phone" ); + f.setLval("20,50"); + + f = col.addNewField(); //7 + f.setType("string"); + f.setColumn("Postal" ); + f.setLval("20, 40"); + + f = col.addNewField(); //8 + f.setType("string"); + f.setColumn("City" ); + f.setLval("20, 50"); + + f = col.addNewField(); //9 + f.setType("string"); + f.setColumn("TotalOpenBalance" ); + f.setLval("10,50"); + + f = col.addNewField(); //10 + f.setType("string"); + f.setColumn("ActualLifetimeValue" ); + f.setLval("10,50"); + + return col; + } + + + public String getSQL() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlMain); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + sql.append(m_sqlOrder); + String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + dataSql = MRole.getDefault().addAccessSQL(dataSql, m_tableName, + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + + return dataSql; + } + + public String getSQLCount() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlCount); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + countSql = MRole.getDefault().addAccessSQL(countSql, m_tableName, + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + //log.finer(countSql); + + return countSql; + + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java new file mode 100644 index 0000000000..14de8166f8 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/InfoProduct.java @@ -0,0 +1,473 @@ +package com._3e.ADInterface; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.minigrid.IDColumn; +import org.compiere.model.MRole; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; + + +public class InfoProduct implements ADInfo { + + private static final String s_productFrom = + "M_Product p" + + " LEFT OUTER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID AND pr.IsActive='Y')" + + " LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID)"; + + private DataRow params; + private boolean m_isSOTrx = true; + private String m_tableName = "M_Product"; + + Properties m_ctx; + int p_WindowNo; + + public InfoProduct(DataRow dr, String whereClause, Properties ctx, int WindowNo) { + params = dr; + m_ctx = ctx; + p_WindowNo = WindowNo; + + this.getProductLayout(); + + this.M_PriceList_ID = Env.getContextAsInt( m_ctx, "#M_PriceList_ID"); + + M_PriceList_Version_ID = findPLV (M_PriceList_ID); +/* // Set Value or Name + if (value.startsWith("@") && value.endsWith("@")) + fieldName.setText(value.substring(1,value.length()-1)); + else + fieldValue.setText(value); + // Set Warehouse + if (M_Warehouse_ID == 0) + M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID"); + + //fillPicks(M_PriceList_ID); + int M_PriceList_Version_ID = 0; //findPLV (M_PriceList_ID); + // Set Value or Name +*/ + // Set Warehouse // TODO + if (M_Warehouse_ID == 0) + M_Warehouse_ID = Env.getContextAsInt( m_ctx, "#M_Warehouse_ID"); + + //if (M_Warehouse_ID != 0) + // setWarehouse (M_Warehouse_ID); + // Set PriceList Version + //if (M_PriceList_Version_ID != 0) + // setPriceListVersion (M_PriceList_Version_ID); + + // Create Grid + StringBuffer where = new StringBuffer(); + where.append("p.IsActive='Y'"); + if (M_Warehouse_ID != 0) + where.append(" AND p.IsSummary='N'"); + // dynamic Where Clause + //if (p_whereClause != null && p_whereClause.length() > 0) + // where.append(" AND ") // replace fully qalified name with alias + // .append(Util.replace(p_whereClause, "M_Product.", "p.")); + // + + prepareTable(s_productFrom, where.toString(), "QtyAvailable DESC, Margin DESC" ); + + setupParamsFromDataRow(); + } + + void setupParamsFromDataRow() { + for (int i=0; i< params.sizeOfFieldArray(); i++) { + DataField f = params.getFieldArray(i); + System.out.println(f.getColumn() +" - '"+f.getVal()+"'"); + if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal(); + if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal(); + if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal(); + if ("sku".equalsIgnoreCase(f.getColumn())) fieldSKU = f.getVal(); + if ("M_PriceList_Version_ID".equalsIgnoreCase(f.getColumn())) M_PriceList_Version_ID = Integer.parseInt(f.getVal()); + if ("M_Warehouse_ID".equalsIgnoreCase(f.getColumn())) M_Warehouse_ID = Integer.parseInt(f.getVal()); + } + } + + + protected CLogger log = CLogger.getCLogger(getClass()); + + String m_pAttributeWhere = null; + String fieldValue =""; + String fieldName =""; + String fieldUPC =""; + String fieldSKU =""; + //int M_PriceList_Version_ID = 1000037; //104; + //int M_Warehouse_ID = 1000001; //103; + //int M_PriceList_ID = 1000022; //101 + int M_PriceList_Version_ID = 104; + int M_Warehouse_ID = 103; + int M_PriceList_ID = 101; + + String getSQLWhere() { + StringBuffer where = new StringBuffer(); + + // Optional PLV + //int M_PriceList_Version_ID = 0; + if (M_PriceList_Version_ID != 0) + where.append(" AND pr.M_PriceList_Version_ID=?"); + + // Product Attribute Search + if (m_pAttributeWhere != null) + { + where.append(m_pAttributeWhere); + return where.toString(); + } + + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) { + where.append(" AND UPPER(p.Value) LIKE ?"); + } + + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + where.append(" AND UPPER(p.Name) LIKE ?"); + + // => UPC + String upc = fieldUPC.toUpperCase(); + if (!(upc.equals("") || upc.equals("%"))) + where.append(" AND UPPER(p.UPC) LIKE ?"); + + // => SKU + String sku = fieldSKU.toUpperCase(); + if (!(sku.equals("") || sku.equals("%"))) + where.append(" AND UPPER(p.SKU) LIKE ?"); + + return where.toString(); + } // getSQLWhere + + /** + * Set Parameters for Query + * (as defined in getSQLWhere) + * + * @param pstmt pstmt + * @param forCount for counting records + * @throws SQLException + */ + public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException + { + int index = 1; + + //M_Warehouse_ID = 103; + //this.M_PriceList_Version_ID = 104; + //this.M_PriceList_ID = 101; + + //fieldValue = "%tree%"; + + // => Warehouse + //int M_Warehouse_ID = 0; + if (!forCount) // parameters in select + { + for (int i = 0; i < s_productLayout.length; i++) + { + if (s_productLayout[i].getColSQL().indexOf("?") != -1) + pstmt.setInt(index++, M_Warehouse_ID); + } + } + log.fine("M_Warehouse_ID=" + M_Warehouse_ID + " (" + (index-1) + "*)"); + + // => PriceList + //int M_PriceList_Version_ID = 0; + + if (M_PriceList_Version_ID != 0) + { + pstmt.setInt(index++, M_PriceList_Version_ID); + log.fine("M_PriceList_Version_ID=" + M_PriceList_Version_ID); + } + // Rest of Parameter in Query for Attribute Search + if (m_pAttributeWhere != null) + return; + + // => Value + String value = fieldValue.toUpperCase(); + if (!(value.equals("") || value.equals("%"))) + { + if (!value.endsWith("%")) + value += "%"; + pstmt.setString(index++, value); + log.fine("Value: " + value); + } + + // => Name + String name = fieldName.toUpperCase(); + if (!(name.equals("") || name.equals("%"))) + { + if (!name.endsWith("%")) + name += "%"; + pstmt.setString(index++, name); + log.fine("Name: " + name); + } + + // => UPC + String upc = fieldUPC.toUpperCase(); + if (!(upc.equals("") || upc.equals("%"))) + { + if (!upc.endsWith("%")) + upc += "%"; + pstmt.setString(index++, upc); + log.fine("UPC: " + upc); + } + + // => SKU + String sku = fieldSKU.toUpperCase(); + if (!(sku.equals("") || sku.equals("%"))) + { + if (!sku.endsWith("%")) + sku += "%"; + pstmt.setString(index++, sku); + log.fine("SKU: " + sku); + } + + } // setParameters + + + String m_sqlMain = ""; + String m_sqlCount = ""; + String m_sqlOrder = ""; + + int m_keyColumnIndex = -1; + + protected void prepareTable ( String from, String staticWhere, String orderBy) + { + + StringBuffer sql = new StringBuffer ("SELECT "); + + for (int i = 0; i < s_productLayout.length; i++) + { + if (i > 0) + sql.append(", "); + sql.append(s_productLayout[i].getColSQL()); + // adding ID column + if (s_productLayout[i].isIDcol()) + sql.append(",").append(s_productLayout[i].getIDcolSQL()); + // add to model + //p_table.addColumn(s_productLayout[i].getColHeader()); + //if (s_productLayout[i].isColorColumn()) + //p_table.setColorColumn(i); + if (s_productLayout[i].getColClass() == IDColumn.class) + m_keyColumnIndex = i; + } + + sql.append( " FROM ").append(from); + // + sql.append(" WHERE ").append(staticWhere); + m_sqlMain = sql.toString(); + m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere; + // + m_sqlOrder = ""; + if (orderBy != null && orderBy.length() > 0) + m_sqlOrder = " ORDER BY " + orderBy; + + //if (m_keyColumnIndex == -1) + // log.log(Level.SEVERE, "No KeyColumn - " + sql); + + } // prepareTable + + + Info_Column[] s_productLayout = null; + + private Info_Column[] getProductLayout() { + ArrayList list = new ArrayList(); + list.add(new Info_Column(" ", "p.M_Product_ID", IDColumn.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Discontinued").substring(0, 1), "p.Discontinued", Boolean.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Value"), "p.Value", String.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Name"), "p.Name", String.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyAvailable"), "bomQtyAvailable(p.M_Product_ID,?,0) AS QtyAvailable", Double.class, true, true, null)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceList"), "bomPriceList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceStd"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOnHand"), "bomQtyOnHand(p.M_Product_ID,?,0) AS QtyOnHand", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyReserved"), "bomQtyReserved(p.M_Product_ID,?,0) AS QtyReserved", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOrdered"), "bomQtyOrdered(p.M_Product_ID,?,0) AS QtyOrdered", Double.class)); + /*if (isUnconfirmed()) + { + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmed"), "(SELECT SUM(c.TargetQty) FROM M_InOutLineConfirm c INNER JOIN M_InOutLine il ON (c.M_InOutLine_ID=il.M_InOutLine_ID) INNER JOIN M_InOut i ON (il.M_InOut_ID=i.M_InOut_ID) WHERE c.Processed='N' AND i.M_Warehouse_ID=? AND il.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmed", Double.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmedMove"), "(SELECT SUM(c.TargetQty) FROM M_MovementLineConfirm c INNER JOIN M_MovementLine ml ON (c.M_MovementLine_ID=ml.M_MovementLine_ID) INNER JOIN M_Locator l ON (ml.M_LocatorTo_ID=l.M_Locator_ID) WHERE c.Processed='N' AND l.M_Warehouse_ID=? AND ml.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmedMove", Double.class)); + }*/ + list.add(new Info_Column(Msg.translate(Env.getCtx(), "Margin"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit", BigDecimal.class)); + list.add(new Info_Column(Msg.translate(Env.getCtx(), "IsInstanceAttribute"), "pa.IsInstanceAttribute", Boolean.class)); + s_productLayout = new Info_Column[list.size()]; + list.toArray(s_productLayout); + //INDEX_NAME = 3; + //INDEX_PATTRIBUTE = s_productLayout.length - 1; // last item + return s_productLayout; + + } + + public DataRow getColumns() { + DataRow col = DataRow.Factory.newInstance(); + DataField f = null; + f = col.addNewField(); //0 + f.setType("int"); + f.setLval("20, 0"); + f.setColumn("key" ); + + f = col.addNewField(); //1 + f.setType("string"); + f.setLval("1, 15"); + f.setColumn("Discontinued" ); + + f = col.addNewField(); //2 + f.setType("string"); + f.setLval("40, 110"); + f.setColumn("Value" ); + + f = col.addNewField(); //3 + f.setType("string"); + f.setLval("60, 140"); + f.setColumn("Name" ); + + f = col.addNewField(); //4 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyAvailable" ); + + f = col.addNewField(); //5 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceList" ); + + f = col.addNewField(); //6 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceStd" ); + + f = col.addNewField(); //7 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyOnHand" ); + + f = col.addNewField(); //8 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyReserved" ); + + f = col.addNewField(); //9 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("QtyOrdered" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("Margin" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("10, 50"); + f.setColumn("PriceLimit" ); + + f = col.addNewField(); //10 + f.setType("string"); + f.setLval("1, 20"); + f.setColumn("IsInstanceAttribute" ); + + + return col; + } + + + public String getSQL() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlMain); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + + sql.append(m_sqlOrder); + + System.out.println( "GetSQL = "+sql.toString()); + String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + dataSql = MRole.getDefault().addAccessSQL(dataSql, "p", + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + + return dataSql; + } + + public String getSQLCount() { + String dynWhere = getSQLWhere(); + StringBuffer sql = new StringBuffer (m_sqlCount); + if (dynWhere.length() > 0) + sql.append(dynWhere); // includes first AND + + String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables + countSql = MRole.getDefault().addAccessSQL(countSql, "p", + MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); + //log.finer(countSql); + + + return countSql; + + } + + /** + * Find Price List Version and update context + * + * @param M_PriceList_ID price list + * @return M_PriceList_Version_ID price list version + */ + private int findPLV (int M_PriceList_ID) + { + Timestamp priceDate = null; + // Sales Order Date + String dateStr = Env.getContext(m_ctx, p_WindowNo, "DateOrdered"); + if (dateStr != null && dateStr.length() > 0) + priceDate = Env.getContextAsDate( m_ctx, p_WindowNo, "DateOrdered"); + else // Invoice Date + { + dateStr = Env.getContext(m_ctx, p_WindowNo, "DateInvoiced"); + if (dateStr != null && dateStr.length() > 0) + priceDate = Env.getContextAsDate(m_ctx, p_WindowNo, "DateInvoiced"); + } + // Today + if (priceDate == null) + priceDate = new Timestamp(System.currentTimeMillis()); + // + log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate); + int retValue = 0; + String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom " + + "FROM M_PriceList pl, M_PriceList_Version plv " + + "WHERE pl.M_PriceList_ID=plv.M_PriceList_ID" + + " AND plv.IsActive='Y'" + + " AND pl.M_PriceList_ID=? " // 1 + + "ORDER BY plv.ValidFrom DESC"; + // find newest one + try + { + PreparedStatement pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, M_PriceList_ID); + ResultSet rs = pstmt.executeQuery(); + while (rs.next() && retValue == 0) + { + Timestamp plDate = rs.getTimestamp(2); + if (!priceDate.before(plDate)) + retValue = rs.getInt(1); + } + rs.close(); + pstmt.close(); + } + catch (SQLException e) + { + log.log(Level.SEVERE, sql, e); + } + Env.setContext(m_ctx, p_WindowNo, "M_PriceList_Version_ID", retValue); + return retValue; + } // findPLV + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java new file mode 100644 index 0000000000..c19a62e846 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Info_Column.java @@ -0,0 +1,143 @@ +/****************************************************************************** + * The contents of this file are subject to the Compiere License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * You may obtain a copy of the License at http://www.compiere.org/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 Compiere ERP & CRM Smart Business Solution. The Initial + * Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke + * are Copyright (C) 1999-2005 Jorg Janke. + * All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved. + * Contributor(s): ______________________________________. + *****************************************************************************/ +package com._3e.ADInterface; + +/** + * Info Column Details + * + * @author Jorg Janke + * @version $Id: Info_Column.java,v 1.7 2005/12/17 19:55:47 jjanke Exp $ + */ +public class Info_Column +{ + /** + * Create Info Column (r/o and not color column) + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + */ + public Info_Column (String colHeader, String colSQL, Class colClass) + { + this(colHeader, colSQL, colClass, true, false, null); + } // Info_Column + + /** + * Create Info Column (r/o and not color column) + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + * @param IDcolSQL SQL select for the ID of the for the displayed column (KeyNamePair) + */ + public Info_Column (String colHeader, String colSQL, Class colClass, String IDcolSQL) + { + this(colHeader, colSQL, colClass, true, false, IDcolSQL); + } // Info_Column + + /** + * Create Info Column + * + * @param colHeader Column Header + * @param colSQL SQL select code for column + * @param colClass class of column - determines display + * @param readOnly column is read only + * @param colorColumn if true, value of column determines foreground color + * @param IDcolSQL SQL select for the ID of the for the displayed column + */ + public Info_Column (String colHeader, String colSQL, Class colClass, + boolean readOnly, boolean colorColumn, String IDcolSQL) + { + setColHeader(colHeader); + setColSQL(colSQL); + setColClass(colClass); + setReadOnly(readOnly); + setColorColumn(colorColumn); + setIDcolSQL(IDcolSQL); + } // Info_Column + + + private String m_colHeader; + private String m_colSQL; + private Class m_colClass; + private boolean m_readOnly; + private boolean m_colorColumn; + private String m_IDcolSQL = ""; + + public Class getColClass() + { + return m_colClass; + } + public String getColHeader() + { + return m_colHeader; + } + public String getColSQL() + { + return m_colSQL; + } + public boolean isReadOnly() + { + return m_readOnly; + } + public void setColClass(Class colClass) + { + m_colClass = colClass; + } + public void setColHeader(String colHeader) + { + m_colHeader = colHeader; + if (colHeader != null) + { + int index = colHeader.indexOf('&'); + if (index != -1) + m_colHeader = colHeader.substring(0, index) + colHeader.substring(index+1); + } + } + public void setColSQL(String colSQL) + { + m_colSQL = colSQL; + } + public void setReadOnly(boolean readOnly) + { + m_readOnly = readOnly; + } + public void setColorColumn(boolean colorColumn) + { + m_colorColumn = colorColumn; + } + public boolean isColorColumn() + { + return m_colorColumn; + } + /** + * Add ID column SQL for the displayed column + * The Class for this should be KeyNamePair + */ + public void setIDcolSQL(String IDcolSQL) + { + m_IDcolSQL = IDcolSQL; + if (m_IDcolSQL == null) + m_IDcolSQL = ""; + } + public String getIDcolSQL() + { + return m_IDcolSQL; + } + public boolean isIDcol() + { + return m_IDcolSQL.length() > 0; + } +} // infoColumn + diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java new file mode 100644 index 0000000000..2a46a1c6ce --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADService.java @@ -0,0 +1,69 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com._3e.ADInterface; + + +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.ParameterStyle; +import javax.jws.soap.SOAPBinding.Style; +import javax.jws.soap.SOAPBinding.Use; + +import pl.x3E.adInterface.ModelCRUDRequestDocument; +import pl.x3E.adInterface.ModelGetListRequestDocument; +import pl.x3E.adInterface.ModelRunProcessRequestDocument; +import pl.x3E.adInterface.ModelSetDocActionRequestDocument; +import pl.x3E.adInterface.RunProcessResponseDocument; +import pl.x3E.adInterface.StandardResponseDocument; +import pl.x3E.adInterface.WindowTabDataDocument; + +@WebService(targetNamespace="http://3e.pl/ADInterface") +@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) +public interface ModelADService { + + /* Model oriented web services */ + + public StandardResponseDocument setDocAction(ModelSetDocActionRequestDocument req); + + public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req); + + public WindowTabDataDocument getList(ModelGetListRequestDocument req); + + public StandardResponseDocument createData(ModelCRUDRequestDocument req); + + public StandardResponseDocument updateData(ModelCRUDRequestDocument req); + + public StandardResponseDocument deleteData(ModelCRUDRequestDocument req); + + public WindowTabDataDocument readData(ModelCRUDRequestDocument req); + + public WindowTabDataDocument queryData(ModelCRUDRequestDocument req); + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java new file mode 100644 index 0000000000..695817f2bb --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/ModelADServiceImpl.java @@ -0,0 +1,1058 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com._3e.ADInterface; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import javax.jws.WebService; +import javax.xml.namespace.QName; + +import org.apache.xmlbeans.StringEnumAbstractBase.Table; +import org.compiere.model.MColumn; +import org.compiere.model.MRefTable; +import org.compiere.model.MRole; +import org.compiere.model.MTable; +import org.compiere.model.MWebService; +import org.compiere.model.MWebServiceType; +import org.compiere.model.PO; +import org.compiere.model.POInfo; +import org.compiere.model.X_AD_Reference; +import org.compiere.model.X_WS_WebServiceMethod; +import org.compiere.model.X_WS_WebService_Para; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Login; +import org.compiere.util.Trx; +import org.idempiere.webservices.fault.IdempiereServiceFault; + +import pl.x3E.adInterface.ADLoginRequest; +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.DataSet; +import pl.x3E.adInterface.ModelCRUD; +import pl.x3E.adInterface.ModelCRUDRequestDocument; +import pl.x3E.adInterface.ModelGetList; +import pl.x3E.adInterface.ModelGetListRequestDocument; +import pl.x3E.adInterface.ModelRunProcess; +import pl.x3E.adInterface.ModelRunProcessRequestDocument; +import pl.x3E.adInterface.ModelSetDocAction; +import pl.x3E.adInterface.ModelSetDocActionRequestDocument; +import pl.x3E.adInterface.RunProcess; +import pl.x3E.adInterface.RunProcessDocument; +import pl.x3E.adInterface.RunProcessResponse; +import pl.x3E.adInterface.RunProcessResponseDocument; +import pl.x3E.adInterface.StandardResponse; +import pl.x3E.adInterface.StandardResponseDocument; +import pl.x3E.adInterface.WindowTabData; +import pl.x3E.adInterface.WindowTabDataDocument; +import pl.x3E.adInterface.ModelCRUD.Action.Enum; + +/* + * ADEMPIERE/COMPIERE + * + * replacement: + * GridField by GridFieldVO + * GridTabVO by GridTabVO + * GridWindowVO by GridWindowVO + * + * Contributors: Carlos Ruiz - globalqss + * Add model oriented method modelSetDocAction + * Some Polish messages translated to english using google translate + */ + + +/** + * + * @author kolec + * + */ +@WebService(endpointInterface="com._3e.ADInterface.ModelADService", serviceName="ModelADService",targetNamespace="http://3e.pl/ADInterface") +public class ModelADServiceImpl implements ModelADService { + + private static CLogger log = CLogger.getCLogger(ModelADServiceImpl.class); + + private static String webServiceName = new String("ModelADService"); + + private CompiereService m_cs; + + private MWebService m_webservice = null; + private X_WS_WebServiceMethod m_webservicemethod; + private MWebServiceType m_webservicetype; + + public ModelADServiceImpl() + { + m_cs = new CompiereService(); + m_cs.connect(); + + log.info("Creating session object ADService"); + } + + public String getVersion() { + return "0.7.0"; + } + + /* + * Model oriented web service to change DocAction for documents, i.e. Complete a Material Receipt + * WARNING!!! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow + * To complete documents using workflow it's better to use the runProcess web service + */ + public StandardResponseDocument setDocAction( + ModelSetDocActionRequestDocument req) { + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelSetDocAction modelSetDocAction = req.getModelSetDocActionRequest().getModelSetDocAction(); + String serviceType = modelSetDocAction.getServiceType(); + + ADLoginRequest reqlogin = req.getModelSetDocActionRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "setDocAction", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + Properties ctx = m_cs.getM_ctx(); + + // Validate parameters + modelSetDocAction.setTableName(validateParameter("tableName", modelSetDocAction.getTableName())); + modelSetDocAction.setRecordID(validateParameter("recordID", modelSetDocAction.getRecordID())); + modelSetDocAction.setDocAction(validateParameter("docAction", modelSetDocAction.getDocAction())); + + String tableName = modelSetDocAction.getTableName(); + int recordID = modelSetDocAction.getRecordID(); + String docAction = modelSetDocAction.getDocAction(); + resp.setRecordID (recordID); + + // start a trx + String trxName = Trx.createTrxName("ws_modelSetDocAction"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + + // set explicitly the column DocAction to avoid automatic process of default option + po.set_ValueOfColumn("DocAction", docAction); + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save before set docAction: " + CLogger.retrieveErrorString("no log message")); + + // call process it + try { + if (! ((org.compiere.process.DocAction) po).processIt(docAction)) + return rollbackAndSetError(trx, resp, ret, true, "Couldn't set docAction: " + ((org.compiere.process.DocAction) po).getProcessMsg()); + } catch (Exception e) { + return rollbackAndSetError(trx, resp, ret, true, e.toString()); + } + + // close the trx + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save after set docAction: " + CLogger.retrieveErrorString("no log message")); + + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit after docAction"); + + trx.close(); + + // resp.setError(""); + resp.setIsError(false); + return ret; + } + + private String validateParameter(String parameterName, String string) { + X_WS_WebService_Para para = m_webservicetype.getParameter(parameterName); + if (para == null && (string == null || string.length() == 0)) + // if parameter not configured but didn't receive value (optional param) + return null; + + if (para == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": invalid parameter " + + parameterName, + new QName("validateParameter")); + + if (X_WS_WebService_Para.PARAMETERTYPE_Constant.equals(para.getParameterType())) { + if (string == null || string.length() == 0) { + log.log(Level.INFO, "Web service type " + + m_webservicetype.getValue() + ": constant parameter " + + parameterName + " set to " + + para.getConstantValue()); + return para.getConstantValue(); + } else if (! para.getConstantValue().equals(string)) { + log.log(Level.WARNING, "Web service type " + + m_webservicetype.getValue() + ": constant parameter " + + parameterName + " changed to " + + para.getConstantValue()); + return para.getConstantValue(); + } + } + + // it must be parameter FREE + return string; + } + + private int validateParameter(String parameterName, int i) { + Integer io = Integer.valueOf(i); + String string = validateParameter(parameterName, io.toString()); + if (string == null) + return -1; + if (string.equals(io.toString())) + return i; + return Integer.parseInt(string); + } + + private Enum validateParameter(String parameterName, Enum action, Table table) { + String string = null; + if (action == null) + string = validateParameter(parameterName, string); + else + string = validateParameter(parameterName, action.toString()); + if (string == null) + return (Enum) table.forInt(-1); + if (action != null && string.equals(action.toString())) + return action; + return (Enum) table.forString(string); + } + + private StandardResponseDocument rollbackAndSetError(Trx trx, + StandardResponse resp, StandardResponseDocument ret, boolean isError, + String string) { + resp.setError(string); + resp.setIsError(isError); + trx.rollback(); + trx.close(); + return ret; + } + + private String modelLogin(ADLoginRequest r, String webService, String method, String serviceType) { + + // TODO: Share login between different sessions + if ( m_cs.isLoggedIn() + && m_cs.getM_AD_Client_ID() == r.getClientID() + && m_cs.getM_AD_Org_ID() == r.getOrgID() + && m_cs.getM_AD_Role_ID() == r.getRoleID() + && m_cs.getM_AD_Warehouse_ID() == r.getWarehouseID() + && r.getUser().equals(m_cs.getUser()) + ) + return authenticate(webService, method, serviceType); // already logged with same data + + Login login = new Login(m_cs.getM_ctx()); + KeyNamePair[] roles = login.getRoles(r.getUser(), r.getPass()); + if (roles != null) + { + boolean okrole = false; + for (KeyNamePair role : roles) { + if (role.getKey() == r.getRoleID()) { + okrole = true; + break; + } + } + if (!okrole) + return "Error logging in - role not allowed for this user"; + + KeyNamePair[] clients = login.getClients( new KeyNamePair(r.getRoleID(), "" ) ); + boolean okclient = false; + for (KeyNamePair client : clients) { + if (client.getKey() == r.getClientID()) { + okclient = true; + break; + } + } + if (!okclient) + return "Error logging in - client not allowed for this role"; + + m_cs.getM_ctx().setProperty("#AD_Client_ID", "" + r.getClientID()); + + KeyNamePair[] orgs = login.getOrgs( new KeyNamePair(r.getRoleID(), "" )); + + if (orgs == null) + return "Error logging in - no organizations for this role"; + + KeyNamePair orglogin = null; + boolean okorg = false; + for (KeyNamePair org : orgs) { + if (org.getKey() == r.getOrgID()) { + okorg = true; + orglogin = org; + break; + } + } + if (!okorg) + return "Error logging in - org not allowed for this role"; + + KeyNamePair[] warehouses = login.getWarehouses( new KeyNamePair(r.getOrgID(), "" ) ); + boolean okwh = false; + for (KeyNamePair warehouse : warehouses) { + if (warehouse.getKey() == r.getWarehouseID()) { + okwh = true; + break; + } + } + if (!okwh) + return "Error logging in - warehouse not allowed for this org"; + + String error = login.validateLogin(orglogin); + if (error != null && error.length() > 0) + return error; + + int AD_User_ID = Env.getAD_User_ID(m_cs.getM_ctx()); + + if ( !m_cs.login( AD_User_ID, r.getRoleID(), r.getClientID(), r.getOrgID(), r.getWarehouseID(), r.getLang() ) ) + return "Error logging in"; + } + else + { + return "Error logging in - no roles or user/pwd invalid for user " + r.getUser(); + } + + return authenticate(webService, method, serviceType); + } + + private String authenticate(String webServiceValue, String methodValue, String serviceTypeValue) { + m_webservice = MWebService.get(m_cs.getM_ctx(), webServiceValue); + if (m_webservice == null || ! m_webservice.isActive()) + return "Web Service " + webServiceValue + " not registered"; + + m_webservicemethod = m_webservice.getMethod(methodValue); + if (m_webservicemethod == null || ! m_webservicemethod.isActive()) + return "Method " + methodValue + " not registered"; + + m_webservicetype = null; + final String sql = "SELECT * FROM WS_WebServiceType " + + "WHERE AD_Client_ID=? " + + "AND WS_WebService_ID=? " + + "AND WS_WebServiceMethod_ID=? " + + "AND Value=? " + + "AND IsActive='Y'"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setInt(1, m_cs.getM_AD_Client_ID()); + pstmt.setInt(2, m_webservice.getWS_WebService_ID()); + pstmt.setInt(3, m_webservicemethod.getWS_WebServiceMethod_ID()); + pstmt.setString(4, serviceTypeValue); + rs = pstmt.executeQuery (); + if (rs.next ()) + m_webservicetype = new MWebServiceType (m_cs.getM_ctx(), rs, null); + } + catch (Exception e) + { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("authenticate")); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + + if (m_webservicetype == null) + return "Service type " + serviceTypeValue + " not configured"; + + return null; + } + + public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req) { + RunProcessResponseDocument resbadlogin = RunProcessResponseDocument.Factory.newInstance(); + RunProcessResponse rbadlogin = resbadlogin.addNewRunProcessResponse(); + ModelRunProcess modelRunProcess = req.getModelRunProcessRequest().getModelRunProcess(); + String serviceType = modelRunProcess.getServiceType(); + + ADLoginRequest reqlogin = req.getModelRunProcessRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "runProcess", serviceType); + if (err != null && err.length() > 0) { + rbadlogin.setError(err); + rbadlogin.setIsError( true ); + return resbadlogin; + } + + // Validate parameters + modelRunProcess.setADMenuID(validateParameter("AD_Menu_ID", modelRunProcess.getADMenuID())); + modelRunProcess.setADProcessID(validateParameter("AD_Process_ID", modelRunProcess.getADProcessID())); + modelRunProcess.setADRecordID(validateParameter("AD_Record_ID", modelRunProcess.getADRecordID())); + modelRunProcess.setDocAction(validateParameter("DocAction", modelRunProcess.getDocAction())); + + RunProcessDocument docprocess = RunProcessDocument.Factory.newInstance(); + RunProcess reqprocess = docprocess.addNewRunProcess(); + reqprocess.setParamValues(modelRunProcess.getParamValues()); + reqprocess.setADProcessID(modelRunProcess.getADProcessID()); + reqprocess.setADMenuID(modelRunProcess.getADMenuID()); + reqprocess.setADRecordID(modelRunProcess.getADRecordID()); + reqprocess.setDocAction(modelRunProcess.getDocAction()); + return Process.runProcess(m_cs, docprocess); + } + + public WindowTabDataDocument getList(ModelGetListRequestDocument req) { + WindowTabDataDocument resdoc = WindowTabDataDocument.Factory.newInstance(); + WindowTabData res = resdoc.addNewWindowTabData(); + DataSet ds = res.addNewDataSet(); + ModelGetList modelGetList = req.getModelGetListRequest().getModelGetList(); + String serviceType = modelGetList.getServiceType(); + int cnt = 0; + + ADLoginRequest reqlogin = req.getModelGetListRequest().getADLoginRequest(); + + String err = modelLogin(reqlogin, webServiceName, "getList", serviceType); + if (err != null && err.length() > 0) { + res.setError(err); + res.setErrorInfo(err); + res.setSuccess(false); + return resdoc; + } + int roleid = reqlogin.getRoleID(); + + // Validate parameters + modelGetList.setADReferenceID(validateParameter("AD_Reference_ID", modelGetList.getADReferenceID())); + modelGetList.setFilter(validateParameter("Filter", modelGetList.getFilter())); + + int ref_id = modelGetList.getADReferenceID(); + String filter = modelGetList.getFilter(); + if (filter == null || filter.length() == 0) + filter = ""; + else + filter = " AND " + filter; + + Properties ctx = m_cs.getM_ctx(); + + X_AD_Reference ref = new X_AD_Reference(ctx, ref_id, null); + + String sql = null; + ArrayList listColumnNames = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + if (X_AD_Reference.VALIDATIONTYPE_ListValidation.equals(ref.getValidationType())) { + // Fill List Reference + String ad_language = Env.getAD_Language(ctx); + boolean isBaseLanguage = Env.isBaseLanguage(ad_language, "AD_Ref_List"); + sql = isBaseLanguage ? + "SELECT AD_Ref_List.AD_Ref_List_ID, AD_Ref_List.Value, AD_Ref_List.Name, AD_Ref_List.Description " + + "FROM AD_Ref_List " + + "WHERE AD_Ref_List.AD_Reference_ID=? AND AD_Ref_List.IsActive='Y' " + + filter + + " ORDER BY AD_Ref_List.Name" + : + "SELECT AD_Ref_List.AD_Ref_List_ID, AD_Ref_List.Value, AD_Ref_List_Trl.Name, AD_Ref_List_Trl.Description " + + "FROM AD_Ref_List, AD_Ref_List_Trl " + + "WHERE AD_Ref_List.AD_Reference_ID=? AND AD_Ref_List.IsActive='Y' AND AD_Ref_List_Trl.AD_Language=? AND AD_Ref_List.AD_Ref_List_ID=AD_Ref_List_Trl.AD_Ref_List_ID " + + filter + + " ORDER BY AD_Ref_List_Trl.Name"; + listColumnNames.add("AD_Ref_List_ID"); + listColumnNames.add("Value"); + listColumnNames.add("Name"); + listColumnNames.add("Description"); + try { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, ref_id); + if (!isBaseLanguage) + pstmt.setString(2, ad_language); + rs = pstmt.executeQuery(); + } catch (SQLException e) + { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + DB.close(rs, pstmt); + rs = null; pstmt = null; + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + + } else if (X_AD_Reference.VALIDATIONTYPE_TableValidation.equals(ref.getValidationType())) { + // Fill values from a reference table + MRole role = new MRole(ctx, roleid, null); + String sqlrt = "SELECT * FROM AD_Ref_Table WHERE AD_Reference_ID=?"; + MRefTable rt = null; + PreparedStatement pstmtrt = null; + ResultSet rsrt = null; + try + { + pstmtrt = DB.prepareStatement (sqlrt, null); + pstmtrt.setInt (1, ref_id); + rsrt = pstmtrt.executeQuery (); + if (rsrt.next ()) + rt = new MRefTable(ctx, rsrt, null); + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsrt, pstmtrt); + rsrt = null; pstmtrt = null; + } + if (rt == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": reference table " + + ref_id + " not found", + new QName("getList")); + + MTable table = new MTable(ctx, rt.getAD_Table_ID(), null); + MColumn column = new MColumn(ctx, rt.getAD_Key(), null); + + // TODO: if any value or identifier column is translated, then get them from trl table (and client has multilanguage documents enabled) + sql = "SELECT " + column.getColumnName(); + listColumnNames.add(column.getColumnName()); + if (rt.isValueDisplayed()) { + sql += ",Value"; + listColumnNames.add("Value"); + } + + String sqlident = "SELECT ColumnName FROM AD_Column WHERE AD_Table_ID=? AND IsActive='Y' AND IsIdentifier='Y' ORDER BY SeqNo"; + PreparedStatement pstmtident = null; + ResultSet rsident = null; + try + { + pstmtident = DB.prepareStatement (sqlident, null); + pstmtident.setInt (1, rt.getAD_Table_ID()); + rsident = pstmtident.executeQuery (); + while (rsident.next ()) { + String colnameident = rsident.getString("ColumnName"); + if (rt.isValueDisplayed() && colnameident.equalsIgnoreCase("Value")) { + // Value already added + } else { + sql += "," + colnameident; + listColumnNames.add(colnameident); + } + } + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsident, pstmtident); + rsident = null; pstmtident = null; + } + + sql += " FROM " + table.getTableName() + " WHERE IsActive='Y'"; + sql = role.addAccessSQL(sql, table.getTableName(), true, true); + sql += filter; + if (rt.getWhereClause() != null && rt.getWhereClause().length() > 0) + sql += " AND " + rt.getWhereClause(); + if (rt.getOrderByClause() != null && rt.getOrderByClause().length() > 0) + sql += " ORDER BY " + rt.getOrderByClause(); + + try { + pstmt = DB.prepareStatement(sql, null); + rs = pstmt.executeQuery(); + } catch (SQLException e) { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + DB.close(rs, pstmt); + rs = null; pstmt = null; + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + + } else { + // Don't fill - wrong type + } + + if (rs != null) { + try + { + while (rs.next()) { + cnt++; + // Add values to the dataset + DataRow dr = ds.addNewDataRow(); + for (String listColumnName : listColumnNames) { + if (m_webservicetype.isOutputColumnNameAllowed(listColumnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(listColumnName); + dfid.setVal(rs.getString(listColumnName)); + } + } + } + res.setSuccess(true); + } + catch (SQLException e) + { + res.setError(e.getMessage()); + res.setErrorInfo(sql); + res.setSuccess(false); + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " sql=" + sql, e.getCause(), new QName("getList")); + } + finally + { + DB.close(rs, pstmt); + rs = null; pstmt = null; + } + } + + res.setRowCount(cnt); + res.setNumRows(cnt); + res.setTotalRows(cnt); + res.setStartRow(1); + + return resdoc; + } // getList + + public StandardResponseDocument deleteData(ModelCRUDRequestDocument req) { + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "deleteData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + resp.setRecordID (recordID); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelDeleteData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + + if (!po.delete(false)) + return rollbackAndSetError(trx, resp, ret, true, "Cannot delete record " + recordID + " in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after delete record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } + + private void validateCRUD(ModelCRUD modelCRUD) { + modelCRUD.setTableName(validateParameter("TableName", modelCRUD.getTableName())); + modelCRUD.setRecordID(validateParameter("RecordID", modelCRUD.getRecordID())); + modelCRUD.setFilter(validateParameter("Filter", modelCRUD.getFilter())); + modelCRUD.setAction(validateParameter("Action", modelCRUD.getAction(), ModelCRUD.Action.Enum.table)); + } + + public StandardResponseDocument createData(ModelCRUDRequestDocument req){ + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "createData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelCreateData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + + PO po = table.getPO(0, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "Cannot create PO for " + tableName); + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataRow dr = modelCRUD.getDataRow(); + + for (DataField field : dr.getFieldArray()) { + // TODO: Implement lookup + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + int idxcol = po.get_ColumnIndex(field.getColumn()); + if (idxcol < 0) { + // The column doesn't exist - it must exist as it's defined in security + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " does not exist"); + } else { + try { + setValueAccordingToClass(po, poinfo, field, idxcol); + } + catch (IdempiereServiceFault e) { + log.log(Level.WARNING, "Error setting value", e); + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " value could not be set: " + e.getLocalizedMessage()); + } + } + } else { + + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed"); + } + } + + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + int recordID = po.get_ID(); + resp.setRecordID (recordID); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after create record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } // createData + + private void setValueAccordingToClass(PO po, POInfo poinfo, + DataField field, int idxcol) { + // Evaluate the type of the column and assign a proper variable + Class columnClass = poinfo.getColumnClass(idxcol); + Object value = null; + if (field.getVal() == null || field.getVal().length() == 0) { + value = null; + } else if (columnClass == Boolean.class) { + if ("Y".equalsIgnoreCase(field.getVal()) || "true".equalsIgnoreCase(field.getVal())) + value = new Boolean(true); + else if ("N".equalsIgnoreCase(field.getVal()) || "false".equalsIgnoreCase(field.getVal())) + value = new Boolean(false); + else + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " wrong value " + field.getVal(), + new QName("setValueAccordingToClass")); + } else if (columnClass == Integer.class) { + try { + value = Integer.parseInt(field.getVal()); + } catch (NumberFormatException e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == BigDecimal.class) { + try { + value = new BigDecimal(field.getVal()); + } catch (Exception e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == Timestamp.class) { + try { + value = Timestamp.valueOf(field.getVal()); + } catch (Exception e) { + throw new IdempiereServiceFault(e.getClass().toString() + " " + e.getMessage() + " for " + field.getColumn(), e.getCause(), new QName("setValueAccordingToClass")); + } + } else if (columnClass == byte[].class) { + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " LOB not supported", + new QName("setValueAccordingToClass")); + } else { + value = field.getVal(); + } + if (!po.set_ValueOfColumnReturningBoolean(field.getColumn(), value)) + throw new IdempiereServiceFault("Cannot set value of column " + + field.getColumn(), + new QName("setValueAccordingToClass")); + } + + public StandardResponseDocument updateData(ModelCRUDRequestDocument req){ + StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance(); + StandardResponse resp = ret.addNewStandardResponse(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "updateData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + resp.setIsError(true); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + resp.setRecordID (recordID); + + Properties ctx = m_cs.getM_ctx(); + + // start a trx + String trxName = Trx.createTrxName("ws_modelUpdateData"); + Trx trx = Trx.get(trxName, false); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + return rollbackAndSetError(trx, resp, ret, true, "No table " + tableName); + PO po = table.getPO(recordID, trxName); + if (po == null) + return rollbackAndSetError(trx, resp, ret, true, "No Record " + recordID + " in " + tableName); + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataRow dr = modelCRUD.getDataRow(); + for (DataField field : dr.getFieldArray()) { + // TODO: Implement lookup + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + int idxcol = po.get_ColumnIndex(field.getColumn()); + if (idxcol < 0) { + // The column doesn't exist - it must exist as it's defined in security + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " does not exist"); + } else { + try { + setValueAccordingToClass(po, poinfo, field, idxcol); + } + catch (IdempiereServiceFault e) { + log.log(Level.WARNING, "Error setting value", e); + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " value could not be set: " + e.getLocalizedMessage()); + } + } + } else { + + return rollbackAndSetError(trx, resp, ret, true, "Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed"); + } + } + + if (!po.save()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); + + // close the trx + if (!trx.commit()) + return rollbackAndSetError(trx, resp, ret, true, "Cannot commit transaction after delete record " + recordID + " in " + tableName); + + trx.close(); + + return ret; + } // updateData + + public WindowTabDataDocument readData(ModelCRUDRequestDocument req) { + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData resp = ret.addNewWindowTabData(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + int cnt = 0; + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "readData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + Properties ctx = m_cs.getM_ctx(); + String tableName = modelCRUD.getTableName(); + int recordID = modelCRUD.getRecordID(); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": table " + + tableName + " not found", + new QName("readData")); + PO po = table.getPO(recordID, null); + if (po == null) { + resp.setSuccess(false); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(0); + return ret; + } + cnt = 1; + + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + + DataSet ds = resp.addNewDataSet(); + DataRow dr = ds.addNewDataRow(); + for (int i = 0; i < poinfo.getColumnCount(); i++) { + String columnName = poinfo.getColumnName(i); + if (m_webservicetype.isOutputColumnNameAllowed(columnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(columnName); + if (po.get_Value(i) != null) + dfid.setVal(po.get_Value(i).toString()); + else + dfid.setVal(null); + } + } + + resp.setSuccess(true); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(1); + + return ret; + } + + public WindowTabDataDocument queryData(ModelCRUDRequestDocument req) { + WindowTabDataDocument ret = WindowTabDataDocument.Factory.newInstance(); + WindowTabData resp = ret.addNewWindowTabData(); + ModelCRUD modelCRUD = req.getModelCRUDRequest().getModelCRUD(); + String serviceType = modelCRUD.getServiceType(); + + ADLoginRequest reqlogin = req.getModelCRUDRequest().getADLoginRequest(); + String err = modelLogin(reqlogin, webServiceName, "queryData", serviceType); + if (err != null && err.length() > 0) { + resp.setError(err); + return ret; + } + + // Validate parameters vs service type + validateCRUD(modelCRUD); + + Properties ctx = m_cs.getM_ctx(); + String tableName = modelCRUD.getTableName(); + + // get the PO for the tablename and record ID + MTable table = MTable.get(ctx, tableName); + if (table == null) + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": table " + + tableName + " not found", + new QName("queryData")); + + int roleid = reqlogin.getRoleID(); + MRole role = new MRole(ctx, roleid, null); + + String sqlquery = "SELECT * FROM " + tableName; + sqlquery = role.addAccessSQL(sqlquery, tableName, true, true); + + for (DataField field : modelCRUD.getDataRow().getFieldArray()) { + if (m_webservicetype.isInputColumnNameAllowed(field.getColumn())) { + sqlquery += " AND " + field.getColumn() + "=?"; + } else { + throw new IdempiereServiceFault("Web service type " + + m_webservicetype.getValue() + ": input column " + + field.getColumn() + " not allowed", new QName("queryData")); + } + } + + if (modelCRUD.getFilter() != null && modelCRUD.getFilter().length() > 0) + sqlquery += " AND " + modelCRUD.getFilter(); + + POInfo poinfo = POInfo.getPOInfo(ctx, table.getAD_Table_ID()); + int cnt = 0; + + PreparedStatement pstmtquery = null; + ResultSet rsquery = null; + try + { + pstmtquery = DB.prepareStatement (sqlquery, null); + int p = 1; + for (DataField field : modelCRUD.getDataRow().getFieldArray()) { + int idx = poinfo.getColumnIndex(field.getColumn()); + Class c = poinfo.getColumnClass(idx); + if (c == Integer.class) + pstmtquery.setInt(p++, Integer.valueOf(field.getVal())); + else if (c == Timestamp.class) + pstmtquery.setTimestamp(p++, Timestamp.valueOf(field.getVal())); + else if (c == Boolean.class || c == String.class) + pstmtquery.setString(p++, field.getVal()); + } + rsquery = pstmtquery.executeQuery (); + // Angelo Dabala' (genied) must create just one DataSet, moved outside of the while loop + DataSet ds = resp.addNewDataSet(); + while (rsquery.next ()) { + cnt++; + DataRow dr = ds.addNewDataRow(); + for (int i = 0; i < poinfo.getColumnCount(); i++) { + String columnName = poinfo.getColumnName(i); + if (m_webservicetype.isOutputColumnNameAllowed(columnName)) { + DataField dfid = dr.addNewField(); + dfid.setColumn(columnName); + dfid.setVal(rsquery.getString(columnName)); + } + } + } + } + catch (Exception e) + { + // ignore this exception + } + finally + { + DB.close(rsquery, pstmtquery); + rsquery = null; pstmtquery = null; + } + + resp.setSuccess(true); + resp.setRowCount(cnt); + resp.setNumRows(cnt); + resp.setTotalRows(cnt); + resp.setStartRow(1); + + return ret; + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java new file mode 100644 index 0000000000..fcdf28885a --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/Process.java @@ -0,0 +1,1090 @@ +package com._3e.ADInterface; + +import java.io.ByteArrayOutputStream; +import java.io.CharArrayWriter; +import java.io.File; +import java.io.IOException; +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.Properties; +import java.util.logging.Level; + +import net.sf.compilo.report.ReportProcessor; +import net.sf.jasperreports.engine.JasperPrint; + +import org.compiere.model.GridField; +import org.compiere.model.GridTab; +import org.compiere.model.Lookup; +import org.compiere.model.MAllocationHdr; +import org.compiere.model.MBankStatement; +import org.compiere.model.MInOut; +import org.compiere.model.MInvoice; +import org.compiere.model.MJournal; +import org.compiere.model.MJournalBatch; +import org.compiere.model.MOrder; +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.model.MPaySelectionCheck; +import org.compiere.model.MPayment; +import org.compiere.model.MProcess; +import org.compiere.model.MProcessPara; +import org.compiere.model.MQuery; +import org.compiere.model.MTable; +import org.compiere.model.PO; +import org.compiere.model.PrintInfo; +import org.compiere.print.MPrintFormat; +import org.compiere.print.ReportEngine; +import org.compiere.process.DocumentEngine; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.NamePair; +import org.compiere.util.Trx; +import org.compiere.wf.MWFProcess; +import org.compiere.wf.MWorkflow; + +import pl.x3E.adInterface.DataField; +import pl.x3E.adInterface.DataRow; +import pl.x3E.adInterface.GetProcessParamsDocument; +import pl.x3E.adInterface.LookupValue; +import pl.x3E.adInterface.LookupValues; +import pl.x3E.adInterface.ProcessParam; +import pl.x3E.adInterface.ProcessParamList; +import pl.x3E.adInterface.ProcessParams; +import pl.x3E.adInterface.ProcessParamsDocument; +import pl.x3E.adInterface.RunProcess; +import pl.x3E.adInterface.RunProcessDocument; +import pl.x3E.adInterface.RunProcessResponse; +import pl.x3E.adInterface.RunProcessResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * GridField na GridField + * GridTab na GridTab + */ + +public class Process { + + private static CLogger log = CLogger.getCLogger(Process.class); + + public static ProcessParamsDocument getProcessParams( CompiereService cs, GetProcessParamsDocument req ) + { + ProcessParamsDocument res = ProcessParamsDocument.Factory.newInstance(); + ProcessParams params = res.addNewProcessParams(); + ProcessParamList PL = params.addNewParams(); + + int AD_Menu_ID = req.getGetProcessParams().getADMenuID(); + int AD_Process_ID = req.getGetProcessParams().getADProcessID(); + MProcess process = null; + + if (AD_Menu_ID>0 && AD_Process_ID==0 ) + process = MProcess.getFromMenu( cs.getM_ctx(), AD_Menu_ID); + else + if (AD_Menu_ID==0 && AD_Process_ID>0 ) + process = new MProcess( cs.getM_ctx(), AD_Process_ID, null); + + if (process != null) + { + + params.setDescription(process.getDescription()); + params.setHelp(process.getHelp()); + params.setName( process.getName() ); + params.setADProcessID( process.getAD_Process_ID()); + + MProcessPara[] parameter = process.getParameters(); + for (int i = 0; i < parameter.length; i++) + { + MProcessPara para = parameter[i]; + + ProcessParam p = PL.addNewParam(); + p.setName( para.getName() ); + p.setDescription( para.getDescription() ); + p.setDisplayType( para.getAD_Reference_ID() ); + p.setIsMandatory( para.isMandatory() ); + p.setFieldLength( para.getFieldLength() ); + p.setIsRange( para.isRange() ); + p.setColumnName( para.getColumnName() ); + p.setDefaultValue( para.getDefaultValue() ); + p.setDefaultValue2( para.getDefaultValue2() ); + if (para.getDefaultValue()!=null ) + { + if (DisplayType.isDate(para.getAD_Reference_ID())) + { + if (para.getDefaultValue().indexOf( "@#Date@")>=0) { + //Object t = Env.getContextAsDate( cs.getM_ctx(), "#Date" ); + //String t = Env.getContext( cs.getM_ctx(), "#Date" ); + String t= cs.dateFormat.format( Env.getContextAsDate( cs.getM_ctx(), "#Date") ); + + p.setDefaultValue( t ); //cs.dateFormat.format( t )); + } + } else + if (DisplayType.YesNo ==para.getAD_Reference_ID() ) + { + if ("Y".equalsIgnoreCase(para.getDefaultValue())) + p.setDefaultValue("true"); + else + p.setDefaultValue("false"); + } + } else { + if (DisplayType.YesNo ==para.getAD_Reference_ID()) + p.setDefaultValue("false"); + } + + if (para.getDefaultValue2()!=null) + { + if (DisplayType.isDate(para.getAD_Reference_ID())) + { + if (para.getDefaultValue2().indexOf( "@#Date@")>=0) { + //Object t = Env.getContextAsDate( cs.getM_ctx(), "#Date" ); + //String t = Env.getContext( cs.getM_ctx(), "#Date" ); + String t= cs.dateFormat.format( Env.getContextAsDate( cs.getM_ctx(), "#Date") ); + p.setDefaultValue2( t ); //cs.dateFormat.format( t ) ); + } + } + } + + + if (para.isLookup()) + { + LookupValues lvs = p.addNewLookup(); + Lookup lookup = para.getLookup(); + try { + ADLookup.fillLookupValues( lvs, lookup, para.isMandatory(), false /*isReadOnly*/ ); + } catch (Exception ex) { + System.out.println("getProcessParams exception: " +ex.getMessage()); + ex.printStackTrace(); + } + } + } + } + + return res; + } + + + /************************************************************************** + * Create Process Page + * @param AD_Process_ID Process + * @return Page + */ + public static RunProcessResponseDocument runProcess (CompiereService m_cs, RunProcessDocument req ) + { + RunProcessResponseDocument res = RunProcessResponseDocument.Factory.newInstance(); + RunProcessResponse r= res.addNewRunProcessResponse(); + + RunProcess rp = req.getRunProcess(); + int AD_Process_ID = rp.getADProcessID(); + int m_record_id = rp.getADRecordID(); + //WebSessionCtx wsc = WebSessionCtx.get (request); + + MProcess process = MProcess.get (m_cs.getM_ctx() , AD_Process_ID); + // need to check if Role can access + if (process == null) + { + // WebDoc doc = WebDoc.createWindow("Process not found"); + r.setError("Process not found"); + r.setIsError( true ); + return res; + } + //process.getDescription() + //process.getHelp() + + // Evaluate DocAction, if call have DocAction parameter, then try to set DocAction before calling workflow process + String docAction = rp.getDocAction(); + if (docAction != null && docAction.length() > 0) { + // Requirements + // - the process must be a workflow document + if (process.getAD_Workflow_ID() > 0) { + MWorkflow wf = MWorkflow.get(m_cs.getM_ctx(), process.getAD_Workflow_ID()); + if (wf.getWorkflowType().equals(MWorkflow.WORKFLOWTYPE_DocumentProcess)) { + // - get the table associated with the workflow document + // - set DocAction in such table + + // get the PO for the tablename and record ID + MTable table = MTable.get(m_cs.getM_ctx(), wf.getAD_Table_ID()); + if (table != null) { + PO po = table.getPO(m_record_id, null); + if (po != null) { + po.set_ValueOfColumn("DocAction", docAction); + po.save(); + } + } + } + } + } + + // Create Process Instance + MPInstance pInstance = null; + try + { + pInstance = fillParameter (m_cs, rp.getParamValues(), process); + } + catch (Exception ex) + { + //center.addElement(new p("B��d: " + ex.getMessage(), AlignType.LEFT).setClass("ProcesResultError")); + r.setError(ex.getMessage()); + r.setIsError( true ); + return res; + } + + if (m_record_id>0) + { + pInstance.setRecord_ID( m_record_id); + pInstance.save(); + } + // + ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID()); + pi.setAD_User_ID(Env.getAD_User_ID(m_cs.getM_ctx())); + pi.setAD_Client_ID(Env.getAD_Client_ID(m_cs.getM_ctx())); + pi.setAD_PInstance_ID(pInstance.getAD_PInstance_ID()); + if (m_record_id >0) + pi.setRecord_ID( m_record_id ); + + // Info + //p p = new p(); + //p.addElement(Msg.translate(wsc.ctx, "AD_PInstance_ID") + ": " + pInstance.getAD_PInstance_ID()); + //center.addElement(p); + boolean processOK = false; + + boolean jasperreport = (process != null && process.getClassname()!=null && process.getClassname().indexOf( "net.sf.compilo.report.ReportStarter" ) >=0 ); + + if (jasperreport) + { + //this.jasperReport( request, response, wsc.ctx, pi); + processOK = true; + } + + // Start + if (process.isWorkflow()) + { + try + { + int AD_Workflow_ID = process.getAD_Workflow_ID(); + MWorkflow wf = MWorkflow.get (Env.getCtx(), AD_Workflow_ID); + MWFProcess wfProcess = wf.startWait(pi); // may return null + if(wfProcess != null) + { + //wynik + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( false ); + return res; + } + } + catch(Exception ex) + { + r.setError(ex.getMessage()); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + //Wyj�tek: pi.getLogInfo(true) pi.getLogInfo(true) + } + //started = wfProcess != null; + } + + if (process.isJavaProcess() && !jasperreport) + { + Trx trx = Trx.get(Trx.createTrxName("WebPrc"), true); + try + { + processOK = process.processIt(pi, trx); + trx.commit(); + trx.close(); + } + catch (Throwable t) + { + trx.rollback(); + trx.close(); + } + if (!processOK || pi.isError()) + { + // b��d: pi.getSummary() + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( true ); + processOK = false; + } + else + { + r.setSummary(pi.getSummary()); + r.setLogInfo(pi.getLogInfo(true)); + r.setIsError( false ); + //return res; + // wynik - String summary = pi.getSummary(); + } + } + + // Report + if (/*processOK &&*/ (process.isReport() || jasperreport))//&& !m_jasperreport) + { + r.setIsReport(true); + //if (m_jasperreport) + //{ + // center.addElement(new p("JASPER REPORT", AlignType.LEFT).setClass("Cerror")); + //} + //else + { + ReportEngine re=null; + if (!jasperreport) + re = start(pi); + //ReportEngine.get(m_cs.getM_ctx(), pi); + if (re == null && !jasperreport) + { + //b��d: "Nie uda�o si� uruchomi� silnika raport�w (ReportEngine)", + } + else + { + try + { + boolean ok = false; + File file; + String file_type = "pdf"; + if (!jasperreport) + { + //file = File.createTempFile("WProcess", ".pdf"); + //ok = re.createPDF(file); + MPrintFormat pf = re.getPrintFormat(); + if (pf.isTableBased()) + { + CharArrayWriter wr = new CharArrayWriter(); + //file = File.createTempFile("WProcess", ".xls"); + ok = ReportEngineEx.createEXCEL_HTML_wr( re, m_cs.getM_ctx(), wr, false, re.getPrintFormat().getLanguage() ); + //ok = re.createXML( file ); + file_type ="xls"; + String data = wr.toString(); + if (data!=null) + r.setData(data.getBytes()); + r.setReportFormat(file_type); + } else + { + byte dat[] = re.createPDFData(); + file_type ="pdf"; + r.setData(dat); + r.setReportFormat(file_type); + } + + //r.setReportFormat("xls"); + ok = true; + } + else + { + JasperPrint jp = getJasperReportPrint( m_cs.getM_ctx(), pi); + //file = File.createTempFile("WProcess", ".pdf"); + ByteArrayOutputStream wr = new ByteArrayOutputStream(); + net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfStream(jp, wr); + //exportReportToPdfFile( jp, file.getAbsolutePath() ); + file_type ="pdf"; + r.setData(wr.toByteArray()); + r.setReportFormat(file_type); + ok = true; + } + + if (ok) + { + //pInstance.getAD_PInstance_ID() + //file.getAbsolutePath() + + // Marker that Process is OK + m_cs.getM_ctx().put("AD_PInstance_ID=" + pInstance.getAD_PInstance_ID(), "ok"); + } + else + { + r.setError("Cannot create report"); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + //"Cannot create report:", + } + } + catch (Exception e) + { + r.setError("Cannot create report:" + e.getMessage()); + r.setLogInfo(pi.getLogInfo(true) ); + r.setIsError( true ); + return res; + // , + } + } + } + } + return res; + } // createProcessPage + + + + private static MPInstance fillParameter(CompiereService m_cs, DataRow dr, MProcess process) throws Exception + { + MPInstance pInstance = new MPInstance (process, 0); + + DataField f[] = dr.getFieldArray(); + HashMap fmap = new HashMap(); + for (int i=0; i "; + + doc.appendHead( new style().addElement(st)); + doc.appendBody( table1 ); + doc.appendBody(table); + doc.output(w); + } + w.flush(); + w.close(); + } + catch (Exception e) + { + log.log(Level.SEVERE, "createHTML(w)", e); + } + return false; + } // createHTML + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java new file mode 100644 index 0000000000..39c3c1919b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/_3e/ADInterface/WWindowStatus.java @@ -0,0 +1,200 @@ +package com._3e.ADInterface; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.compiere.model.GridTab; +import org.compiere.model.GridWindow; +import org.compiere.model.GridWindowVO; +import org.compiere.model.MQuery; + +/* + * ADEMPIERE/COMPIERE + * + * A: + * Replace GridWindowVO with GridWindowVO + * GridWindow with GridWindow + * GridTab with GridTab + */ + +public class WWindowStatus +{ + public class AD_WrongTabException extends Exception + { + public AD_WrongTabException( String msg ) { + super(msg); + } + } + + public static WWindowStatus get (Map cache, int WinNo, boolean changeTab, int TabNo, boolean changeRow, /*int RowNo*/int RecordID ) //throws AD_WrongTabException + { + WWindowStatus ws = (WWindowStatus)cache.get(new Integer(WinNo)); + if (ws != null) + { + if (changeTab &&ws.curTab.getTabNo()!=TabNo) + { + //if (!changeTab) + // return null; + //throw ws.new AD_WrongTabException(""); + WWindowStatus.changeTabIfNeeded( ws, TabNo ); + ws.updateRecIDMap(); + } + /* + if (changeRow) + { + if (RowNo<0) RowNo = 0; + if (ws.curTab.getCurrentRow() != RowNo) + { + int r = ws.curTab.navigate(RowNo); + if (r==-1) + ws.curTab.dataRefresh(); + } + }*/ + // zakladamy ze dostajemy teraz RecordID zamiast RowNo; + if (changeRow) { + int RowNo = ws.getRowNoFromRecordID( RecordID ); + + if (RowNo<0) RowNo = 0; + if (ws.curTab.getCurrentRow() != RowNo) + { + int r = ws.curTab.navigate(RowNo); + if (r==-1) + ws.curTab.dataRefresh(); + } + } + + } + +// ADEMPIERE/COMPIERE + if (ws!=null && !ws.curTab.getTableModel().isOpen()) + ws.curTab.getTableModel(). + open(0); // adempiere + //open(); // compiere + + return ws; + } // get + + + /************************************************************************** + * Constructor - First Tab - First Row - Single Row. + *
+ * Initialize Formats + * @param GridWindowVO window VO + */ + public WWindowStatus ( GridWindowVO GridWindowVO) + { + mWindow = new GridWindow(GridWindowVO); + curTab = mWindow.getTab(0); + curTab.setSingleRow(true); + + ctx = GridWindowVO.ctx; + m_needSave = false; + + ads = new ADDataStatusListener(ctx); + curTab.addDataStatusListener( ads ); + + RecordIDMap = new HashMap(); + } // WWindowStatus + + + /** The GridWindow */ + protected GridWindow mWindow; + /** The current GridTab */ + protected GridTab curTab; + + + /** Window Context */ + public Properties ctx = null; + + public ADDataStatusListener ads = null; + + public int TabNo = 0; + public MQuery findQuery = null; + public boolean hasFindParams = false; + public boolean findQueryApplied = false; + public boolean m_needSave = false; + + + /** + * String representation + * @return String representation + */ + public String toString() + { + return "WWindowStatus[" + mWindow + + " - " + curTab + "]"; + } // toString + + + + public static void changeTabIfNeeded(WWindowStatus ws, int TabNo) + { + if (ws.curTab.getTabNo() != TabNo) // tab change + { + //ws.curTab = ws.mWindow.getTab(TabNo); + if (TabNo > ws.curTab.getTabNo()) + { + //if (ws.curTab.getTableModel().isInserting() ) // kolec + // return; + + ws.curTab.removeDataStatusListener( ws.ads ); + // ADEMPIERE/COMPIERE + ws.mWindow.initTab(TabNo); //adempiere specific + ws.curTab = ws.mWindow.getTab(TabNo); + ws.curTab.addDataStatusListener( ws.ads ); + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.m_needSave = false; + ws.updateRecIDMap(); + } + // move back + else if (TabNo < ws.curTab.getTabNo()) + { + ws.curTab.removeDataStatusListener( ws.ads ); +// ADEMPIERE/COMPIERE + ws.mWindow.initTab(TabNo); //adempiere specific + ws.curTab = ws.mWindow.getTab(TabNo); + ws.curTab.addDataStatusListener( ws.ads ); + // ws.curTab.dataRefresh(); // bylo + ws.curTab.query(ws.mWindow.isTransaction()); // false + ws.curTab.navigate(0); + ws.m_needSave = false; + ws.updateRecIDMap(); + } + } + } + + + + Map RecordIDMap = null; + + public int getRowNoFromRecordID( int RecordID ) { + Integer rowNo = this.RecordIDMap.get( RecordID ); + if (rowNo == null) rowNo = new Integer(-1); + System.out.println("getRowNo From RecID "+RecordID+" = "+rowNo.intValue()); + return rowNo.intValue(); + } + + public Map getRecordIDMap() { + return RecordIDMap; + } + + public void updateRecIDMap() { + int rc = curTab.getRowCount(); + int initRowNo = 0; + + //Map RecordIDMap = ws.getRecordIDMap(); + + RecordIDMap.clear(); + + for (int lineNo = initRowNo; lineNo < rc; lineNo++) + { + int recID = curTab.getKeyID( lineNo ); + //System.out.println(""+lineNo+" - "+recID); + RecordIDMap.put( recID, lineNo ); + + } + } + +} // WWindowStatus diff --git a/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java new file mode 100644 index 0000000000..e9c0ecb39b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreService.java @@ -0,0 +1,22 @@ +/** + * + */ +package com.adaxa.ws; + +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; +import javax.jws.soap.SOAPBinding.ParameterStyle; +import javax.jws.soap.SOAPBinding.Style; +import javax.jws.soap.SOAPBinding.Use; + + +/** + * @author ashley + * + */ +@WebService(targetNamespace="http://3e.pl/ADInterface") +@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) +public interface WebstoreService +{ + public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc); +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java new file mode 100644 index 0000000000..07cd49dc47 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/adaxa/ws/WebstoreServiceImpl.java @@ -0,0 +1,579 @@ +/** + * + */ +package com.adaxa.ws; + +import java.math.BigDecimal; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.logging.Level; + +import javax.jws.WebService; + +import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.Lookup; +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.model.MProcess; +import org.compiere.model.MProcessPara; +import org.compiere.model.MWebService; +import org.compiere.model.MWebServiceType; +import org.compiere.model.X_WS_WebServiceMethod; +import org.compiere.model.X_WS_WebService_Para; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.DisplayType; +import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; +import org.compiere.util.Login; +import org.compiere.util.NamePair; +import org.compiere.util.Trx; +import org.compiere.util.ValueNamePair; + +import com._3e.ADInterface.CompiereService; + +/** + * @author ashley + */ +@WebService(endpointInterface="com.adaxa.ws.WebstoreService", serviceName="WebstoreService", targetNamespace="http://3e.pl/ADInterface") +public class WebstoreServiceImpl implements WebstoreService +{ + + protected static final CLogger logger = CLogger + .getCLogger(WebstoreService.class); + public static final String WEB_SERVICE_NAME = "WebstoreService"; + private CompiereService compiereService; + private MWebService webService; + private X_WS_WebServiceMethod webServiceMethod; + private MWebServiceType webServiceType; + + public WebstoreServiceImpl() + { + compiereService = new CompiereService(); + compiereService.connect(); + } + + protected void login(LoginRequest loginRequest) throws Exception + { + Login login = new Login(compiereService.getM_ctx()); + + // Validate user credentials + KeyNamePair[] roles = login.getRoles(loginRequest.getUser(), + loginRequest.getPass()); + + if (roles == null) + { + throw new Exception("Login Error: Invalid user credentials"); + } + + // Validate role + KeyNamePair loginRole = null; + for (KeyNamePair role : roles) + { + if (role.getKey() == loginRequest.getRoleID()) + { + loginRole = role; + break; + } + } + + if (loginRole == null) + { + throw new Exception( + "Login Error: Role is not allowed for this user"); + } + + // Validate client + KeyNamePair[] clients = login.getClients(loginRole); + + if (clients == null) + { + throw new Exception( + "Login Error: Client is not allowed for this user with the defined role"); + } + + KeyNamePair loginClient = null; + for (KeyNamePair client : clients) + { + if (client.getKey() == loginRequest.getClientID()) + { + loginClient = client; + break; + } + } + + if (loginClient == null) + { + throw new Exception( + "Login Error: Client is not allowed for this user with the defined role"); + } + + compiereService.getM_ctx().setProperty("#AD_Client_ID", "" + loginRequest.getClientID()); + + // Validate org + KeyNamePair[] orgs = login.getOrgs(loginRole); + if (orgs == null) + { + throw new Exception( + "Login Error: Organization is not allowed for this user"); + } + + KeyNamePair loginOrg = null; + for (KeyNamePair org : orgs) + { + if (org.getKey() == loginRequest.getOrgID()) + { + loginOrg = org; + break; + } + } + + if (loginOrg == null) + { + throw new Exception( + "Login Error: Organization is not allowed for this user"); + } + + // Validate Warehouse + KeyNamePair[] warehouses = login.getWarehouses(loginOrg); + + if (warehouses == null) + { + throw new Exception( + "Login Error: Warehouse is not allowed for this user"); + } + + KeyNamePair loginWarehouse = null; + for (KeyNamePair warehouse : warehouses) + { + if (warehouse.getKey() == loginRequest.getWarehouseID()) + { + loginWarehouse = warehouse; + break; + } + } + + if (loginWarehouse == null) + { + throw new Exception( + "Login Error: Warehouse is not allowed for this user"); + } + + String error = login.validateLogin(loginOrg); + + if (error != null && error.length() > 0) + { + throw new Exception("Login Error: " + error); + } + + int AD_User_ID = Env.getAD_User_ID(compiereService.getM_ctx()); + + if (!compiereService.login(AD_User_ID, loginRequest.getRoleID(), + loginRequest.getClientID(), loginRequest.getOrgID(), + loginRequest.getWarehouseID(), loginRequest.getLang())) + { + throw new Exception( + "Login Error: Could not initialize login details"); + } + } + + private void initWebServiceType(String webserviceValue, String methodValue, + String serviceTypeValue) throws Exception + { + webService = MWebService.get(compiereService.getM_ctx(), + webserviceValue); + if (webService == null || !webService.isActive()) + { + throw new Exception("Web Service Configuration Error: Web Service " + + webserviceValue + " not registered"); + } + + webServiceMethod = webService.getMethod(methodValue); + if (webServiceMethod == null || !webServiceMethod.isActive()) + { + throw new Exception("Web Service Configuration Error: Method " + + methodValue + " not registered"); + } + + String sql = "SELECT * FROM WS_WebServiceType " + + "WHERE AD_Client_ID=? " + "AND WS_WebService_ID=? " + + "AND WS_WebServiceMethod_ID=? " + "AND Value=? " + + "AND IsActive='Y'"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement(sql, null); + pstmt.setInt(1, compiereService.getM_AD_Client_ID()); + pstmt.setInt(2, webService.getWS_WebService_ID()); + pstmt.setInt(3, webServiceMethod.getWS_WebServiceMethod_ID()); + pstmt.setString(4, serviceTypeValue); + rs = pstmt.executeQuery(); + if (rs.next()) + { + webServiceType = new MWebServiceType( + compiereService.getM_ctx(), rs, null); + } + } + catch (Exception ex) + { + logger.log(Level.SEVERE, "Could not get web service type", ex); + throw new Exception( + "Web Service Error: Could not get web service with type '" + + serviceTypeValue + "'"); + } + finally + { + DB.close(rs, pstmt); + } + + if (webServiceType == null) + { + throw new Exception("Web Service Error: Web service type '" + + serviceTypeValue + "' is not configured"); + } + + String accessSql = "SELECT IsReadWrite FROM WS_WebServiceTypeAccess WHERE AD_Role_ID=? " + + "AND WS_WebServiceType_ID=? AND IsActive='Y'"; + + String hasAccess = DB.getSQLValueString(null, accessSql, + Env.getAD_Role_ID(compiereService.getM_ctx()), + webServiceType.get_ID()); + + if (!"Y".equals(hasAccess)) + { + throw new Exception( + "Web Service Error: Login role does not have access to the service type"); + } + } + + @SuppressWarnings("unchecked") + private T formatValue(String value, Class type) throws Exception + { + try + { + if (value == null) + { + return null; + } + else if (String.class == type) + { + return (T) value; + } + else if (value.trim().length() == 0) + { + return null; + } + else if (Integer.class == type) + { + return (T) Integer.valueOf(value); + } + else if (BigDecimal.class == type) + { + return (T) new BigDecimal(value); + } + else if (Boolean.class == type) + { + if ("Y".equalsIgnoreCase(value)) + { + return (T) Boolean.TRUE; + } + else if ("N".equalsIgnoreCase(value)) + { + return (T) Boolean.FALSE; + } + + return (T) Boolean.valueOf(value); + } + else if (Timestamp.class == type) + { + Date date = compiereService.dateFormat.parse(value); + return (T) new Timestamp(date.getTime()); + } + else + { + + throw new Exception("Casting to type '" + + type.getClass().getName() + "' is not defined"); + } + } + catch (Exception ex) + { + throw new Exception("Cannot cast parameter to type: " + + type.getClass().getName() + ", cause: " + ex.getMessage()); + } + } + + public String formatValue(Object value) + { + if (value == null) + { + return ""; + } + else if (value instanceof Timestamp) + { + Date date = new Date(((Timestamp) value).getTime()); + return compiereService.dateFormat.format(date); + } + + return String.valueOf(value); + } + + private T getConstantParameterValue(MWebServiceType serviceType, + String parameterName, Class type) throws Exception + { + X_WS_WebService_Para processIdParameter = webServiceType + .getParameter(parameterName); + + if (processIdParameter == null + || !X_WS_WebService_Para.PARAMETERTYPE_Constant + .equals(processIdParameter.getParameterType())) + { + logger.severe("Invalid configuration for '" + parameterName + + "' parameter in the web service type: " + + serviceType.getName()); + throw new Exception("Web Service Error: Invalid configuraiton"); + } + + String parameterValue = processIdParameter.getConstantValue(); + + try + { + return formatValue(parameterValue, type); + } + catch (Exception ex) + { + logger.severe("Error in formatting value, cause: " + + ex.getMessage()); + throw new Exception( + "Web Service Error: Invalid configuration for parameter '" + + parameterName + "' and service type '" + + serviceType.getName() + "'"); + } + } + + private MPInstance fillParameters(MProcess process, + Parameter parameters[], int recordId) throws Exception + { + MPInstance processInstance = new MPInstance(process, recordId); + MPInstancePara[] instanceParameters = processInstance.getParameters(); + HashMap parametersMap = new HashMap(); + for (Parameter parameter : parameters) + { + parametersMap.put(parameter.getName(), parameter.getValue()); + } + + for (int i = 0; i < instanceParameters.length; i++) + { + MPInstancePara instanceParameter = instanceParameters[i]; + String parameterName = instanceParameter.getParameterName(); + MProcessPara processParameter = process.getParameter(parameterName); + + if (processParameter == null) + { + logger.severe("Parameter '" + parameterName + + "' not found for process with value '" + + process.getValue() + "'"); + continue; + } + + int displayType = processParameter.getAD_Reference_ID(); + + String value = parametersMap.get(parameterName); + String valueTo = null; + + if (value != null) + { + value = value.trim(); + } + + if (processParameter.isRange()) + { + valueTo = parametersMap.get(parameterName + "_2"); + + if (valueTo != null) + { + valueTo = valueTo.trim(); + } + } + + if (value != null && value.length() == 0) + value = null; + + if (value != null + && (DisplayType.List == displayType + || DisplayType.TableDir == displayType || DisplayType.Table == displayType) + && value.equals("-1")) + { + value = null; + } + + if (value == null && processParameter.isMandatory()) + { + throw new Exception("Parameter '" + parameterName + + "' is mandatory"); + } + + if (DisplayType.isNumeric(displayType) + || DisplayType.isID(displayType)) + { + instanceParameter.setP_Number(formatValue(value, + BigDecimal.class)); + if (processParameter.isRange()) + { + instanceParameter.setP_Number_To(formatValue(valueTo, + BigDecimal.class)); + } + } + else if (DisplayType.isDate(displayType)) + { + instanceParameter + .setP_Date(formatValue(value, Timestamp.class)); + if (processParameter.isRange()) + { + instanceParameter.setP_Date_To(formatValue(valueTo, + Timestamp.class)); + } + } + else if (DisplayType.YesNo == processParameter.getAD_Reference_ID()) + { + boolean booleanValue = formatValue(value, Boolean.class); + instanceParameter.setP_String((booleanValue ? "Y" : "N")); + } + if (processParameter.isLookup()) + { + Lookup lookup = processParameter.getLookup(); + if (lookup != null) + { + NamePair namePair = lookup.getDirect(value, false, false); + if (namePair != null) + { + instanceParameter.setInfo(namePair.getName()); + } + } + } + else + { + instanceParameter.setP_String(value); + instanceParameter.setP_String_To(valueTo); + } + + instanceParameter.saveEx(); + } + + processInstance.saveEx(); + + return processInstance; + } + + private void fillOutputValues(MProcess process, ProcessInfo processInfo, + ProcessResponse processResponse) + { + if (processInfo.getSerializableObject() != null + && processInfo.getSerializableObject() instanceof List) + { + List outputValues = (List) processInfo + .getSerializableObject(); + for (Object obj : outputValues) + { + if (obj instanceof ValueNamePair) + { + ValueNamePair outputValueNamePair = (ValueNamePair)obj; + OutputData outputData = processResponse.addNewOuptutData(); + outputData.setName(outputValueNamePair.getName()); + outputData.setValue(formatValue(outputValueNamePair.getValueObject())); + } + } + } + } + + public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc) + { + ProcessResponseDocument responseDoc = ProcessResponseDocument.Factory.newInstance(); + ProcessResponse response = responseDoc.addNewProcessResponse(); + + LoginRequest loginRequest = requestDoc.getProcessRequest() + .getLoginRequest(); + + String serviceType = requestDoc.getProcessRequest().getServiceType(); + + try + { + login(loginRequest); + initWebServiceType(WEB_SERVICE_NAME, "runProcess", serviceType); + String processValue = getConstantParameterValue(webServiceType, + "PROCESS", String.class); + + int processId = MProcess.getProcess_ID(processValue, null); + + if (processId <= 0) + { + logger.severe("Process with value '" + processValue + "' not found"); + throw new Exception("Configuration error - Process not found"); + } + + MProcess process = MProcess.get(compiereService.getM_ctx(), + processId); + + String accessSql = "SELECT IsReadWrite FROM AD_Process_Access " + + "WHERE AD_Role_ID=? AND AD_Process_ID=? AND IsActive='Y'"; + String hasAccess = DB.getSQLValueString(null, accessSql, + Env.getAD_Role_ID(compiereService.getM_ctx()), processId); + + if (!"Y".equals(hasAccess)) + { + throw new Exception("Configuration Error: Login role doesn not have access to the process"); + } + + Parameter[] parameters = requestDoc.getProcessRequest().getProcessData().getParameterArray(); + MPInstance processInstance = fillParameters(process, parameters, 0); + + ProcessInfo processInfo = new ProcessInfo (process.getName(), process.getAD_Process_ID()); + processInfo.setAD_User_ID(Env.getAD_User_ID(compiereService.getM_ctx())); + processInfo.setAD_Client_ID(Env.getAD_Client_ID(compiereService.getM_ctx())); + processInfo.setAD_PInstance_ID(processInstance.getAD_PInstance_ID()); + + boolean success = false; + + Trx trx = Trx.get(Trx.createTrxName("WSProcess"), true); + try + { + success = process.processIt(processInfo, trx); + fillOutputValues(process, processInfo, response); + trx.commit(); + } + finally + { + trx.rollback(); + trx.close(); + } + + if (success && !processInfo.isError()) + { + response.setIsError(false); + } + else + { + response.setIsError(true); + response.setError(processInfo.getSummary()); + } + } + catch (AdempiereException ex) + { + response.setIsError(true); + response.setError(ex.getMessage()); + } + catch (Exception ex) + { + response.setIsError(true); + response.setError(ex.getMessage()); + } + + return responseDoc; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java new file mode 100644 index 0000000000..dd2b9625ce --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSales.java @@ -0,0 +1,56 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import javax.jws.WebService; + +import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument; + +@WebService +public interface ExternalSales { + + public ProductsPlusCatalogResponseDocument getProductsPlusCatalog(int entityId, int organizationId, int salesChannel, String username, String password); + + public UploadOrdersResponseDocument uploadOrders(int entityId, int organizationId, int salesChannel, ArrayOfTns1Order newOrders, String username, String password); + + public ProductsCatalogResponseDocument getProductsCatalog(int entityId, int organizationId, int salesChannel, String username, String password); + + /* methods to implement */ + + /* + + public GetOrdersResponseDocument getOrders(GetOrdersRequestDocument req) throws XFireFault; + + */ + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java new file mode 100644 index 0000000000..20f6a88407 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/ExternalSalesImpl.java @@ -0,0 +1,171 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +import javax.xml.namespace.QName; + +import org.apache.commons.codec.binary.Base64; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.SecureEngine; +import org.idempiere.webservices.fault.IdempiereServiceFault; +import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponse; +import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponse; +import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponse; +import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * Web Service interface for openbravo pos + * + * Contributors: Carlos Ruiz - globalqss + */ + + +/** + * + * @author Carlos Ruiz - globalqss + * + */ +public class ExternalSalesImpl implements ExternalSales { + + private static CLogger log = CLogger.getCLogger(ExternalSalesImpl.class); + + private static String webServiceName = new String("ExternalSales"); + + public ExternalSalesImpl() + { + log.info("Creating session object ExternalSales"); + } + + public String getVersion() { + return "0.1.0"; + } + + public UploadOrdersResponseDocument uploadOrders(int entityId, + int organizationId, int salesChannel, ArrayOfTns1Order newOrders, + String username, String password) { + // TODO Auto-generated method stub + UploadOrdersResponseDocument resdoc = UploadOrdersResponseDocument.Factory.newInstance(); + UploadOrdersResponse res = resdoc.addNewUploadOrdersResponse(); + + authenticate(username, password, webServiceName, "uploadOrders"); + + return resdoc; + } + + public ProductsCatalogResponseDocument getProductsCatalog(int entityId, + int organizationId, int salesChannel, String username, + String password) { + // TODO Auto-generated method stub + + ProductsCatalogResponseDocument resdoc = ProductsCatalogResponseDocument.Factory.newInstance(); + ProductsCatalogResponse res = resdoc.addNewProductsCatalogResponse(); + + authenticate(username, password, webServiceName, "getProductsCatalog"); + + return resdoc; + } + + public ProductsPlusCatalogResponseDocument getProductsPlusCatalog( + int entityId, int organizationId, int salesChannel, + String username, String password) { + // TODO Auto-generated method stub + ProductsPlusCatalogResponseDocument resdoc = ProductsPlusCatalogResponseDocument.Factory.newInstance(); + ProductsPlusCatalogResponse res = resdoc.addNewProductsPlusCatalogResponse(); + + authenticate(username, password, webServiceName, "getProductsPlusCatalog"); + + /* + * Sample of needed work + * + ArrayOfTns1ProductPlus app = res.addNewArrayOfTns1ProductPlus(); + // Iterate in M_Product for the organization / warehouse? + + for (MProduct product : products) ... + + ProductPlus prds = app.addNewProducts(); + Category cat = prds.addNewCategory(); + cat.setDescription(product.getM_Category().getDescription()); + cat.setId(product.getM_Category_ID()); + cat.setName(product.getM_Category().getName()); + Tax tax = prds.addNewTax(); + tax.setName(product.getC_Tax().getName()); + tax.setId(product.getC_Tax_ID()); + tax.setPercentage(product.getC_Tax().getRate()); + prds.setDescription(product.getDescription()); + prds.setEan(product.getEAN()); + prds.setId(product.getM_Product_ID()); + prds.setListPrice(product.getPriceList()); // we would need a price list related to the POS + prds.setName(product.getName()); + prds.setNumber(product.getNumber()); // number? + prds.setPurchasePrice(product.getPurchasePrice()); // we would need a purchase price list related to the POS + prds.setQtyonhand(product.getQtyOnHand()); // we would need a warehouse or locator related to the POS + */ + + return resdoc; + } + + public static void authenticate(String username, String password, String webServiceName, String method) { + String dbpwd = DB.getSQLValueString(null, "SELECT Password FROM AD_User WHERE Name=? AND Password IS NOT NULL", username); // and ad_client_id in (0,?) + if (dbpwd == null || dbpwd.length() <= 0) + throw new IdempiereServiceFault("Invalid user/password", new QName("username")); + + String isencr = DB.getSQLValueString(null, "SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417"); + if ("Y".equals(isencr)) + dbpwd = SecureEngine.decrypt(dbpwd); + + String hashPassword = null; + try { + hashPassword = new String(Base64.encodeBase64(MessageDigest.getInstance("SHA-1").digest(dbpwd.getBytes("UTF-8"))), "ASCII"); + } catch (UnsupportedEncodingException e1) { + throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username")); + } catch (NoSuchAlgorithmException e1) { + throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username")); + } + + if (! hashPassword.equals(password)) + /* Invalid password */ + throw new IdempiereServiceFault("Invalid user/password", new QName("password")); + + throw new IdempiereServiceFault("Security not implemented yet", new QName("webServiceName")); + // TODO: authenticate web service and method + // TODO: Search for a service type for client and role access with the same value as the method + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java new file mode 100644 index 0000000000..41221a8d7e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebService.java @@ -0,0 +1,60 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument; + +@javax.jws.WebService +public interface WebService { + + /* methods to implement */ + + public GetCustomersResponseDocument getCustomers(int clientId, String username, String password); + + /* + public GetCustomerResponseDocument getCustomer(GetCustomerRequestDocument req) throws XFireFault; + + public GetCustomerResponse1Document getCustomer(GetCustomerRequest1Document req) throws XFireFault; + + public UpdateCustomerResponseDocument updateCustomer(UpdateCustomerRequestDocument req) throws XFireFault; + + public GetCustomerAddressesResponseDocument getCustomerAddresses(GetCustomerAddressesRequestDocument req) throws XFireFault; + + public GetCustomerLocationResponseDocument getCustomerLocation(GetCustomerLocationRequestDocument req) throws XFireFault; + + public UpdateAddressResponseDocument updateAddress(UpdateAddressRequestDocument req) throws XFireFault; + + public GetCustomerContactResponseDocument getCustomerContact(GetCustomerContactRequestDocument req) throws XFireFault; + + public UpdateContactResponseDocument updateContact(UpdateContactRequestDocument req) throws XFireFault; + + */ + +} diff --git a/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java new file mode 100644 index 0000000000..2c7058735e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/com/globalqss/ObPOSInterface/WebServiceImpl.java @@ -0,0 +1,78 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package com.globalqss.ObPOSInterface; + +import org.compiere.util.CLogger; +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponse; +import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument; + +/* + * ADEMPIERE/COMPIERE + * + * Web Service interface for openbravo pos + * + * Contributors: Carlos Ruiz - globalqss + */ + + +/** + * + * @author Carlos Ruiz - globalqss + * + */ +public class WebServiceImpl implements WebService { + + private static CLogger log = CLogger.getCLogger(WebServiceImpl.class); + + private static String webServiceName = new String("WebService"); + + public WebServiceImpl() + { + log.info("Creating session object ExternalSales"); + } + + public String getVersion() { + return "0.1.0"; + } + + public GetCustomersResponseDocument getCustomers(int clientId, String username, String password) + { + // TODO Auto-generated method stub + GetCustomersResponseDocument resdoc = GetCustomersResponseDocument.Factory.newInstance(); + GetCustomersResponse res = resdoc.addNewGetCustomersResponse(); + + ExternalSalesImpl.authenticate(username, password, webServiceName, "getCustomers"); + + // TODO Auto-generated method stub + + return resdoc; + } + +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java new file mode 100644 index 0000000000..042d88bcd4 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/CompiereDataSourceFactory.java @@ -0,0 +1,51 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import java.util.HashMap; +import java.util.Properties; + +import net.sf.compilo.report.ReportInfo; + +import org.compiere.process.ProcessInfo; + +/** + * CompiereDataSourceFactory + * + * @author Peter Shen + * @version $Id: CompiereDataSourceFactory.java,v 1.2 2005/08/04 09:42:41 pshen Exp $ + * @description: CompiereDataSourceFactory + */ +public class CompiereDataSourceFactory +{ + + public static compiereDataSource createDataSource(Properties ctx, ReportInfo ri, ProcessInfo pi, HashMap params) + { + if(ri.getReportViewID() > 0) + return new ReportViewDataSource(ctx, pi, params); + + return new DBDataSource(ctx, ri, params); + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java new file mode 100644 index 0000000000..daa55cc3bb --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/DBDataSource.java @@ -0,0 +1,241 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Properties; + +import net.sf.compilo.report.ReportInfo; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; +import net.sf.jasperreports.engine.JRParameter; +import net.sf.jasperreports.engine.JasperReport; +import net.sf.jasperreports.engine.util.JRQueryExecuter; + +import org.compiere.util.DB; + +/** + * DBDataSource + * + * @author Peter Shen + * @version $Id: DBDataSource.java,v 1.3 2005/08/04 09:42:41 pshen Exp $ + * @description: DBDataSource + */ +public class DBDataSource extends compiereDataSource +{ + private PreparedStatement m_pstmt = null; + private ResultSet m_resultSet = null; + + public DBDataSource(Properties ctx, ReportInfo ri, HashMap params) + { + JasperReport jr = ri.getJasperReport(); + //Generate parameters map + HashMap parametersMap = new HashMap(); + JRParameter[] jpara = jr.getParameters(); + for (int i=0; i= m_printData.getRowCount()) + return false; + + m_printData.setRowIndex(m_index++); + return true; + } + + /* (non-Javadoc) + * @see net.sf.jasperreports.engine.JRDataSource#getFieldValue(net.sf.jasperreports.engine.JRField) + */ + public Object getFieldValue(JRField field) throws JRException + { + PrintDataElement pde = (PrintDataElement)m_printData.getNode(field.getName()); + if(pde == null || pde.isNull()) + return null; + + if(pde.isDate()) + return (java.util.Date)pde.getValue(); + if(pde.isNumeric()) + return (BigDecimal)pde.getValue(); + if(pde.isID() && field.getValueClassName().indexOf("Integer") >= 0) + return (Integer)pde.getValue(); + else if(pde.isID() && field.getValueClassName().indexOf("String") >= 0) + return pde.getValue().toString(); + if(pde.isYesNo()) + return (Boolean)pde.getValue(); + + return pde.getValue().toString(); + } + + + /* (non-Javadoc) + * @see net.sf.compilo.data.compiereDataSource#close() + */ + public void close() + { + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java new file mode 100644 index 0000000000..ee68a607fc --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/compiereDataSource.java @@ -0,0 +1,49 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +import net.sf.jasperreports.engine.JRDataSource; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JRField; + +import org.compiere.util.CLogger; + +/** + * compiereDataSource + * + * @author Peter Shen + * @version $Id: compiereDataSource.java,v 1.4 2005/08/04 09:42:41 pshen Exp $ + * @description: compiereDataSource + */ +public abstract class compiereDataSource implements JRDataSource +{ + protected CLogger log = CLogger.getCLogger(compiereDataSource.class); + + public abstract Object getFieldValue(JRField field) throws JRException; + + public abstract boolean next() throws JRException; + + public abstract void close(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java new file mode 100644 index 0000000000..be70b77770 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/data/sqlProcessor.java @@ -0,0 +1,44 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.data; + +/** + * @author Peter Shen + * @version $Id: sqlProcessor.java,v 1.1 2005/07/15 10:29:40 pshen Exp $ + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Generation - Code and Comments + */ +public class sqlProcessor +{ + /** + * + */ + public sqlProcessor() + { + super(); + // TODO Auto-generated constructor stub + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java new file mode 100644 index 0000000000..678b0dd1a2 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/FileFilter.java @@ -0,0 +1,63 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.report; + +import java.io.File; +import java.io.FilenameFilter; + +/** + * @author Peter Shen + * @version $Id: FileFilter.java,v 1.2 2005/07/16 02:39:17 pshen Exp $ + **/ +public class FileFilter implements FilenameFilter + { + private String reportStart; + private File directory; + private String extension[]; + + public FileFilter(String reportStart, File directory, String[] extension) + { + this.reportStart = reportStart; + this.directory = directory; + this.extension = extension; + } + + public boolean accept(File file, String name) + { + if (file.equals( directory)) + { + if (name.startsWith( reportStart)) + { + for(int i=0; i jasperFile.lastModified()) + { + return true; + } + } + else + return true; + + return false; + } + + public String toString() + { + return "AD_Process_ID:" + m_AD_Process_ID + " XMLFile:" + this.reportFile + " ReportView_ID:" + this.ReportViewID; + } + /** + * @return Returns the reportViewID. + */ + public int getReportViewID() + { + return ReportViewID; + } + /** + * @param reportViewID The reportViewID to set. + */ + protected void setReportViewID(int reportViewID) + { + ReportViewID = reportViewID; + } + /** + * @return Returns the directPrint. + */ + protected boolean isDirectPrint() + { + return directPrint; + } + /** + * @return Returns the errorMsg. + */ + protected ArrayList getErrorMsg() + { + return errorMsg; + } + /** + * @return Returns the hasError. + */ + protected boolean hasError() + { + return hasError; + } + /** + * @return Returns the jasperReport. + */ + public JasperReport getJasperReport() + { + return jasperReport; + } + /** + * @return Returns the subReport. + */ + protected HashMap getSubReport() + { + return subReport; + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java new file mode 100644 index 0000000000..e6eee8573c --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java @@ -0,0 +1,102 @@ +/** + * reportServer for JasperReport. Copyright (C) 2004 Peter Shen. Shanghai, + * China. Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. lombardo@mayking.com, + * mar9000@gmail.com Italy. + */ +package net.sf.compilo.report; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Set; + +import org.compiere.util.CLogger; + +; + +/** + * ReportPool + * + * @author Peter Shen + * @version $Id: ReportPool.java,v 1.2 2005/08/03 10:33:00 pshen Exp $ + * @description: JasperReport Object Pool + */ +public class ReportPool +{ + private static HashMap pool = new HashMap(); + + private static final int MAXNUM = 15; + private static int size = 0; + + private CLogger log = CLogger.getCLogger(ReportPool.class); + + public ReportInfo getReport (int AD_Process_ID ) + { +/* ReportInfo reportinfo = (ReportInfo) pool.get(new Integer(AD_Process_ID)); + if (reportinfo == null) + { + reportinfo = loadReport(AD_Process_ID); + addReport(AD_Process_ID, reportinfo, false); + } + else if(reportinfo.isDirty()) + { + log.info("ReportInfo " + reportinfo + "dirty, Refresh"); + reportinfo = loadReport(AD_Process_ID); + if(!reportinfo.hasError()) + addReport(AD_Process_ID, reportinfo, true); + } +*/ + ReportInfo reportinfo; + reportinfo = loadReport(AD_Process_ID); + return reportinfo; + } + + private ReportInfo loadReport (int AD_Process_ID ) + { + ReportInfo reportinfo = new ReportInfo(AD_Process_ID); + return reportinfo; + } + + private synchronized void addReport(int AD_Process_ID, ReportInfo reportinfo, boolean refresh) + { + if(refresh) + { + pool.put(new Integer(AD_Process_ID), reportinfo); + } + else + { + while(size > MAXNUM) + { + Set s = pool.keySet(); + Iterator it = s.iterator(); + if (it.hasNext()) + { + Integer key = (Integer)it.next(); + log.info("Remove " + key + " from the report pool"); + pool.remove(key); + } + size--; + } + + pool.put(new Integer(AD_Process_ID), reportinfo); + size++; + } + log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size); + } + +} diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java new file mode 100644 index 0000000000..d4e8977a37 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java @@ -0,0 +1,268 @@ +/** + * reportServer for JasperReport. + * Copyright (C) 2004 Peter Shen. + * Shanghai, China. + * Email: zpshen@gmail.com + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contributor: Marco LOMBARDO, Compilo subAdministrator. + * lombardo@mayking.com, mar9000@gmail.com + * Italy. + **/ +package net.sf.compilo.report; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import net.sf.compilo.data.CompiereDataSourceFactory; +import net.sf.compilo.data.compiereDataSource; +import net.sf.jasperreports.engine.JRException; +import net.sf.jasperreports.engine.JasperFillManager; +import net.sf.jasperreports.engine.JasperPrint; + +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.process.ProcessInfo; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Language; + +/** + * Report Server + * + * @author Peter Shen + * @version $Id: ReportProcessor.java,v 1.7 2005/09/03 04:09:51 pshen Exp $ + * @description: report server + */ +public class ReportProcessor +{ + public static final String REPORT_PATH__fix = "c:/compiere/compiere-all/reports"; + + public static File REPORT_HOME = null; + private static CLogger log = CLogger.getCLogger(ReportProcessor.class); + + static + { + String reportPath = REPORT_PATH__fix;// "c:/compiere/compiere-all/reports";//System.getProperty("REPORT_HOME"); + if (reportPath == null || reportPath.length() == 0) + reportPath = System.getProperty("COMPIERE_HOME")+ System.getProperty("file.separator")+ "reports"; + //System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRCompiler"); + String classpath = Thread.currentThread().getContextClassLoader().getResource("net/sf/jasperreports/engine").toString(); + System.setProperty("jasper.reports.compile.temp", reportPath); + System.setProperty("jasper.reports.compile.class.path", classpath.split("file:/")[1].split("!")[0]); + //System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRBshCompiler"); + + REPORT_HOME = new File(reportPath); + if(!REPORT_HOME.exists()) + log.saveError("The Report_Home not exists", REPORT_HOME.getAbsolutePath()); + + log.info("Set REPORT_HOME to " + REPORT_HOME.getAbsolutePath()); + } + + public ReportProcessor (Properties ctx, ProcessInfo pi) + { + System.setProperty("jasper.reports.compile.keep.java.file", "true"); + m_AD_PInstance_ID = pi.getAD_PInstance_ID(); + m_AD_Process_ID = pi.getAD_Process_ID(); + m_Record_ID = pi.getRecord_ID(); + //m_isPrint = pi.getIsPrint(); + m_Param = new HashMap(); + m_ctx = ctx; + m_pi = pi; + } // ReportServer + + public JasperPrint runReport() + { + System.setProperty("jasper.reports.compile.keep.java.file", "true"); + ReportPool rp = new ReportPool(); + ReportInfo reportInfo = rp.getReport(m_AD_Process_ID); + rp = null; + + if (!reportInfo.hasError() && reportInfo.getJasperReport()!= null) + { + // add parameter + m_Param.putAll(reportInfo.getSubReport()); + addProcessParameters( m_AD_PInstance_ID, m_Param); + m_Param.put("RECORD_ID", new Integer( m_Record_ID)); + // Marco LOMBARDO: REPORT_HOME used to express subreports path. + m_Param.put("REPORT_HOME", REPORT_PATH__fix ); //System.getProperty("REPORT_HOME")); + // End Marco LOMBARDO. + Language currLang = Env.getLanguage(Env.getCtx()); + m_Param.put("CURRENT_LANG", currLang.getAD_Language()); + + java.sql.Connection conn = DB.getConnectionRO(); + m_Param.put("REPORT_CONNECTION", conn ); //DB_CONN + m_Param.put("DB_CONN", conn ); + System.out.println( "REPORT_CONNECTION = "+conn.toString() ); + log.saveError("REPORT_CONNECTION = "+conn.toString(), ""); + //System.out.println( "REPORT_HOME = "+System.getProperty("REPORT_HOME") ); + + // fill report + try + { + compiereDataSource ds = CompiereDataSourceFactory.createDataSource(m_ctx, reportInfo, m_pi, m_Param); + //compiereDataSource ds = new compiereDataSource (m_ctx, reportInfo.getJasperReport()); + m_jasperPrint = JasperFillManager.fillReport( reportInfo.getJasperReport(), m_Param, ds); + ds.close(); + + log.finest("ReportProcessor.fillReport"); + } + catch (JRException e) + { + m_jasperPrint = null; + e.printStackTrace(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + else + System.out.println("Error:" + reportInfo.getErrorMsg()); + + return m_jasperPrint; + }// runReport + + + private void addProcessParameters( int AD_PInstance_ID, Map params) + { + log.finest("ReportStarter.addProcessParameters"); + MPInstance pinstance = new MPInstance(m_ctx, AD_PInstance_ID, null); + MPInstancePara[] pinstancePara = pinstance.getParameters(); + + m_Record_ID = pinstance.getRecord_ID(); + params.put("AD_Client_ID",new Integer(pinstance.getAD_Client_ID())); + params.put("AD_Org_ID",new Integer(pinstance.getAD_Org_ID())); + + for(int i=0; i 0) + { + StringBuffer sbuffer = new StringBuffer(); + JRQueryChunk chunk = null; + for(int i = 0; i < chunks.length; i++) + { + chunk = chunks[i]; + switch (chunk.getType()) + { + case JRQueryChunk.TYPE_PARAMETER_CLAUSE : + { + String parameterName = chunk.getText(); + Object parameterValue = parameterValues.get(parameterName); + sbuffer.append(String.valueOf(parameterValue)); + //parameterNames.add(parameterName); +break; + } + case JRQueryChunk.TYPE_PARAMETER : + { + sbuffer.append("?"); + parameterNames.add(chunk.getText()); + break; + } + case JRQueryChunk.TYPE_TEXT : + default : + { + sbuffer.append(chunk.getText()); + break; + } + } + } + + queryString = sbuffer.toString(); + } + } + } + + + /** + * + */ + private PreparedStatement getStatement(Connection conn) throws JRException + { + PreparedStatement pstmt = null; + + if (queryString != null && queryString.trim().length() > 0) + { + try + { + pstmt = conn.prepareStatement(queryString); + + if (parameterNames != null && parameterNames.size() > 0) + { + JRParameter parameter = null; + String parameterName = null; + Class clazz = null; + Object parameterValue = null; + for(int i = 0; i < parameterNames.size(); i++) + { + parameterName = (String)parameterNames.get(i); + parameter = (JRParameter)parametersMap.get(parameterName); + clazz = parameter.getValueClass(); + //FIXMEparameterValue = jrParameter.getValue(); +parameterValue = parameterValues.get(parameterName); + + if ( clazz.equals(java.lang.Object.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.JAVA_OBJECT); + } + else + { + pstmt.setObject(i + 1, parameterValue); + } + } + else if ( clazz.equals(java.lang.Boolean.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.BIT); + } + else + { + pstmt.setBoolean(i + 1, ((Boolean)parameterValue).booleanValue()); + } + } + else if ( clazz.equals(java.lang.Byte.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TINYINT); + } + else + { + pstmt.setByte(i + 1, ((Byte)parameterValue).byteValue()); + } + } + else if ( clazz.equals(java.lang.Double.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DOUBLE); + } + else + { + pstmt.setDouble(i + 1, ((Double)parameterValue).doubleValue()); + } + } + else if ( clazz.equals(java.lang.Float.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.FLOAT); + } + else + { + pstmt.setFloat(i + 1, ((Float)parameterValue).floatValue()); + } + } + else if ( clazz.equals(java.lang.Integer.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.INTEGER); + } + else + { + pstmt.setInt(i + 1, ((Integer)parameterValue).intValue()); + } + } + else if ( clazz.equals(java.lang.Long.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.BIGINT); + } + else + { + pstmt.setLong(i + 1, ((Long)parameterValue).longValue()); + } + } + else if ( clazz.equals(java.lang.Short.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.SMALLINT); + } + else + { + pstmt.setShort(i + 1, ((Short)parameterValue).shortValue()); + } + } + else if ( clazz.equals(java.math.BigDecimal.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DECIMAL); + } + else + { + pstmt.setBigDecimal(i + 1, (BigDecimal)parameterValue); + } + } + else if ( clazz.equals(java.lang.String.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.VARCHAR); + } + else + { + pstmt.setString(i + 1, parameterValue.toString()); + } + } + else if ( clazz.equals(java.util.Date.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.DATE); + } + else + { + pstmt.setDate( i + 1, new java.sql.Date( ((java.util.Date)parameterValue).getTime() ) ); + } + } + else if ( clazz.equals(java.sql.Timestamp.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TIMESTAMP); + } + else + { + pstmt.setTimestamp( i + 1, (java.sql.Timestamp)parameterValue ); + } + } + else if ( clazz.equals(java.sql.Time.class) ) + { + if (parameterValue == null) + { + pstmt.setNull(i + 1, Types.TIME); + } + else + { + pstmt.setTime( i + 1, (java.sql.Time)parameterValue ); + } + } + else + { + throw new JRException("Parameter type not supported in query : " + parameterName + " class " + clazz.getName()); + } + } + } + } + catch (SQLException e) + { + throw new JRException("Error preparing statement for executing the report query : " + "\n\n" + queryString + "\n\n", e); + } + } + + return pstmt; + } + + +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java new file mode 100644 index 0000000000..ac01699c40 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebService + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebService +{ + + /** TableName=WS_WebService */ + public static final String Table_Name = "WS_WebService"; + + /** AD_Table_ID=53162 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java new file mode 100644 index 0000000000..a3d3746a36 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldInput.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceFieldInput + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceFieldInput +{ + + /** TableName=WS_WebServiceFieldInput */ + public static final String Table_Name = "WS_WebServiceFieldInput"; + + /** AD_Table_ID=53166 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Column_ID */ + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + + /** Set Column. + * Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID); + + /** Get Column. + * Column in the table + */ + public int getAD_Column_ID(); + + public I_AD_Column getAD_Column() throws RuntimeException; + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceFieldInput_ID */ + public static final String COLUMNNAME_WS_WebServiceFieldInput_ID = "WS_WebServiceFieldInput_ID"; + + /** Set Web Service Field Input */ + public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID); + + /** Get Web Service Field Input */ + public int getWS_WebServiceFieldInput_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java new file mode 100644 index 0000000000..b94ffc6887 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceFieldOutput.java @@ -0,0 +1,144 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceFieldOutput + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceFieldOutput +{ + + /** TableName=WS_WebServiceFieldOutput */ + public static final String Table_Name = "WS_WebServiceFieldOutput"; + + /** AD_Table_ID=53167 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Column_ID */ + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + + /** Set Column. + * Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID); + + /** Get Column. + * Column in the table + */ + public int getAD_Column_ID(); + + public I_AD_Column getAD_Column() throws RuntimeException; + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceFieldOutput_ID */ + public static final String COLUMNNAME_WS_WebServiceFieldOutput_ID = "WS_WebServiceFieldOutput_ID"; + + /** Set Web Service Field Output */ + public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID); + + /** Get Web Service Field Output */ + public int getWS_WebServiceFieldOutput_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java new file mode 100644 index 0000000000..3622b73c84 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceMethod.java @@ -0,0 +1,181 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceMethod + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceMethod +{ + + /** TableName=WS_WebServiceMethod */ + public static final String Table_Name = "WS_WebServiceMethod"; + + /** AD_Table_ID=53163 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); + + public I_WS_WebService getWS_WebService() throws RuntimeException; + + /** Column name WS_WebServiceMethod_ID */ + public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID"; + + /** Set Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID); + + /** Get Web Service Method */ + public int getWS_WebServiceMethod_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java new file mode 100644 index 0000000000..ddb89d7a90 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceType.java @@ -0,0 +1,207 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceType + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceType +{ + + /** TableName=WS_WebServiceType */ + public static final String Table_Name = "WS_WebServiceType"; + + /** AD_Table_ID=53164 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Table_ID */ + public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID"; + + /** Set Table. + * Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID); + + /** Get Table. + * Database Table information + */ + public int getAD_Table_ID(); + + public I_AD_Table getAD_Table() throws RuntimeException; + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name Description */ + public static final String COLUMNNAME_Description = "Description"; + + /** Set Description. + * Optional short description of the record + */ + public void setDescription (String Description); + + /** Get Description. + * Optional short description of the record + */ + public String getDescription(); + + /** Column name Help */ + public static final String COLUMNNAME_Help = "Help"; + + /** Set Comment/Help. + * Comment or Hint + */ + public void setHelp (String Help); + + /** Get Comment/Help. + * Comment or Hint + */ + public String getHelp(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name Value */ + public static final String COLUMNNAME_Value = "Value"; + + /** Set Search Key. + * Search key for the record in the format required - must be unique + */ + public void setValue (String Value); + + /** Get Search Key. + * Search key for the record in the format required - must be unique + */ + public String getValue(); + + /** Column name WS_WebService_ID */ + public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID"; + + /** Set Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID); + + /** Get Web Service */ + public int getWS_WebService_ID(); + + public I_WS_WebService getWS_WebService() throws RuntimeException; + + /** Column name WS_WebServiceMethod_ID */ + public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID"; + + /** Set Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID); + + /** Get Web Service Method */ + public int getWS_WebServiceMethod_ID(); + + public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException; + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java new file mode 100644 index 0000000000..0df41f4b74 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebServiceTypeAccess.java @@ -0,0 +1,148 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebServiceTypeAccess + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebServiceTypeAccess +{ + + /** TableName=WS_WebServiceTypeAccess */ + public static final String Table_Name = "WS_WebServiceTypeAccess"; + + /** AD_Table_ID=53168 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Role_ID */ + public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID"; + + /** Set Role. + * Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID); + + /** Get Role. + * Responsibility Role + */ + public int getAD_Role_ID(); + + public I_AD_Role getAD_Role() throws RuntimeException; + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name IsReadWrite */ + public static final String COLUMNNAME_IsReadWrite = "IsReadWrite"; + + /** Set Read Write. + * Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite); + + /** Get Read Write. + * Field is read / write + */ + public boolean isReadWrite(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java new file mode 100644 index 0000000000..66e5feea41 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/I_WS_WebService_Para.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for WS_WebService_Para + * @author Adempiere (generated) + * @version Release 3.6.0LTS + */ +public interface I_WS_WebService_Para +{ + + /** TableName=WS_WebService_Para */ + public static final String Table_Name = "WS_WebService_Para"; + + /** AD_Table_ID=53165 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name ConstantValue */ + public static final String COLUMNNAME_ConstantValue = "ConstantValue"; + + /** Set Constant Value. + * Constant value + */ + public void setConstantValue (String ConstantValue); + + /** Get Constant Value. + * Constant value + */ + public String getConstantValue(); + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name ParameterName */ + public static final String COLUMNNAME_ParameterName = "ParameterName"; + + /** Set Parameter Name */ + public void setParameterName (String ParameterName); + + /** Get Parameter Name */ + public String getParameterName(); + + /** Column name ParameterType */ + public static final String COLUMNNAME_ParameterType = "ParameterType"; + + /** Set Parameter Type */ + public void setParameterType (String ParameterType); + + /** Get Parameter Type */ + public String getParameterType(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name WS_WebService_Para_ID */ + public static final String COLUMNNAME_WS_WebService_Para_ID = "WS_WebService_Para_ID"; + + /** Set Web Service Parameters */ + public void setWS_WebService_Para_ID (int WS_WebService_Para_ID); + + /** Get Web Service Parameters */ + public int getWS_WebService_Para_ID(); + + /** Column name WS_WebServiceType_ID */ + public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID"; + + /** Set Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID); + + /** Get Web Service Type */ + public int getWS_WebServiceType_ID(); + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException; +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java new file mode 100644 index 0000000000..d4af46b820 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebService.java @@ -0,0 +1,214 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package org.compiere.model; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CCache; +import org.compiere.util.CLogger; +import org.compiere.util.DB; + +/** + * Web Services Model + * + * @author Carlos Ruiz + */ +public class MWebService extends X_WS_WebService +{ + /** + * + */ + private static final long serialVersionUID = 3561409141850981248L; + + /** + * Get MWebService from Cache + * @param ctx context + * @param WS_WebService_ID id + * @return MWebService + */ + public static MWebService get (Properties ctx, int WS_WebService_ID) + { + Integer key = new Integer (WS_WebService_ID); + MWebService retValue = (MWebService) s_cache.get (key); + if (retValue != null) + return retValue; + retValue = new MWebService (ctx, WS_WebService_ID, null); + if (retValue.get_ID () != 0) + s_cache.put (key, retValue); + return retValue; + } // get + + /** + * Get WebService from Cache + * @param ctx context + * @param webServiceValue + * @return Table + */ + public static MWebService get (Properties ctx, String webServiceValue) + { + if (webServiceValue == null) + return null; + Iterator it = s_cache.values().iterator(); + while (it.hasNext()) + { + MWebService retValue = it.next(); + if (webServiceValue.equals(retValue.getValue())) + return retValue; + } + // + MWebService retValue = null; + String sql = "SELECT * FROM WS_WebService WHERE Value=?"; + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, null); + pstmt.setString(1, webServiceValue); + rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MWebService (ctx, rs, null); + } + catch (Exception e) + { + s_log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + if (retValue != null) + { + Integer key = new Integer (retValue.getWS_WebService_ID()); + s_cache.put (key, retValue); + } + return retValue; + } // get + + /** Methods */ + private X_WS_WebServiceMethod[] m_methods = null; + + /** + * Get Methods + * @param requery requery + * @return array of methods + */ + public X_WS_WebServiceMethod[] getMethods (boolean requery) + { + if (m_methods != null && !requery) + return m_methods; + String sql = "SELECT * FROM WS_WebServiceMethod WHERE WS_WebService_ID=? AND IsActive='Y' ORDER BY Value"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebService_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_WS_WebServiceMethod (getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_methods = new X_WS_WebServiceMethod[list.size ()]; + list.toArray (m_methods); + return m_methods; + } // getMethods + + /** + * Get Method + * @param methodValue + * @return method if found + */ + public X_WS_WebServiceMethod getMethod (String methodValue) + { + if (methodValue == null || methodValue.length() == 0) + return null; + getMethods(false); + // + for (int i = 0; i < m_methods.length; i++) + { + if (methodValue.equals(m_methods[i].getValue())) + return m_methods[i]; + } + return null; + } // getMethod + + /** Cache */ + private static CCache s_cache = new CCache("WS_WebService", 20); + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MWebService.class); + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param WS_WebService_ID + * @param trxName transaction + */ + public MWebService (Properties ctx, int WS_WebService_ID, String trxName) + { + super (ctx, WS_WebService_ID, trxName); + /** if (WS_WebService_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + } */ + } // MWebService + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MWebService (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MWebService + +} // MWebService diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java new file mode 100644 index 0000000000..7d9e9a1f91 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/MWebServiceType.java @@ -0,0 +1,273 @@ +/********************************************************************** +* This file is part of Adempiere ERP Bazaar * +* http://www.adempiere.org * +* * +* Copyright (C) Carlos Ruiz - globalqss * +* Copyright (C) Contributors * +* * +* This program is free software; you can redistribute it and/or * +* modify it under the terms of the GNU General Public License * +* as published by the Free Software Foundation; either version 2 * +* of the License, or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the Free Software * +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * +* MA 02110-1301, USA. * +* * +* Contributors: * +* - Carlos Ruiz (globalqss@users.sourceforge.net) * +* * +* Sponsors: * +* - GlobalQSS (http://www.globalqss.com) * +***********************************************************************/ + +package org.compiere.model; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; + +/** + * Web Services Type Model + * + * @author Carlos Ruiz + */ +public class MWebServiceType extends X_WS_WebServiceType +{ + /** + * + */ + private static final long serialVersionUID = 134887822892217528L; + + /** Parameters */ + private X_WS_WebService_Para[] m_para = null; + + /** Allowed input columns */ + private String[] m_inputcolumnnames = null; + /** Allowed output columns */ + private String[] m_outputcolumnnames = null; + + + /** + * Get Parameters + * @param requery requery + * @return array of methods + */ + public X_WS_WebService_Para[] getParameters (boolean requery) + { + if (m_para != null && !requery) + return m_para; + String sql = "SELECT * FROM WS_WebService_Para WHERE WS_WebServiceType_ID=? AND IsActive='Y' ORDER BY ParameterName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (new X_WS_WebService_Para (getCtx(), rs, get_TrxName())); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_para = new X_WS_WebService_Para[list.size ()]; + list.toArray (m_para); + return m_para; + } // getParameters + + /** + * Get Parameter + * @param parameterName + * @return parameter if found + */ + public X_WS_WebService_Para getParameter (String parameterName) + { + if (parameterName == null || parameterName.length() == 0) + return null; + getParameters(false); + // + for (int i = 0; i < m_para.length; i++) + { + if (parameterName.equals(m_para[i].getParameterName())) + return m_para[i]; + } + return null; + } // getParameter + + /** + * Get Input Columnnames + * @param requery requery + * @return array of methods + */ + public String[] getInputColumnNames (boolean requery) + { + if (m_inputcolumnnames != null && !requery) + return m_inputcolumnnames; + String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldInput f, AD_Column c " + + "WHERE f.WS_WebServiceType_ID=? " + + "AND c.AD_Column_ID=f.AD_Column_ID " + + "AND c.IsActive='Y' " + + "AND f.IsActive='Y' " + + "ORDER BY c.ColumnName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (rs.getString(1)); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_inputcolumnnames = new String[list.size ()]; + list.toArray (m_inputcolumnnames); + return m_inputcolumnnames; + } // getInputColumnNames + + /** + * Is Input Column Name Allowed + * @param columnName + * @return true if allowed + */ + public boolean isInputColumnNameAllowed (String columnName) + { + if (columnName == null || columnName.length() == 0) + return false; + getInputColumnNames(false); + // + for (int i = 0; i < m_inputcolumnnames.length; i++) + { + if (columnName.equals(m_inputcolumnnames[i])) + return true; + } + return false; + } // isInputColumnNameAllowed + + /** + * Get Output Columnnames + * @param requery requery + * @return array of methods + */ + public String[] getOutputColumnNames (boolean requery) + { + if (m_outputcolumnnames != null && !requery) + return m_outputcolumnnames; + String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldOutput f, AD_Column c " + + "WHERE f.WS_WebServiceType_ID=? " + + "AND c.AD_Column_ID=f.AD_Column_ID " + + "AND c.IsActive='Y' " + + "AND f.IsActive='Y' " + + "ORDER BY c.ColumnName"; + ArrayList list = new ArrayList(); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getWS_WebServiceType_ID()); + rs = pstmt.executeQuery (); + while (rs.next ()) + list.add (rs.getString(1)); + } + catch (Exception e) + { + log.log(Level.SEVERE, sql, e); + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + // + m_outputcolumnnames = new String[list.size ()]; + list.toArray (m_outputcolumnnames); + return m_outputcolumnnames; + } // getOutputColumnNames + + /** + * Is Output Column Name Allowed + * @param columnName + * @return true if allowed + */ + public boolean isOutputColumnNameAllowed (String columnName) + { + if (columnName == null || columnName.length() == 0) + return false; + getOutputColumnNames(false); + // + for (int i = 0; i < m_outputcolumnnames.length; i++) + { + if (columnName.equals(m_outputcolumnnames[i])) + return true; + } + return false; + } // isOutputColumnNameAllowed + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MWebServiceType.class); + + /************************************************************************** + * Standard Constructor + * @param ctx context + * @param WS_WebServiceType_ID + * @param trxName transaction + */ + public MWebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName) + { + super (ctx, WS_WebServiceType_ID, trxName); + /** if (WS_WebServiceType_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + setWS_WebServiceMethod_ID (0); + setWS_WebServiceType_ID (0); + } */ + } // MWebServiceType + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MWebServiceType (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MWebServiceType + +} // MWebServiceType diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java new file mode 100644 index 0000000000..286d6bf5f5 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebService + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebService extends PO implements I_WS_WebService, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebService (Properties ctx, int WS_WebService_ID, String trxName) + { + super (ctx, WS_WebService_ID, trxName); + /** if (WS_WebService_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebService (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebService[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java new file mode 100644 index 0000000000..c7a0ba6901 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldInput.java @@ -0,0 +1,154 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceFieldInput + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceFieldInput extends PO implements I_WS_WebServiceFieldInput, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceFieldInput (Properties ctx, int WS_WebServiceFieldInput_ID, String trxName) + { + super (ctx, WS_WebServiceFieldInput_ID, trxName); + /** if (WS_WebServiceFieldInput_ID == 0) + { + setWS_WebServiceFieldInput_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceFieldInput (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldInput[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Column getAD_Column() throws RuntimeException + { + return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name) + .getPO(getAD_Column_ID(), get_TrxName()); } + + /** Set Column. + @param AD_Column_ID + Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID) + { + if (AD_Column_ID < 1) + set_Value (COLUMNNAME_AD_Column_ID, null); + else + set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID)); + } + + /** Get Column. + @return Column in the table + */ + public int getAD_Column_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Field Input. + @param WS_WebServiceFieldInput_ID Web Service Field Input */ + public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID) + { + if (WS_WebServiceFieldInput_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, Integer.valueOf(WS_WebServiceFieldInput_ID)); + } + + /** Get Web Service Field Input. + @return Web Service Field Input */ + public int getWS_WebServiceFieldInput_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldInput_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldInput_ID())); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java new file mode 100644 index 0000000000..88e6b40ed4 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceFieldOutput.java @@ -0,0 +1,154 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceFieldOutput + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceFieldOutput extends PO implements I_WS_WebServiceFieldOutput, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceFieldOutput (Properties ctx, int WS_WebServiceFieldOutput_ID, String trxName) + { + super (ctx, WS_WebServiceFieldOutput_ID, trxName); + /** if (WS_WebServiceFieldOutput_ID == 0) + { + setWS_WebServiceFieldOutput_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceFieldOutput (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldOutput[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Column getAD_Column() throws RuntimeException + { + return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name) + .getPO(getAD_Column_ID(), get_TrxName()); } + + /** Set Column. + @param AD_Column_ID + Column in the table + */ + public void setAD_Column_ID (int AD_Column_ID) + { + if (AD_Column_ID < 1) + set_Value (COLUMNNAME_AD_Column_ID, null); + else + set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID)); + } + + /** Get Column. + @return Column in the table + */ + public int getAD_Column_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Field Output. + @param WS_WebServiceFieldOutput_ID Web Service Field Output */ + public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID) + { + if (WS_WebServiceFieldOutput_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, Integer.valueOf(WS_WebServiceFieldOutput_ID)); + } + + /** Get Web Service Field Output. + @return Web Service Field Output */ + public int getWS_WebServiceFieldOutput_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldOutput_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldOutput_ID())); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java new file mode 100644 index 0000000000..77cb660e6f --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceMethod.java @@ -0,0 +1,195 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceMethod + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceMethod extends PO implements I_WS_WebServiceMethod, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceMethod (Properties ctx, int WS_WebServiceMethod_ID, String trxName) + { + super (ctx, WS_WebServiceMethod_ID, trxName); + /** if (WS_WebServiceMethod_ID == 0) + { + setName (null); + setValue (null); + setWS_WebServiceMethod_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceMethod (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceMethod[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + public I_WS_WebService getWS_WebService() throws RuntimeException + { + return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name) + .getPO(getWS_WebService_ID(), get_TrxName()); } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getWS_WebService_ID())); + } + + /** Set Web Service Method. + @param WS_WebServiceMethod_ID Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID) + { + if (WS_WebServiceMethod_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID)); + } + + /** Get Web Service Method. + @return Web Service Method */ + public int getWS_WebServiceMethod_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java new file mode 100644 index 0000000000..20650b5da3 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceType.java @@ -0,0 +1,250 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.KeyNamePair; + +/** Generated Model for WS_WebServiceType + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceType extends PO implements I_WS_WebServiceType, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName) + { + super (ctx, WS_WebServiceType_ID, trxName); + /** if (WS_WebServiceType_ID == 0) + { + setName (null); + setValue (null); + setWS_WebService_ID (0); + setWS_WebServiceMethod_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceType (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceType[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Table getAD_Table() throws RuntimeException + { + return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name) + .getPO(getAD_Table_ID(), get_TrxName()); } + + /** Set Table. + @param AD_Table_ID + Database Table information + */ + public void setAD_Table_ID (int AD_Table_ID) + { + if (AD_Table_ID < 1) + set_Value (COLUMNNAME_AD_Table_ID, null); + else + set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID)); + } + + /** Get Table. + @return Database Table information + */ + public int getAD_Table_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Comment/Help. + @param Help + Comment or Hint + */ + public void setHelp (String Help) + { + set_Value (COLUMNNAME_Help, Help); + } + + /** Get Comment/Help. + @return Comment or Hint + */ + public String getHelp () + { + return (String)get_Value(COLUMNNAME_Help); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } + + /** Set Search Key. + @param Value + Search key for the record in the format required - must be unique + */ + public void setValue (String Value) + { + set_Value (COLUMNNAME_Value, Value); + } + + /** Get Search Key. + @return Search key for the record in the format required - must be unique + */ + public String getValue () + { + return (String)get_Value(COLUMNNAME_Value); + } + + public I_WS_WebService getWS_WebService() throws RuntimeException + { + return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name) + .getPO(getWS_WebService_ID(), get_TrxName()); } + + /** Set Web Service. + @param WS_WebService_ID Web Service */ + public void setWS_WebService_ID (int WS_WebService_ID) + { + if (WS_WebService_ID < 1) + set_Value (COLUMNNAME_WS_WebService_ID, null); + else + set_Value (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID)); + } + + /** Get Web Service. + @return Web Service */ + public int getWS_WebService_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException + { + return (I_WS_WebServiceMethod)MTable.get(getCtx(), I_WS_WebServiceMethod.Table_Name) + .getPO(getWS_WebServiceMethod_ID(), get_TrxName()); } + + /** Set Web Service Method. + @param WS_WebServiceMethod_ID Web Service Method */ + public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID) + { + if (WS_WebServiceMethod_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceMethod_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID)); + } + + /** Get Web Service Method. + @return Web Service Method */ + public int getWS_WebServiceMethod_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java new file mode 100644 index 0000000000..dbe493a5f7 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebServiceTypeAccess.java @@ -0,0 +1,151 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for WS_WebServiceTypeAccess + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebServiceTypeAccess extends PO implements I_WS_WebServiceTypeAccess, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebServiceTypeAccess (Properties ctx, int WS_WebServiceTypeAccess_ID, String trxName) + { + super (ctx, WS_WebServiceTypeAccess_ID, trxName); + /** if (WS_WebServiceTypeAccess_ID == 0) + { + setAD_Role_ID (0); + setIsReadWrite (true); +// Y + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebServiceTypeAccess (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebServiceTypeAccess[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public I_AD_Role getAD_Role() throws RuntimeException + { + return (I_AD_Role)MTable.get(getCtx(), I_AD_Role.Table_Name) + .getPO(getAD_Role_ID(), get_TrxName()); } + + /** Set Role. + @param AD_Role_ID + Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID) + { + if (AD_Role_ID < 0) + set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null); + else + set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); + } + + /** Get Role. + @return Responsibility Role + */ + public int getAD_Role_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Read Write. + @param IsReadWrite + Field is read / write + */ + public void setIsReadWrite (boolean IsReadWrite) + { + set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite)); + } + + /** Get Read Write. + @return Field is read / write + */ + public boolean isReadWrite () + { + Object oo = get_Value(COLUMNNAME_IsReadWrite); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java new file mode 100644 index 0000000000..345fe07365 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/compiere/model/X_WS_WebService_Para.java @@ -0,0 +1,170 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; + +/** Generated Model for WS_WebService_Para + * @author Adempiere (generated) + * @version Release 3.6.0LTS - $Id$ */ +public class X_WS_WebService_Para extends PO implements I_WS_WebService_Para, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100713L; + + /** Standard Constructor */ + public X_WS_WebService_Para (Properties ctx, int WS_WebService_Para_ID, String trxName) + { + super (ctx, WS_WebService_Para_ID, trxName); + /** if (WS_WebService_Para_ID == 0) + { + setParameterType (null); + setWS_WebService_Para_ID (0); + setWS_WebServiceType_ID (0); + } */ + } + + /** Load Constructor */ + public X_WS_WebService_Para (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_WS_WebService_Para[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Constant Value. + @param ConstantValue + Constant value + */ + public void setConstantValue (String ConstantValue) + { + set_Value (COLUMNNAME_ConstantValue, ConstantValue); + } + + /** Get Constant Value. + @return Constant value + */ + public String getConstantValue () + { + return (String)get_Value(COLUMNNAME_ConstantValue); + } + + /** Set Parameter Name. + @param ParameterName Parameter Name */ + public void setParameterName (String ParameterName) + { + set_ValueNoCheck (COLUMNNAME_ParameterName, ParameterName); + } + + /** Get Parameter Name. + @return Parameter Name */ + public String getParameterName () + { + return (String)get_Value(COLUMNNAME_ParameterName); + } + + /** ParameterType AD_Reference_ID=53288 */ + public static final int PARAMETERTYPE_AD_Reference_ID=53288; + /** Constant = C */ + public static final String PARAMETERTYPE_Constant = "C"; + /** Free = F */ + public static final String PARAMETERTYPE_Free = "F"; + /** Set Parameter Type. + @param ParameterType Parameter Type */ + public void setParameterType (String ParameterType) + { + + set_Value (COLUMNNAME_ParameterType, ParameterType); + } + + /** Get Parameter Type. + @return Parameter Type */ + public String getParameterType () + { + return (String)get_Value(COLUMNNAME_ParameterType); + } + + /** Set Web Service Parameters. + @param WS_WebService_Para_ID Web Service Parameters */ + public void setWS_WebService_Para_ID (int WS_WebService_Para_ID) + { + if (WS_WebService_Para_ID < 1) + set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, null); + else + set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, Integer.valueOf(WS_WebService_Para_ID)); + } + + /** Get Web Service Parameters. + @return Web Service Parameters */ + public int getWS_WebService_Para_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_Para_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException + { + return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name) + .getPO(getWS_WebServiceType_ID(), get_TrxName()); } + + /** Set Web Service Type. + @param WS_WebServiceType_ID Web Service Type */ + public void setWS_WebServiceType_ID (int WS_WebServiceType_ID) + { + if (WS_WebServiceType_ID < 1) + set_Value (COLUMNNAME_WS_WebServiceType_ID, null); + else + set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID)); + } + + /** Get Web Service Type. + @return Web Service Type */ + public int getWS_WebServiceType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java new file mode 100644 index 0000000000..d9c948cd4e --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/WebServiceActivator.java @@ -0,0 +1,28 @@ +package org.idempiere.webservices; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class WebServiceActivator implements BundleActivator{ + private static BundleContext bundleContext = null; + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + bundleContext = context; + } + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + bundleContext = null; + } + + public static BundleContext getBundleContext() { + return bundleContext; + } +} diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java new file mode 100644 index 0000000000..0c882cddf2 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/fault/IdempiereServiceFault.java @@ -0,0 +1,27 @@ +package org.idempiere.webservices.fault; + +import javax.xml.namespace.QName; +import javax.xml.ws.WebFault; + +@WebFault(name="IdempiereServiceFault") +public class IdempiereServiceFault extends RuntimeException{ + + public IdempiereServiceFault(String string, QName qName) { + // TODO Auto-generated constructor stub + } + + public IdempiereServiceFault(String string, Throwable cause, QName qName) { + // TODO Auto-generated constructor stub + } + + public IdempiereServiceFault(Exception exception) { + // TODO Auto-generated constructor stub + } + + /** + * + */ + private static final long serialVersionUID = -5899509711372844325L; + + +} diff --git a/org.idempiere.webservices/WEB-INF/web.xml b/org.idempiere.webservices/WEB-INF/web.xml new file mode 100644 index 0000000000..919c265dab --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/web.xml @@ -0,0 +1,31 @@ + + + + + + + CXFServlet + CXF Servlet + + org.apache.cxf.transport.servlet.CXFServlet + + + config-location + /META-INF/cxf/services.xml + + 1 + + + + CXFServlet + /services/* + + + + 15 + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/BiziWrapper.xsd b/org.idempiere.webservices/WEB-INF/xsd/BiziWrapper.xsd new file mode 100644 index 0000000000..b66590c964 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/BiziWrapper.xsd @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd b/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd new file mode 100644 index 0000000000..c0a5100754 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/WebstoreSchema.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd b/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd new file mode 100644 index 0000000000..6a7a15dc6b --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/obschema.xsd @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/WEB-INF/xsd/schema.xsd b/org.idempiere.webservices/WEB-INF/xsd/schema.xsd new file mode 100644 index 0000000000..200a0caa40 --- /dev/null +++ b/org.idempiere.webservices/WEB-INF/xsd/schema.xsd @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.idempiere.webservices/build.properties b/org.idempiere.webservices/build.properties new file mode 100644 index 0000000000..9312434dee --- /dev/null +++ b/org.idempiere.webservices/build.properties @@ -0,0 +1,28 @@ +source.. = src/,\ + WEB-INF/src/ +output.. = WEB-INF/classes/ +bin.includes = META-INF/,\ + .,\ + WEB-INF/classes/,\ + WEB-INF/web.xml,\ + WEB-INF/xsd/,\ + WEB-INF/lib/spring-web-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-context-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-core-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar,\ + WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar,\ + WEB-INF/lib/wsdl4j-1.6.2.jar,\ + WEB-INF/lib/cxf-2.6.2.jar,\ + WEB-INF/lib/neethi-3.0.2.jar,\ + WEB-INF/lib/xmlschema-core-2.0.3.jar,\ + WEB-INF/lib/stax2-api-3.1.1.jar,\ + WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,\ + WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar,\ + WEB-INF/lib/generated_xbeans.jar,\ + WEB-INF/lib/xmlbeans-2.5.0.jar,\ + WEB-INF/lib/composite_XMLSBean.jar +src.includes = WEB-INF/classes/,\ + WEB-INF/lib/,\ + WEB-INF/web.xml,\ + WEB-INF/xsd/ diff --git a/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql b/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql new file mode 100644 index 0000000000..843eaf48ef --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS001_WebServices.sql @@ -0,0 +1,1538 @@ +-- Jan 30, 2009 5:51:53 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53067,TO_DATE('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Definition','N',TO_DATE('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53067 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53067,TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Security','N',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53068 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53068,TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53068,TO_DATE('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53162,53067,'N',TO_DATE('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service','L','WS_WebService',TO_DATE('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53162 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53256,TO_DATE('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService',1,'Y','N','Y','Y','WS_WebService','N',1000000,TO_DATE('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56694,102,0,19,53162,129,'AD_Client_ID',TO_DATE('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56694 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56695,113,0,19,53162,104,'AD_Org_ID',TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56695 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56696,245,0,16,53162,'Created',TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56696 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56697,246,0,18,110,53162,'CreatedBy',TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56697 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56698,275,0,10,53162,'Description',TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56698 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56699,326,0,14,53162,'Help',TO_DATE('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56699 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56700,348,0,20,53162,'IsActive',TO_DATE('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56700 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53766,0,'WS_WebService_ID',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service','Web Service',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53766 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56701,53766,0,13,53162,'WS_WebService_ID',TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service',0,TO_DATE('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56701 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56702,469,0,10,53162,'Name',TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56702 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56703,607,0,16,53162,'Updated',TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56703 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56704,608,0,18,110,53162,'UpdatedBy',TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56704 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56705,620,0,10,53162,'Value',TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56705 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53163,53067,'N',TO_DATE('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Method','L','WS_WebServiceMethod',TO_DATE('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53163 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53257,TO_DATE('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceMethod',1,'Y','N','Y','Y','WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56706,102,0,19,53163,129,'AD_Client_ID',TO_DATE('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56706 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56707,113,0,19,53163,104,'AD_Org_ID',TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56707 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56708,245,0,16,53163,'Created',TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56708 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56709,246,0,18,110,53163,'CreatedBy',TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56709 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56710,275,0,10,53163,'Description',TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56710 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56711,326,0,14,53163,'Help',TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56711 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56712,348,0,20,53163,'IsActive',TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56712 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53767,0,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Method','Web Service Method',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53767 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56713,53767,0,13,53163,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Method',0,TO_DATE('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56713 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56714,469,0,10,53163,'Name',TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56714 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56715,607,0,16,53163,'Updated',TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56715 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56716,608,0,18,110,53163,'UpdatedBy',TO_DATE('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56716 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56717,620,0,10,53163,'Value',TO_DATE('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56717 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56718,53766,0,19,53163,'WS_WebService_ID',TO_DATE('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','Y','N','N','Y','N','N','N','N','Web Service',1,TO_DATE('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56718 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebService (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebService_Key PRIMARY KEY (WS_WebService_ID)) +; + +CREATE TABLE WS_WebServiceMethod (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10), WS_WebServiceMethod_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceMethod_Key PRIMARY KEY (WS_WebServiceMethod_ID)) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53185,53162,53067,TO_DATE('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service','N',10,0,TO_DATE('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53185 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56718,0,53186,53163,53067,TO_DATE('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Method','N',20,1,TO_DATE('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53186 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56700,56628,0,53185,TO_DATE('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56628 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56694,56629,0,53185,TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56629 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56699,56630,0,53185,TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56630 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56698,56631,0,53185,TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56631 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56702,56632,0,53185,TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56632 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56695,56633,0,53185,TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56633 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56705,56634,0,53185,TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56634 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56701,56635,0,53185,TO_DATE('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56635 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56712,56636,0,53186,TO_DATE('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56636 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56706,56637,0,53186,TO_DATE('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56637 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56711,56638,0,53186,TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56638 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56710,56639,0,53186,TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56639 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56714,56640,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56640 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56707,56641,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56641 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56717,56642,0,53186,TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56642 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56718,56643,0,53186,TO_DATE('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56643 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56713,56644,0,53186,TO_DATE('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Method',TO_DATE('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56644 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56629 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56634 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56632 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56631 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56630 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56628 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56637 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56643 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56642 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56640 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56639 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56638 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56636 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 18:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56643 +; + +INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53200,0,53067,TO_DATE('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Services',TO_DATE('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53200 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 53200, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53200) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=450 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=446 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=439 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=440 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=594 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50009 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53200 +; + +INSERT INTO AD_Menu (Action,AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53201,0,53068,TO_DATE('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Service Security',TO_DATE('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53201 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 53201, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53201) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53201 +; + +-- Jan 30, 2009 6:13:02 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53164,53068,'N',TO_DATE('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type','L','WS_WebServiceType',TO_DATE('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53164 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53258,TO_DATE('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceType',1,'Y','N','Y','Y','WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53165,53068,'N',TO_DATE('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Parameters','L','WS_WebService_Para',TO_DATE('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53165 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53259,TO_DATE('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService_Para',1,'Y','N','Y','Y','WS_WebService_Para','N',1000000,TO_DATE('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53166,53068,'N',TO_DATE('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Input','L','WS_WebServiceFieldInput',TO_DATE('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53166 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53260,TO_DATE('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldInput',1,'Y','N','Y','Y','WS_WebServiceFieldInput','N',1000000,TO_DATE('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53167,53068,'N',TO_DATE('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Output','L','WS_WebServiceFieldOutput',TO_DATE('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53167 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53261,TO_DATE('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldOutput',1,'Y','N','Y','Y','WS_WebServiceFieldOutput','N',1000000,TO_DATE('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53168,53068,'N',TO_DATE('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type Access','L','WS_WebServiceTypeAccess',TO_DATE('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53168 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53262,TO_DATE('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceTypeAccess',1,'Y','N','Y','Y','WS_WebServiceTypeAccess','N',1000000,TO_DATE('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Table SET IsChangeLog='N',Updated=TO_DATE('2009-01-30 18:15:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53168 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56719,102,0,19,53164,129,'AD_Client_ID',TO_DATE('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56719 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56720,113,0,19,53164,104,'AD_Org_ID',TO_DATE('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56720 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56721,245,0,16,53164,'Created',TO_DATE('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56721 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56722,246,0,18,110,53164,'CreatedBy',TO_DATE('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56722 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56723,275,0,10,53164,'Description',TO_DATE('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_DATE('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56723 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56724,326,0,14,53164,'Help',TO_DATE('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_DATE('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56724 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56725,348,0,20,53164,'IsActive',TO_DATE('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56725 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53768,0,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Type','Web Service Type',TO_DATE('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53768 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56726,53768,0,13,53164,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Type',0,TO_DATE('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56726 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56727,469,0,10,53164,'Name',TO_DATE('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_DATE('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56727 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56728,607,0,16,53164,'Updated',TO_DATE('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56728 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56729,608,0,18,110,53164,'UpdatedBy',TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56729 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56730,620,0,10,53164,'Value',TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_DATE('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56730 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56731,53766,0,19,53164,'WS_WebService_ID',TO_DATE('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service',0,TO_DATE('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56731 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52044,'WS_WebService_ID=@WS_WebService_ID@',TO_DATE('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Methods from Web Service','S',TO_DATE('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56732,53767,0,19,53164,52044,'WS_WebServiceMethod_ID',TO_DATE('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service Method',0,TO_DATE('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56732 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56733,126,0,19,53164,'AD_Table_ID',TO_DATE('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_DATE('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56733 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2009-01-30 18:21:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56732 +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2009-01-30 18:21:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56731 +; + +CREATE TABLE WS_WebServiceType (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Table_ID NUMBER(10), Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, Description NVARCHAR2(255), Help NVARCHAR2(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, Value NVARCHAR2(40) NOT NULL, WS_WebService_ID NUMBER(10) NOT NULL, WS_WebServiceMethod_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceType_Key PRIMARY KEY (WS_WebServiceType_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56734,102,0,19,53165,'AD_Client_ID',TO_DATE('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56734 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56735,113,0,19,53165,104,'AD_Org_ID',TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56735 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56736,128,0,13,53165,'AD_Task_ID',TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_DATE('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56736 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53769,0,'WS_WebService_Para_ID',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Parameters','Web Service Parameters',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53769 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56737,53769,0,13,53165,'WS_WebService_Para_ID',TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Parameters',1,TO_DATE('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56737 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56738,245,0,16,53165,'Created',TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56738 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56739,246,0,18,110,53165,'CreatedBy',TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56739 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56740,348,0,20,53165,'IsActive',TO_DATE('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56740 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56741,607,0,16,53165,'Updated',TO_DATE('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56741 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56742,608,0,18,110,53165,'UpdatedBy',TO_DATE('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56742 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsIdentifier='N', IsUpdateable='N', SeqNo=0,Updated=TO_DATE('2009-01-30 18:27:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56737 +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:28:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56736 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56736 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56736 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,ColumnSQL,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56743,1196,0,10,53165,'ParameterName','A',TO_DATE('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,'D',60,'Y','N','N','N','N','N','N','N','N','N','N','Parameter Name',0,TO_DATE('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56743 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53770,0,'ParameterType',TO_DATE('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Parameter Type','Parameter Type',TO_DATE('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53770 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,Help,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53288,TO_DATE('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D',NULL,'Y','N','WS Parameter Type',TO_DATE('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53288 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53451,TO_DATE('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Constant',TO_DATE('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53451 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53452,TO_DATE('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Free',TO_DATE('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'F') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53452 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56744,53770,0,17,53288,53165,'ParameterType',TO_DATE('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Parameter Type',0,TO_DATE('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56744 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56745,1322,0,10,53165,'ConstantValue',TO_DATE('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,'Constant value','D',60,'Y','N','N','N','N','N','N','N','N','N','Y','Constant Value',0,TO_DATE('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56745 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_DATE('2009-01-30 18:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56734 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_DATE('2009-01-30 18:35:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56735 +; + +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_DATE('2009-01-30 18:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56746,102,0,19,53166,'AD_Client_ID',TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56746 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56747,113,0,19,53166,104,'AD_Org_ID',TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56747 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56748,128,0,13,53166,'AD_Task_ID',TO_DATE('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_DATE('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56748 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53771,0,'WS_WebServiceFieldInput_ID',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Input','Web Service Field Input',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53771 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56749,53771,0,13,53166,'WS_WebServiceFieldInput_ID',TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Input',1,TO_DATE('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56749 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56750,245,0,16,53166,'Created',TO_DATE('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56750 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56751,246,0,18,110,53166,'CreatedBy',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56751 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56752,348,0,20,53166,'IsActive',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56752 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56753,607,0,16,53166,'Updated',TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56753 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56754,608,0,18,110,53166,'UpdatedBy',TO_DATE('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56754 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:37:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56748 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56748 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56748 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56755,104,0,19,53166,100,'AD_Column_ID',TO_DATE('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_DATE('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56755 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_DATE('2009-01-30 18:39:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56746 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_DATE('2009-01-30 18:39:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56747 +; + +CREATE TABLE WS_WebServiceFieldInput (AD_Client_ID NUMBER(10) NOT NULL, AD_Column_ID NUMBER(10), AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebServiceFieldInput_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceFieldInput_Key PRIMARY KEY (WS_WebServiceFieldInput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56756,102,0,19,53167,'AD_Client_ID',TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56756 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56757,104,0,19,53167,100,'AD_Column_ID',TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_DATE('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56757 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56758,113,0,19,53167,104,'AD_Org_ID',TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56758 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56759,245,0,16,53167,'Created',TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56759 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56760,246,0,18,110,53167,'CreatedBy',TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56760 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56761,348,0,20,53167,'IsActive',TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56761 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56762,607,0,16,53167,'Updated',TO_DATE('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56762 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56763,608,0,18,110,53167,'UpdatedBy',TO_DATE('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56763 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53772,0,'WS_WebServiceFieldOutput_ID',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Output','Web Service Field Output',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53772 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56764,53772,0,13,53167,'WS_WebServiceFieldOutput_ID',TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Output',1,TO_DATE('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56764 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56765,53768,0,19,53167,'WS_WebServiceType_ID',TO_DATE('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Web Service Type',0,TO_DATE('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56765 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebServiceFieldOutput (AD_Client_ID NUMBER(10) NOT NULL, AD_Column_ID NUMBER(10), AD_Org_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebServiceFieldOutput_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceFieldOutput_Key PRIMARY KEY (WS_WebServiceFieldOutput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56766,102,0,19,53168,'AD_Client_ID',TO_DATE('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_DATE('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56766 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56767,113,0,19,53168,104,'AD_Org_ID',TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56767 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56768,123,0,19,53168,'AD_Role_ID',TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role','D',22,'The Role determines security and access a user who has this Role will have in the System.','Y','N','N','N','N','Y','Y','N','N','N','N','Role',0,TO_DATE('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56768 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56769,143,0,19,53168,'AD_Window_ID',TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',22,'The Window field identifies a unique Window in the system.','Y','N','N','N','N','Y','Y','N','N','N','N','Window',0,TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56769 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56770,245,0,16,53168,'Created',TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_DATE('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56770 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56771,246,0,18,110,53168,'CreatedBy',TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56771 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56772,348,0,20,53168,'IsActive',TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_DATE('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56772 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56773,406,0,20,53168,'IsReadWrite',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write','D',1,'The Read Write indicates that this field may be read and updated.','Y','N','N','N','N','Y','N','N','N','N','Y','Read Write',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56773 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56774,607,0,16,53168,'Updated',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56774 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56775,608,0,18,110,53168,'UpdatedBy',TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_DATE('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56775 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, IsUpdateable='N', Name='Web Service Type',Updated=TO_DATE('2009-01-30 18:41:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56769 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56769 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56769 AND IsCentrallyMaintained='Y' +; + +UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2009-01-30 18:41:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56773 +; + +CREATE TABLE WS_WebServiceTypeAccess (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Role_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsReadWrite CHAR(1) DEFAULT 'Y' CHECK (IsReadWrite IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebServiceTypeAccess_Key PRIMARY KEY (AD_Role_ID, WS_WebServiceType_ID)) +; + +UPDATE AD_Column SET ColumnSQL=NULL,Updated=TO_DATE('2009-01-30 18:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56743 +; + +CREATE TABLE WS_WebService_Para (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, ConstantValue NVARCHAR2(60), Created DATE NOT NULL, CreatedBy NUMBER(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, ParameterName NVARCHAR2(60), ParameterType CHAR(1) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10), WS_WebService_Para_ID NUMBER(10) NOT NULL, WS_WebServiceType_ID NUMBER(10) NOT NULL, CONSTRAINT WS_WebService_Para_Key PRIMARY KEY (WS_WebService_Para_ID)) +; + +ALTER TABLE WS_WebServiceFieldInput ADD (CONSTRAINT ADColumn_WSWebServiceFieldInpu FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column); + +ALTER TABLE WS_WebServiceFieldInput ADD (CONSTRAINT WSWebServiceType_WSWebServicFI FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceFieldOutput ADD (CONSTRAINT ADColumn_WSWebServiceFieldOutp FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column); + +ALTER TABLE WS_WebServiceFieldOutput ADD (CONSTRAINT WSWebServiceType_WSWebServicFO FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceMethod ADD (CONSTRAINT WSWebService_WSWebServiceMetho FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService); + +ALTER TABLE WS_WebService_Para ADD (CONSTRAINT WSWebServiceType_WSWebServiceP FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT ADTable_WSWebServiceType FOREIGN KEY (AD_Table_ID) REFERENCES AD_Table); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT WSWebService_WSWebServiceType FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService); + +ALTER TABLE WS_WebServiceType ADD (CONSTRAINT WSWebServiceMethod_WSWebServic FOREIGN KEY (WS_WebServiceMethod_ID) REFERENCES WS_WebServiceMethod); + +ALTER TABLE WS_WebServiceTypeAccess ADD (CONSTRAINT ADRole_WSWebServiceTypeAccess FOREIGN KEY (AD_Role_ID) REFERENCES AD_Role); + +ALTER TABLE WS_WebServiceTypeAccess ADD (CONSTRAINT WSWebServiceType_WSWebServiceT FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType); + +-- Jan 30, 2009 6:55:49 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53187,53164,53068,TO_DATE('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','Y','N','N','Web Service Type','N',10,0,TO_DATE('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53187 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56725,56645,0,53187,TO_DATE('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56645 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56719,56646,0,53187,TO_DATE('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56646 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56724,56647,0,53187,TO_DATE('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_DATE('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56647 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56723,56648,0,53187,TO_DATE('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_DATE('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56648 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56727,56649,0,53187,TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56649 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56720,56650,0,53187,TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56650 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56730,56651,0,53187,TO_DATE('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_DATE('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56651 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56733,56652,0,53187,TO_DATE('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_DATE('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56652 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56731,56653,0,53187,TO_DATE('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_DATE('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56653 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56732,56654,0,53187,TO_DATE('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service Method',TO_DATE('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56654 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56726,56655,0,53187,TO_DATE('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56655 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56646 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56650 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56651 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56649 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56653 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56654 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56652 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56648 +; + +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56647 +; + +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56645 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:57:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56650 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56736,0,53188,53165,53068,TO_DATE('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Parameters','N',20,1,TO_DATE('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53188 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56740,56656,0,53188,TO_DATE('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56656 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56734,56657,0,53188,TO_DATE('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56657 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56745,56658,0,53188,TO_DATE('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100,'Constant value',60,'D','Y','Y','Y','N','N','N','N','N','Constant Value',TO_DATE('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56658 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56735,56659,0,53188,TO_DATE('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56659 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56743,56660,0,53188,TO_DATE('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100,60,'D','Y','Y','Y','N','N','N','N','N','Parameter Name',TO_DATE('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56660 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56744,56661,0,53188,TO_DATE('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Parameter Type',TO_DATE('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56661 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56737,56662,0,53188,TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Parameters',TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56662 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56736,56663,0,53188,TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56663 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56657 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56663 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56660 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56661 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56656 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 18:59:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET DisplayLogic='@ParameterType@=''C''',Updated=TO_DATE('2009-01-30 18:59:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Column SET ReadOnlyLogic='@ParameterType@!C',Updated=TO_DATE('2009-01-30 18:59:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56748,0,53189,53166,53068,TO_DATE('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Input','N',30,1,TO_DATE('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53189 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56752,56664,0,53189,TO_DATE('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56664 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56746,56665,0,53189,TO_DATE('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56665 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56755,56666,0,53189,TO_DATE('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_DATE('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56666 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56747,56667,0,53189,TO_DATE('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56667 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56749,56668,0,53189,TO_DATE('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Input',TO_DATE('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56668 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56748,56669,0,53189,TO_DATE('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56669 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56665 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56669 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56666 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56664 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:03:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56669 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53190,53167,53068,TO_DATE('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Output','N',40,1,TO_DATE('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53190 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56761,56670,0,53190,TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56670 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56756,56671,0,53190,TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56671 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56757,56672,0,53190,TO_DATE('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_DATE('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56672 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56758,56673,0,53190,TO_DATE('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56673 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56764,56674,0,53190,TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Output',TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56674 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56765,56675,0,53190,TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56675 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56671 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56675 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56672 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56670 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:03:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:04:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56675 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56769,0,53191,53168,53068,TO_DATE('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Access','N',50,1,TO_DATE('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53191 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56772,56676,0,53191,TO_DATE('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_DATE('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56676 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56766,56677,0,53191,TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56677 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56767,56678,0,53191,TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_DATE('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56678 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56773,56679,0,53191,TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write',1,'D','The Read Write indicates that this field may be read and updated.','Y','Y','Y','N','N','N','N','N','Read Write',TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56679 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56768,56680,0,53191,TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role',22,'D','The Role determines security and access a user who has this Role will have in the System.','Y','Y','Y','N','N','N','N','N','Role',TO_DATE('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56680 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56769,56681,0,53191,TO_DATE('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_DATE('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56681 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=56679 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56677 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56681 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56680 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56676 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-01-30 19:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2009-01-30 19:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56681 +; + +-- Jan 30, 2009 7:07:51 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53264,TO_DATE('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_DATE('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53265,TO_DATE('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53266,TO_DATE('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53268,TO_DATE('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_DATE('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53269,TO_DATE('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_DATE('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53270,TO_DATE('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_DATE('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2009-01-30 20:03:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +-- Feb 1, 2009 7:49:10 PM COT +-- Web Service Definition and Security +UPDATE AD_Tab SET AD_Column_ID=56765,Updated=TO_DATE('2009-02-01 19:49:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + diff --git a/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql b/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql new file mode 100644 index 0000000000..86c5e0818b --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS002_WebServicesDefinition.sql @@ -0,0 +1,145 @@ +-- Jan 30, 2009 7:13:26 PM COT +-- Web Service Definition and Security +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020) +; + +UPDATE WS_WebService SET IsActive='N',Updated=TO_DATE('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt +WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow. +To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028) +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032) +; + +UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_DATE('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040) +; + diff --git a/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql b/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql new file mode 100644 index 0000000000..5ef9900135 --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS003_WebServicesConfigGardenWorldSample.sql @@ -0,0 +1,83 @@ +-- Jan 30, 2009 7:44:20 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001) +; + diff --git a/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql b/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql new file mode 100644 index 0000000000..623775be2e --- /dev/null +++ b/org.idempiere.webservices/migration/oracle/WS004_WebServicesFixDict.sql @@ -0,0 +1 @@ +update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714; diff --git a/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql b/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql new file mode 100644 index 0000000000..ad901a7ecd --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS001_WebServices.sql @@ -0,0 +1,1538 @@ +-- Jan 30, 2009 5:51:53 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53067,TO_TIMESTAMP('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Definition','N',TO_TIMESTAMP('2009-01-30 17:51:52','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53067 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53067,TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:51:54','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType,WinHeight,WinWidth) VALUES (0,0,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Y','N','Y','Web Service Security','N',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'M',0,0) +; + +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53068 AND EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Window_ID!=t.AD_Window_ID) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,0,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,103,53068,TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Window_Access (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_Window_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (0,0,50001,53068,TO_TIMESTAMP('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 17:57:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53162,53067,'N',TO_TIMESTAMP('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service','L','WS_WebService',TO_TIMESTAMP('2009-01-30 17:57:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53162 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53256,TO_TIMESTAMP('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService',1,'Y','N','Y','Y','WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 17:57:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56694,102,0,19,53162,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 17:58:02','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56694 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56695,113,0,19,53162,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56695 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56696,245,0,16,53162,'Created',TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 17:58:03','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56696 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56697,246,0,18,110,53162,'CreatedBy',TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56697 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56698,275,0,10,53162,'Description',TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 17:58:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56698 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56699,326,0,14,53162,'Help',TO_TIMESTAMP('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 17:58:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56699 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56700,348,0,20,53162,'IsActive',TO_TIMESTAMP('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 17:58:06','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56700 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53766,0,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service','Web Service',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53766 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56701,53766,0,13,53162,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service',0,TO_TIMESTAMP('2009-01-30 17:58:07','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56701 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56702,469,0,10,53162,'Name',TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56702 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56703,607,0,16,53162,'Updated',TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 17:58:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56703 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56704,608,0,18,110,53162,'UpdatedBy',TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56704 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56705,620,0,10,53162,'Value',TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 17:58:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56705 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('4',0,0,53163,53067,'N',TO_TIMESTAMP('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Method','L','WS_WebServiceMethod',TO_TIMESTAMP('2009-01-30 18:01:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53163 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53257,TO_TIMESTAMP('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceMethod',1,'Y','N','Y','Y','WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 18:01:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56706,102,0,19,53163,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:01:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56706 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56707,113,0,19,53163,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56707 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56708,245,0,16,53163,'Created',TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:01:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56708 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56709,246,0,18,110,53163,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56709 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56710,275,0,10,53163,'Description',TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 18:01:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56710 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56711,326,0,14,53163,'Help',TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56711 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56712,348,0,20,53163,'IsActive',TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:01:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56712 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53767,0,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Method','Web Service Method',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53767 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56713,53767,0,13,53163,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Method',0,TO_TIMESTAMP('2009-01-30 18:01:33','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56713 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56714,469,0,10,53163,'Name',TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56714 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56715,607,0,16,53163,'Updated',TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:01:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56715 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56716,608,0,18,110,53163,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:01:35','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56716 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56717,620,0,10,53163,'Value',TO_TIMESTAMP('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 18:01:36','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56717 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56718,53766,0,19,53163,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','Y','N','N','Y','N','N','N','N','Web Service',1,TO_TIMESTAMP('2009-01-30 18:02:29','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56718 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebService (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebService_Key PRIMARY KEY (WS_WebService_ID)) +; + +CREATE TABLE WS_WebServiceMethod (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10), WS_WebServiceMethod_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceMethod_Key PRIMARY KEY (WS_WebServiceMethod_ID)) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53185,53162,53067,TO_TIMESTAMP('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service','N',10,0,TO_TIMESTAMP('2009-01-30 18:04:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53185 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56718,0,53186,53163,53067,TO_TIMESTAMP('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Method','N',20,1,TO_TIMESTAMP('2009-01-30 18:05:26','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53186 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56700,56628,0,53185,TO_TIMESTAMP('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:05:36','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56628 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56694,56629,0,53185,TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56629 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56699,56630,0,53185,TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:05:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56630 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56698,56631,0,53185,TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56631 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56702,56632,0,53185,TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:05:38','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56632 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56695,56633,0,53185,TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56633 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56705,56634,0,53185,TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:05:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56634 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56701,56635,0,53185,TO_TIMESTAMP('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:05:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56635 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56712,56636,0,53186,TO_TIMESTAMP('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:05:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56636 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56706,56637,0,53186,TO_TIMESTAMP('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:05:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56637 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56711,56638,0,53186,TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56638 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56710,56639,0,53186,TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:05:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56639 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56714,56640,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56640 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56707,56641,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56641 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56717,56642,0,53186,TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:05:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56642 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56718,56643,0,53186,TO_TIMESTAMP('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:05:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56643 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56713,56644,0,53186,TO_TIMESTAMP('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Method',TO_TIMESTAMP('2009-01-30 18:05:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56644 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56629 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56634 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56632 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56631 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56630 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56628 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56633 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56637 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56643 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56642 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56640 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56639 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56638 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56636 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:06:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56641 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 18:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56643 +; + +INSERT INTO AD_Menu ("action",AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53200,0,53067,TO_TIMESTAMP('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Services',TO_TIMESTAMP('2009-01-30 18:08:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53200 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 53200, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53200) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=450 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=446 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=439 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=440 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=594 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50009 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=456, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53200 +; + +INSERT INTO AD_Menu ("action",AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES ('W',0,53201,0,53068,TO_TIMESTAMP('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','N','N','Web Service Security',TO_TIMESTAMP('2009-01-30 18:09:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53201 AND EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Menu_ID!=t.AD_Menu_ID) +; + +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID,0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 53201, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=53201) +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=218 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=153 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=263 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=166 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=203 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=236 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=183 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=160 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=278 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=345 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=519 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=518 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53201 +; + +-- Jan 30, 2009 6:13:02 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53164,53068,'N',TO_TIMESTAMP('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type','L','WS_WebServiceType',TO_TIMESTAMP('2009-01-30 18:12:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53164 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53258,TO_TIMESTAMP('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceType',1,'Y','N','Y','Y','WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 18:13:02','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53165,53068,'N',TO_TIMESTAMP('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Parameters','L','WS_WebService_Para',TO_TIMESTAMP('2009-01-30 18:13:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53165 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53259,TO_TIMESTAMP('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebService_Para',1,'Y','N','Y','Y','WS_WebService_Para','N',1000000,TO_TIMESTAMP('2009-01-30 18:13:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53166,53068,'N',TO_TIMESTAMP('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Input','L','WS_WebServiceFieldInput',TO_TIMESTAMP('2009-01-30 18:14:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53166 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53260,TO_TIMESTAMP('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldInput',1,'Y','N','Y','Y','WS_WebServiceFieldInput','N',1000000,TO_TIMESTAMP('2009-01-30 18:14:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53167,53068,'N',TO_TIMESTAMP('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Field Output','L','WS_WebServiceFieldOutput',TO_TIMESTAMP('2009-01-30 18:14:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53167 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53261,TO_TIMESTAMP('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceFieldOutput',1,'Y','N','Y','Y','WS_WebServiceFieldOutput','N',1000000,TO_TIMESTAMP('2009-01-30 18:14:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,CopyColumnsFromTable,Created,CreatedBy,EntityType,ImportTable,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,LoadSeq,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES ('6',0,0,53168,53068,'N',TO_TIMESTAMP('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100,'D','N','Y','Y','Y','N','N','N',0,'Web Service Type Access','L','WS_WebServiceTypeAccess',TO_TIMESTAMP('2009-01-30 18:15:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53168 AND EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Table_ID!=t.AD_Table_ID) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53262,TO_TIMESTAMP('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'Table WS_WebServiceTypeAccess',1,'Y','N','Y','Y','WS_WebServiceTypeAccess','N',1000000,TO_TIMESTAMP('2009-01-30 18:15:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Table SET IsChangeLog='N',Updated=TO_TIMESTAMP('2009-01-30 18:15:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=53168 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56719,102,0,19,53164,129,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:16:00','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56719 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56720,113,0,19,53164,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:16:01','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56720 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56721,245,0,16,53164,'Created',TO_TIMESTAMP('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:16:04','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56721 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56722,246,0,18,110,53164,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:16:08','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56722 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56723,275,0,10,53164,'Description',TO_TIMESTAMP('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record','D',255,'A description is limited to 255 characters.','Y','N','N','N','N','N','N','N','N','N','Y','Description',0,TO_TIMESTAMP('2009-01-30 18:16:09','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56723 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56724,326,0,14,53164,'Help',TO_TIMESTAMP('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint','D',2000,'The Help field contains a hint, comment or help about the use of this item.','Y','N','N','N','N','N','N','N','N','N','Y','Comment/Help',0,TO_TIMESTAMP('2009-01-30 18:16:10','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56724 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56725,348,0,20,53164,'IsActive',TO_TIMESTAMP('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:16:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56725 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53768,0,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Type','Web Service Type',TO_TIMESTAMP('2009-01-30 18:16:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53768 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56726,53768,0,13,53164,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','Y','Y','N','N','N','N','N','Web Service Type',0,TO_TIMESTAMP('2009-01-30 18:16:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56726 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56727,469,0,10,53164,'Name',TO_TIMESTAMP('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','N','N','Y','N','Y','N','N','N','N','Y','Name',1,TO_TIMESTAMP('2009-01-30 18:16:18','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56727 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56728,607,0,16,53164,'Updated',TO_TIMESTAMP('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:16:24','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56728 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56729,608,0,18,110,53164,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56729 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56730,620,0,10,53164,'Value',TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique','D',40,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','N','N','N','N','Y','N','N','N','N','Y','Search Key',0,TO_TIMESTAMP('2009-01-30 18:16:25','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56730 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56731,53766,0,19,53164,'WS_WebService_ID',TO_TIMESTAMP('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service',0,TO_TIMESTAMP('2009-01-30 18:19:27','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56731 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52044,'WS_WebService_ID=@WS_WebService_ID@',TO_TIMESTAMP('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Methods from Web Service','S',TO_TIMESTAMP('2009-01-30 18:20:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56732,53767,0,19,53164,52044,'WS_WebServiceMethod_ID',TO_TIMESTAMP('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Web Service Method',0,TO_TIMESTAMP('2009-01-30 18:20:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56732 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56733,126,0,19,53164,'AD_Table_ID',TO_TIMESTAMP('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_TIMESTAMP('2009-01-30 18:21:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56733 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-01-30 18:21:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56732 +; + +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2009-01-30 18:21:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56731 +; + +CREATE TABLE WS_WebServiceType (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Table_ID NUMERIC(10), Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Description VARCHAR(255), Help VARCHAR(2000), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, Value VARCHAR(40) NOT NULL, WS_WebService_ID NUMERIC(10) NOT NULL, WS_WebServiceMethod_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceType_Key PRIMARY KEY (WS_WebServiceType_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56734,102,0,19,53165,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:26:46','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56734 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56735,113,0,19,53165,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56735 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56736,128,0,13,53165,'AD_Task_ID',TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_TIMESTAMP('2009-01-30 18:26:47','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56736 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53769,0,'WS_WebService_Para_ID',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Parameters','Web Service Parameters',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53769 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56737,53769,0,13,53165,'WS_WebService_Para_ID',TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Parameters',1,TO_TIMESTAMP('2009-01-30 18:26:48','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56737 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56738,245,0,16,53165,'Created',TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56738 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56739,246,0,18,110,53165,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:26:52','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56739 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56740,348,0,20,53165,'IsActive',TO_TIMESTAMP('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:26:53','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56740 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56741,607,0,16,53165,'Updated',TO_TIMESTAMP('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:26:54','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56741 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56742,608,0,18,110,53165,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:26:55','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56742 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET IsIdentifier='N', IsUpdateable='N', SeqNo=0,Updated=TO_TIMESTAMP('2009-01-30 18:27:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56737 +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:28:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56736 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56736 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56736 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,ColumnSQL,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56743,1196,0,10,53165,'ParameterName','A',TO_TIMESTAMP('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,'D',60,'Y','N','N','N','N','N','N','N','N','N','N','Parameter Name',0,TO_TIMESTAMP('2009-01-30 18:30:23','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56743 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53770,0,'ParameterType',TO_TIMESTAMP('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Parameter Type','Parameter Type',TO_TIMESTAMP('2009-01-30 18:30:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53770 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,Help,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53288,TO_TIMESTAMP('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D',NULL,'Y','N','WS Parameter Type',TO_TIMESTAMP('2009-01-30 18:31:41','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53288 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53451,TO_TIMESTAMP('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Constant',TO_TIMESTAMP('2009-01-30 18:31:57','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53451 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53288,53452,TO_TIMESTAMP('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Free',TO_TIMESTAMP('2009-01-30 18:32:09','YYYY-MM-DD HH24:MI:SS'),100,'F') +; + +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53452 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56744,53770,0,17,53288,53165,'ParameterType',TO_TIMESTAMP('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','N','N','N','N','Y','N','N','N','N','Y','Parameter Type',0,TO_TIMESTAMP('2009-01-30 18:32:41','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56744 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56745,1322,0,10,53165,'ConstantValue',TO_TIMESTAMP('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,'Constant value','D',60,'Y','N','N','N','N','N','N','N','N','N','Y','Constant Value',0,TO_TIMESTAMP('2009-01-30 18:33:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56745 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56734 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:35:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56735 +; + +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_TIMESTAMP('2009-01-30 18:35:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56746,102,0,19,53166,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56746 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56747,113,0,19,53166,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:36:26','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56747 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56748,128,0,13,53166,'AD_Task_ID',TO_TIMESTAMP('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,'Operation System Task','D',22,'The Task field identifies a Operation System Task in the system.','Y','N','N','N','N','Y','N','N','N','N','Y','OS Task',0,TO_TIMESTAMP('2009-01-30 18:36:27','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56748 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53771,0,'WS_WebServiceFieldInput_ID',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Input','Web Service Field Input',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53771 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56749,53771,0,13,53166,'WS_WebServiceFieldInput_ID',TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Input',1,TO_TIMESTAMP('2009-01-30 18:36:28','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56749 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56750,245,0,16,53166,'Created',TO_TIMESTAMP('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:36:30','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56750 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56751,246,0,18,110,53166,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56751 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56752,348,0,20,53166,'IsActive',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56752 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56753,607,0,16,53166,'Updated',TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:36:31','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56753 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56754,608,0,18,110,53166,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:36:32','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56754 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, AD_Reference_ID=19, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:37:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56748 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56748 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56748 AND IsCentrallyMaintained='Y' +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56755,104,0,19,53166,100,'AD_Column_ID',TO_TIMESTAMP('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_TIMESTAMP('2009-01-30 18:38:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56755 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET DefaultValue='@#AD_Client_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:39:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56746 +; + +UPDATE AD_Column SET DefaultValue='@#AD_Org_ID@',Updated=TO_TIMESTAMP('2009-01-30 18:39:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56747 +; + +CREATE TABLE WS_WebServiceFieldInput (AD_Client_ID NUMERIC(10) NOT NULL, AD_Column_ID NUMERIC(10), AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebServiceFieldInput_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceFieldInput_Key PRIMARY KEY (WS_WebServiceFieldInput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56756,102,0,19,53167,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56756 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56757,104,0,19,53167,100,'AD_Column_ID',TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table','D',22,'Link to the database column of the table','Y','N','N','N','N','N','N','N','N','N','Y','Column',0,TO_TIMESTAMP('2009-01-30 18:39:37','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56757 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56758,113,0,19,53167,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'@#AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56758 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56759,245,0,16,53167,'Created',TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:39:38','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56759 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56760,246,0,18,110,53167,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','N','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56760 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56761,348,0,20,53167,'IsActive',TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:39:39','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56761 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56762,607,0,16,53167,'Updated',TO_TIMESTAMP('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:39:40','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56762 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56763,608,0,18,110,53167,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','N','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:39:41','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56763 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53772,0,'WS_WebServiceFieldOutput_ID',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Web Service Field Output','Web Service Field Output',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53772 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56764,53772,0,13,53167,'WS_WebServiceFieldOutput_ID',TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','Y','Y','Y','N','N','N','N','N','Web Service Field Output',1,TO_TIMESTAMP('2009-01-30 18:39:42','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56764 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56765,53768,0,19,53167,'WS_WebServiceType_ID',TO_TIMESTAMP('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','Y','N','N','N','N','Y','Web Service Type',0,TO_TIMESTAMP('2009-01-30 18:39:44','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56765 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +CREATE TABLE WS_WebServiceFieldOutput (AD_Client_ID NUMERIC(10) NOT NULL, AD_Column_ID NUMERIC(10), AD_Org_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebServiceFieldOutput_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceFieldOutput_Key PRIMARY KEY (WS_WebServiceFieldOutput_ID)) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56766,102,0,19,53168,'AD_Client_ID',TO_TIMESTAMP('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Client_ID@','Client/Tenant for this installation.','D',22,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','N','N','N','Client',0,TO_TIMESTAMP('2009-01-30 18:41:12','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56766 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56767,113,0,19,53168,104,'AD_Org_ID',TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Org_ID@','Organizational entity within client','D',22,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','N','N','N','Organization',0,TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56767 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56768,123,0,19,53168,'AD_Role_ID',TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role','D',22,'The Role determines security and access a user who has this Role will have in the System.','Y','N','N','N','N','Y','Y','N','N','N','N','Role',0,TO_TIMESTAMP('2009-01-30 18:41:13','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56768 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56769,143,0,19,53168,'AD_Window_ID',TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Data entry or display window','D',22,'The Window field identifies a unique Window in the system.','Y','N','N','N','N','Y','Y','N','N','N','N','Window',0,TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56769 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56770,245,0,16,53168,'Created',TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was created','D',7,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','N','N','N','Created',0,TO_TIMESTAMP('2009-01-30 18:41:14','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56770 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56771,246,0,18,110,53168,'CreatedBy',TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'User who created this records','D',22,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','N','N','N','Created By',0,TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56771 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56772,348,0,20,53168,'IsActive',TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,'Y','The record is active in the system','D',1,'There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','N','N','Y','Active',0,TO_TIMESTAMP('2009-01-30 18:41:15','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56772 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56773,406,0,20,53168,'IsReadWrite',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write','D',1,'The Read Write indicates that this field may be read and updated.','Y','N','N','N','N','Y','N','N','N','N','Y','Read Write',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56773 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56774,607,0,16,53168,'Updated',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'Date this record was updated','D',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','N','N','N','Updated',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56774 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56775,608,0,18,110,53168,'UpdatedBy',TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,'User who updated this records','D',22,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','N','N','N','Updated By',0,TO_TIMESTAMP('2009-01-30 18:41:16','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56775 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +UPDATE AD_Column SET AD_Element_ID=53768, ColumnName='WS_WebServiceType_ID', Description=NULL, Help=NULL, IsUpdateable='N', Name='Web Service Type',Updated=TO_TIMESTAMP('2009-01-30 18:41:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56769 +; + +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=56769 +; + +UPDATE AD_Field SET Name='Web Service Type', Description=NULL, Help=NULL WHERE AD_Column_ID=56769 AND IsCentrallyMaintained='Y' +; + +UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2009-01-30 18:41:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56773 +; + +CREATE TABLE WS_WebServiceTypeAccess (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Role_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsReadWrite CHAR(1) DEFAULT 'Y' CHECK (IsReadWrite IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebServiceTypeAccess_Key PRIMARY KEY (AD_Role_ID, WS_WebServiceType_ID)) +; + +UPDATE AD_Column SET ColumnSQL=NULL,Updated=TO_TIMESTAMP('2009-01-30 18:45:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56743 +; + +CREATE TABLE WS_WebService_Para (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, ConstantValue VARCHAR(60), Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10), IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, ParameterName VARCHAR(60), ParameterType CHAR(1) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10), WS_WebService_Para_ID NUMERIC(10) NOT NULL, WS_WebServiceType_ID NUMERIC(10) NOT NULL, CONSTRAINT WS_WebService_Para_Key PRIMARY KEY (WS_WebService_Para_ID)) +; + +ALTER TABLE WS_WebServiceFieldInput ADD CONSTRAINT ADColumn_WSWebServiceFieldInpu FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column; + +ALTER TABLE WS_WebServiceFieldInput ADD CONSTRAINT WSWebServiceType_WSWebServicFI FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceFieldOutput ADD CONSTRAINT ADColumn_WSWebServiceFieldOutp FOREIGN KEY (AD_Column_ID) REFERENCES AD_Column; + +ALTER TABLE WS_WebServiceFieldOutput ADD CONSTRAINT WSWebServiceType_WSWebServicFO FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceMethod ADD CONSTRAINT WSWebService_WSWebServiceMetho FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService; + +ALTER TABLE WS_WebService_Para ADD CONSTRAINT WSWebServiceType_WSWebServiceP FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT ADTable_WSWebServiceType FOREIGN KEY (AD_Table_ID) REFERENCES AD_Table; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT WSWebService_WSWebServiceType FOREIGN KEY (WS_WebService_ID) REFERENCES WS_WebService; + +ALTER TABLE WS_WebServiceType ADD CONSTRAINT WSWebServiceMethod_WSWebServic FOREIGN KEY (WS_WebServiceMethod_ID) REFERENCES WS_WebServiceMethod; + +ALTER TABLE WS_WebServiceTypeAccess ADD CONSTRAINT ADRole_WSWebServiceTypeAccess FOREIGN KEY (AD_Role_ID) REFERENCES AD_Role; + +ALTER TABLE WS_WebServiceTypeAccess ADD CONSTRAINT WSWebServiceType_WSWebServiceT FOREIGN KEY (WS_WebServiceType_ID) REFERENCES WS_WebServiceType; + +-- Jan 30, 2009 6:55:49 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53187,53164,53068,TO_TIMESTAMP('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','Y','N','N','Web Service Type','N',10,0,TO_TIMESTAMP('2009-01-30 18:55:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53187 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56725,56645,0,53187,TO_TIMESTAMP('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:55:57','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56645 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56719,56646,0,53187,TO_TIMESTAMP('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:55:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56646 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56724,56647,0,53187,TO_TIMESTAMP('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100,'Comment or Hint',2000,'D','The Help field contains a hint, comment or help about the use of this item.','Y','Y','Y','N','N','N','N','N','Comment/Help',TO_TIMESTAMP('2009-01-30 18:55:59','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56647 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56723,56648,0,53187,TO_TIMESTAMP('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100,'Optional short description of the record',255,'D','A description is limited to 255 characters.','Y','Y','Y','N','N','N','N','N','Description',TO_TIMESTAMP('2009-01-30 18:56:00','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56648 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56727,56649,0,53187,TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56649 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56720,56650,0,53187,TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:56:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56650 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56730,56651,0,53187,TO_TIMESTAMP('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100,'Search key for the record in the format required - must be unique',40,'D','A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','Y','Y','Y','N','N','N','N','N','Search Key',TO_TIMESTAMP('2009-01-30 18:56:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56651 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56733,56652,0,53187,TO_TIMESTAMP('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',TO_TIMESTAMP('2009-01-30 18:56:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56652 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56731,56653,0,53187,TO_TIMESTAMP('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service',TO_TIMESTAMP('2009-01-30 18:56:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56653 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56732,56654,0,53187,TO_TIMESTAMP('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100,10,'D','Y','Y','Y','N','N','N','N','N','Web Service Method',TO_TIMESTAMP('2009-01-30 18:56:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56654 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56726,56655,0,53187,TO_TIMESTAMP('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 18:56:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56655 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56646 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56650 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56651 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56649 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56653 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56654 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56652 +; + +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56648 +; + +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=56647 +; + +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=56645 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:57:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56650 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56736,0,53188,53165,53068,TO_TIMESTAMP('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Parameters','N',20,1,TO_TIMESTAMP('2009-01-30 18:58:06','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53188 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56740,56656,0,53188,TO_TIMESTAMP('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 18:58:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56656 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56734,56657,0,53188,TO_TIMESTAMP('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 18:58:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56657 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56745,56658,0,53188,TO_TIMESTAMP('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100,'Constant value',60,'D','Y','Y','Y','N','N','N','N','N','Constant Value',TO_TIMESTAMP('2009-01-30 18:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56658 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56735,56659,0,53188,TO_TIMESTAMP('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 18:58:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56659 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56743,56660,0,53188,TO_TIMESTAMP('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100,60,'D','Y','Y','Y','N','N','N','N','N','Parameter Name',TO_TIMESTAMP('2009-01-30 18:58:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56660 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56744,56661,0,53188,TO_TIMESTAMP('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Parameter Type',TO_TIMESTAMP('2009-01-30 18:58:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56661 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56737,56662,0,53188,TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Parameters',TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56662 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56736,56663,0,53188,TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 18:58:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56663 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56657 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56663 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56660 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56661 +; + +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=56656 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56659 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 18:59:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Field SET DisplayLogic='@ParameterType@=''C''',Updated=TO_TIMESTAMP('2009-01-30 18:59:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +UPDATE AD_Column SET ReadOnlyLogic='@ParameterType@!C',Updated=TO_TIMESTAMP('2009-01-30 18:59:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56748,0,53189,53166,53068,TO_TIMESTAMP('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Input','N',30,1,TO_TIMESTAMP('2009-01-30 19:00:34','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53189 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56752,56664,0,53189,TO_TIMESTAMP('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:01:58','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56664 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56746,56665,0,53189,TO_TIMESTAMP('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:02:07','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56665 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56755,56666,0,53189,TO_TIMESTAMP('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_TIMESTAMP('2009-01-30 19:02:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56666 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56747,56667,0,53189,TO_TIMESTAMP('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:02:30','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56667 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56749,56668,0,53189,TO_TIMESTAMP('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Input',TO_TIMESTAMP('2009-01-30 19:02:31','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56668 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56748,56669,0,53189,TO_TIMESTAMP('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:02:44','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56669 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56665 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56669 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56666 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56664 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:03:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56667 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:03:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56669 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,DisplayLogic,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53190,53167,53068,TO_TIMESTAMP('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100,'@AD_Table_ID@>0','D','N','N','Y','N','N','Y','N','N','N','N','Web Service Field Output','N',40,1,TO_TIMESTAMP('2009-01-30 19:03:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53190 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56761,56670,0,53190,TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56670 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56756,56671,0,53190,TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:03:40','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56671 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56757,56672,0,53190,TO_TIMESTAMP('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100,'Column in the table',22,'D','Link to the database column of the table','Y','Y','Y','N','N','N','N','N','Column',TO_TIMESTAMP('2009-01-30 19:03:41','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56672 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56758,56673,0,53190,TO_TIMESTAMP('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:03:42','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56673 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56764,56674,0,53190,TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','N','N','N','N','N','N','Web Service Field Output',TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56674 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56765,56675,0,53190,TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:03:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56675 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56671 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56675 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56672 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56670 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:03:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56673 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:04:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56675 +; + +INSERT INTO AD_Tab (AD_Client_ID,AD_Column_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,EntityType,HasTree,ImportFields,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,56769,0,53191,53168,53068,TO_TIMESTAMP('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100,'D','N','N','Y','N','N','Y','N','N','N','N','Web Service Access','N',50,1,TO_TIMESTAMP('2009-01-30 19:04:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53191 AND EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Tab_ID!=t.AD_Tab_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56772,56676,0,53191,TO_TIMESTAMP('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','N','N','Active',TO_TIMESTAMP('2009-01-30 19:04:50','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56676 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56766,56677,0,53191,TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56677 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56767,56678,0,53191,TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','N','N','Organization',TO_TIMESTAMP('2009-01-30 19:04:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56678 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56773,56679,0,53191,TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Field is read / write',1,'D','The Read Write indicates that this field may be read and updated.','Y','Y','Y','N','N','N','N','N','Read Write',TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56679 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56768,56680,0,53191,TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100,'Responsibility Role',22,'D','The Role determines security and access a user who has this Role will have in the System.','Y','Y','Y','N','N','N','N','N','Role',TO_TIMESTAMP('2009-01-30 19:04:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56680 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,56769,56681,0,53191,TO_TIMESTAMP('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Web Service Type',TO_TIMESTAMP('2009-01-30 19:04:53','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56681 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=56679 +; + +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=56677 +; + +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=56681 +; + +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=56680 +; + +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=56676 +; + +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-01-30 19:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56678 +; + +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2009-01-30 19:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56681 +; + +-- Jan 30, 2009 7:07:51 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53264,TO_TIMESTAMP('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53265,TO_TIMESTAMP('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53266,TO_TIMESTAMP('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53268,TO_TIMESTAMP('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebService',1,'Y','N','Y','N','DocumentNo_WS_WebService','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53269,TO_TIMESTAMP('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceMethod',1,'Y','N','Y','N','DocumentNo_WS_WebServiceMethod','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (11,0,53270,TO_TIMESTAMP('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100,1000000,50000,'DocumentNo/Value for Table WS_WebServiceType',1,'Y','N','Y','N','DocumentNo_WS_WebServiceType','N',1000000,TO_TIMESTAMP('2009-01-30 19:08:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2009-01-30 20:03:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56658 +; + +-- Feb 1, 2009 7:49:10 PM COT +-- Web Service Definition and Security +UPDATE AD_Tab SET AD_Column_ID=56765,Updated=TO_TIMESTAMP('2009-02-01 19:49:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53190 +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql b/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql new file mode 100644 index 0000000000..87a7999bd0 --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS002_WebServicesDefinition.sql @@ -0,0 +1,143 @@ +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020) +; + +UPDATE WS_WebService SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt +WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow. +To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028) +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032) +; + +UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032 +; + +INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039) +; + +INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040) +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql b/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql new file mode 100644 index 0000000000..2e2fc87229 --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS003_WebServicesConfigGardenWorldSample.sql @@ -0,0 +1,83 @@ +-- Jan 30, 2009 7:44:20 PM COT +-- Web Service Definition and Security +INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv') +; + +INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000) +; + +INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001) +; + +INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001) +; + +INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001) +; + diff --git a/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql b/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql new file mode 100644 index 0000000000..623775be2e --- /dev/null +++ b/org.idempiere.webservices/migration/postgresql/WS004_WebServicesFixDict.sql @@ -0,0 +1 @@ +update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714; diff --git a/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java b/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java new file mode 100644 index 0000000000..8e7700f296 --- /dev/null +++ b/org.idempiere.webservices/src/org/idempiere/webservices/Activator.java @@ -0,0 +1,30 @@ +package org.idempiere.webservices; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + +} diff --git a/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml b/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml new file mode 100644 index 0000000000..6d1ccd7ea1 --- /dev/null +++ b/org.idempiere.webservices/testScripts/AdempiereWebServices-soapui-project.xml @@ -0,0 +1,849 @@ + +/home/carlos/srcAdempiere/branches/3E_WebServices/testScriptshttps://localhost:8443/ADInterface/services/ModelADService?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/ModelADServiceUTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + CreateBPartner + C_BPartner + 0 + Create + + + GlobalQSS + + + Quality Systems & Solutions + + + 830.085.359-4 + + + Y + + + N + + + N + + + QSS Ltda. - http://www.globalqss.com + + + 104 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + DeleteBPartner + C_BPartner + 114 + Delete + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + GetListSalesRegions + 144 + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + QueryBPartner + C_BPartner + name<'S' + Read + + + 103 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ReadBPartner + C_BPartner + 114 + Read + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ProcessInvoice + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + + + RunStorageDetail + + + 103 + + + 133 + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + ActionCompleteOrder + C_Order + 102 + CO + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]>UTF-8https://localhost:8443/ADInterface/services/ModelADService + + + + + + UpdateBPartner + C_BPartner + 114 + Update + + + http://www.treefarm.com + + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + 9 + + + + +]]> \ No newline at end of file diff --git a/org.idempiere.webservices/testScripts/MsgModelRunProcess b/org.idempiere.webservices/testScripts/MsgModelRunProcess new file mode 100644 index 0000000000..b3b2448ae6 --- /dev/null +++ b/org.idempiere.webservices/testScripts/MsgModelRunProcess @@ -0,0 +1,23 @@ + + + + + + + ProcessInvoice + + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + + + + + + diff --git a/org.idempiere.webservices/testScripts/MsgModelSetDocAction b/org.idempiere.webservices/testScripts/MsgModelSetDocAction new file mode 100644 index 0000000000..181c5c1fd5 --- /dev/null +++ b/org.idempiere.webservices/testScripts/MsgModelSetDocAction @@ -0,0 +1,25 @@ + + + + + + + ActionCompleteOrder + C_Order + 102 + CO + + + WebService + WebService + en_US + 11 + 50004 + 11 + 103 + + + + + + diff --git a/org.idempiere.webservices/testScripts/TestModelMsg.sh b/org.idempiere.webservices/testScripts/TestModelMsg.sh new file mode 100644 index 0000000000..bad61bf6e7 --- /dev/null +++ b/org.idempiere.webservices/testScripts/TestModelMsg.sh @@ -0,0 +1,18 @@ +: +if [ $# -ne 1 ] +then + echo "Usage: $0 Message_File + echo " i.e.: $0 MsgModelSetDocAction + exit 1 +fi +FILENAME=ModelADService.wsdl.$$ +wget \ + --no-check-certificate \ + --post-file=$1 \ + --save-headers \ + https://localhost:8443/ADInterface/services/ModelADService \ + -O $FILENAME +ls -l $FILENAME +cat $FILENAME +echo +rm -f $FILENAME