harpreet@9091
|
1 |
<?xml version="1.0"?>
|
harpreet@9091
|
2 |
<database name="FUNCTION OBCQL_LANGUAGE_CREATE">
|
harpreet@9091
|
3 |
<function name="OBCQL_LANGUAGE_CREATE" type="NULL">
|
harpreet@9091
|
4 |
<parameter name="ep_instance_id" type="VARCHAR" mode="in">
|
harpreet@9091
|
5 |
<default/>
|
harpreet@9091
|
6 |
</parameter>
|
harpreet@9091
|
7 |
<body><![CDATA[/*************************************************************************
|
harpreet@9091
|
8 |
* The contents of this file are subject to the Openbravo Public License
|
harpreet@9091
|
9 |
* Version 1.1 (the "License"), being the Mozilla Public License
|
harpreet@9091
|
10 |
* Version 1.1 with a permitted attribution clause; you may not use this
|
harpreet@9091
|
11 |
* file except in compliance with the License. You may obtain a copy of
|
harpreet@9091
|
12 |
* the License at http://www.openbravo.com/legal/license.html
|
harpreet@9091
|
13 |
* Software distributed under the License is distributed on an "AS IS"
|
harpreet@9091
|
14 |
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
harpreet@9091
|
15 |
* License for the specific language governing rights and limitations
|
harpreet@9091
|
16 |
* under the License.
|
harpreet@9091
|
17 |
* The Original Code is Openbravo ERP.
|
harpreet@9091
|
18 |
* The Initial Developer of the Original Code is Openbravo SLU
|
harpreet@9091
|
19 |
* All portions are Copyright (C) 2010 Openbravo SLU
|
harpreet@9091
|
20 |
* All Rights Reserved.
|
harpreet@9091
|
21 |
* Contributor(s): ______________________________________.
|
harpreet@9091
|
22 |
************************************************************************/
|
harpreet@9091
|
23 |
|
harpreet@9091
|
24 |
v_rowcount NUMBER;
|
harpreet@9091
|
25 |
|
harpreet@9091
|
26 |
BEGIN
|
harpreet@9091
|
27 |
|
harpreet@9091
|
28 |
INSERT INTO obcql_query_column_trl
|
harpreet@9091
|
29 |
(obcql_query_column_trl_id , obcql_query_column_id, ad_language,
|
harpreet@9091
|
30 |
ad_client_id , ad_org_id , isactive ,
|
harpreet@9091
|
31 |
created , createdby , updated ,
|
harpreet@9091
|
32 |
updatedby , name ,
|
harpreet@9091
|
33 |
istranslated)
|
harpreet@9091
|
34 |
SELECT get_uuid() , qc.obcql_query_column_id, l.ad_language,
|
harpreet@9091
|
35 |
qc.ad_client_id , qc.ad_org_id , qc.isactive,
|
harpreet@9091
|
36 |
now() , qc.createdby , now() ,
|
harpreet@9091
|
37 |
qc.updatedby , qc.name ,
|
harpreet@9091
|
38 |
'N'
|
harpreet@9091
|
39 |
FROM obcql_query_column qc, ad_language l, ad_module m, obcql_widget_query wq, obkmo_widget_class wc
|
harpreet@9091
|
40 |
WHERE l.isactive = 'Y'
|
harpreet@9091
|
41 |
AND l.issystemlanguage = 'Y'
|
harpreet@9091
|
42 |
AND wq.obcql_widget_query_id = qc.obcql_widget_query_id
|
harpreet@9091
|
43 |
AND wc.obkmo_widget_class_id = wq.obkmo_widget_class_id
|
harpreet@9091
|
44 |
AND m.ad_module_id = wc.ad_module_id
|
harpreet@9091
|
45 |
AND m.ad_language != l.ad_language
|
harpreet@9091
|
46 |
AND NOT EXISTS (SELECT 1
|
harpreet@9091
|
47 |
FROM obcql_query_column_trl t
|
harpreet@9091
|
48 |
WHERE t.obcql_query_column_id = qc.obcql_query_column_id
|
harpreet@9091
|
49 |
AND t.ad_language = l.ad_language);
|
harpreet@9091
|
50 |
|
harpreet@9091
|
51 |
v_rowcount:=SQL%ROWCOUNT;
|
harpreet@9091
|
52 |
DBMS_OUTPUT.PUT_LINE('- OBCQL_LANGUAGE_CREATE: OBCQL_Query_Column_Trl ' || v_rowcount) ;
|
harpreet@9091
|
53 |
END OBCQL_LANGUAGE_CREATE
|
harpreet@9091
|
54 |
]]></body>
|
harpreet@9091
|
55 |
</function>
|
harpreet@9091
|
56 |
</database>
|