Commit 3c24ff3c authored by tmahadi's avatar tmahadi

sql ,xml and srd updated for ES3


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104573 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f9d46a47
......@@ -39,7 +39,7 @@
<color>536870912</color>
</Footer>
<Detail>
<height>569</height>
<height>616</height>
<color>536870912</color>
</Detail>
<TableDefinition>
......@@ -308,8 +308,14 @@
<name>descr</name>
<dbname>station.descr</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;cust_stock&quot; ) TABLE(NAME=&quot;customer&quot; ) TABLE(NAME=&quot;itemser&quot; ) TABLE(NAME=&quot;sordertype&quot; ) TABLE(NAME=&quot;site&quot; ) TABLE(NAME=&quot;station&quot; ) COLUMN(NAME=&quot;cust_stock.tran_id&quot;) COLUMN(NAME=&quot;cust_stock.tran_date&quot;) COLUMN(NAME=&quot;cust_stock.cust_code&quot;) COLUMN(NAME=&quot;cust_stock.site_code&quot;) COLUMN(NAME=&quot;cust_stock.from_date&quot;) COLUMN(NAME=&quot;cust_stock.to_date&quot;) COLUMN(NAME=&quot;customer.cust_name&quot;) COLUMN(NAME=&quot;cust_stock.item_ser&quot;) COLUMN(NAME=&quot;cust_stock.tran_id__last&quot;) COLUMN(NAME=&quot;cust_stock.order_type&quot;) COLUMN(NAME=&quot;cust_stock.stmt_date&quot;) COLUMN(NAME=&quot;itemser.descr&quot;) COLUMN(NAME=&quot;sordertype.descr&quot;) COLUMN(NAME=&quot;site.descr&quot;) COLUMN(NAME=&quot;cust_stock.chg_user&quot;) COLUMN(NAME=&quot;cust_stock.chg_term&quot;) COLUMN(NAME=&quot;cust_stock.chg_date&quot;) COLUMN(NAME=&quot;cust_stock.status&quot;) COLUMN(NAME=&quot;cust_stock.missing_inserted&quot;) COLUMN(NAME=&quot;customer.cust_type&quot;) COMPUTE(NAME=&quot;&apos;&apos; as cust_type__descr&quot;) COLUMN(NAME=&quot;cust_stock.confirmed&quot;) COLUMN(NAME=&quot;cust_stock.prd_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as pophelp_frmdt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as pophelp_todt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as sale_per&quot;) COMPUTE(NAME=&quot;&apos;&apos; as edit_status&quot;) COMPUTE(NAME=&quot;&apos;&apos; as country_code&quot;) COLUMN(NAME=&quot;cust_stock.emp_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as emp_name&quot;) COMPUTE(NAME=&quot;FN_GET_POSCODE_DESCR(cust_stock.pos_code) as position_descr&quot;) COLUMN(NAME=&quot;cust_stock.pos_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as entry_start_dt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as entry_end_dt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as login_poscode&quot;) COLUMN(NAME=&quot;cust_stock.add_user&quot;) COLUMN(NAME=&quot;cust_stock.add_date&quot;) COLUMN(NAME=&quot;cust_stock.add_term&quot;) COLUMN(NAME=&quot;station.descr&quot;) JOIN (LEFT=&quot;cust_stock.cust_code&quot; OP =&quot;=&quot;RIGHT=&quot;customer.cust_code&quot; ) JOIN (LEFT=&quot;cust_stock.item_ser&quot; OP =&quot;=&quot;RIGHT=&quot;itemser.item_ser&quot; ) JOIN (LEFT=&quot;cust_stock.order_type&quot; OP =&quot;=&quot;RIGHT=&quot;sordertype.order_type&quot; ) JOIN (LEFT=&quot;cust_stock.site_code&quot; OP =&quot;=&quot;RIGHT=&quot;site.site_code&quot; ) JOIN (LEFT=&quot;customer.state_code&quot; OP =&quot;=&quot;RIGHT=&quot;station.state_code&quot; )WHERE( EXP1 =&quot;CUST_STOCK.TRAN_ID&quot; OP =&quot;=&quot; EXP2 =&quot;:tran_id&quot; ) ) ARG(NAME = &quot;tran_id&quot; TYPE = string) </retrieve>
<update>CUST_STOCK</update>
<table_column>
<type size="0">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>adm_chk</name>
<dbname>adm_chk</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;cust_stock&quot; ) TABLE(NAME=&quot;customer&quot; ) TABLE(NAME=&quot;itemser&quot; ) TABLE(NAME=&quot;sordertype&quot; ) TABLE(NAME=&quot;site&quot; ) TABLE(NAME=&quot;station&quot; ) COLUMN(NAME=&quot;cust_stock.tran_id&quot;) COLUMN(NAME=&quot;cust_stock.tran_date&quot;) COLUMN(NAME=&quot;cust_stock.cust_code&quot;) COLUMN(NAME=&quot;cust_stock.site_code&quot;) COLUMN(NAME=&quot;cust_stock.from_date&quot;) COLUMN(NAME=&quot;cust_stock.to_date&quot;) COLUMN(NAME=&quot;customer.cust_name&quot;) COLUMN(NAME=&quot;cust_stock.item_ser&quot;) COLUMN(NAME=&quot;cust_stock.tran_id__last&quot;) COLUMN(NAME=&quot;cust_stock.order_type&quot;) COLUMN(NAME=&quot;cust_stock.stmt_date&quot;) COLUMN(NAME=&quot;itemser.descr&quot;) COLUMN(NAME=&quot;sordertype.descr&quot;) COLUMN(NAME=&quot;site.descr&quot;) COLUMN(NAME=&quot;cust_stock.chg_user&quot;) COLUMN(NAME=&quot;cust_stock.chg_term&quot;) COLUMN(NAME=&quot;cust_stock.chg_date&quot;) COLUMN(NAME=&quot;cust_stock.status&quot;) COLUMN(NAME=&quot;cust_stock.missing_inserted&quot;) COLUMN(NAME=&quot;customer.cust_type&quot;) COMPUTE(NAME=&quot;&apos;&apos; as cust_type__descr&quot;) COLUMN(NAME=&quot;cust_stock.confirmed&quot;) COLUMN(NAME=&quot;cust_stock.prd_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as pophelp_frmdt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as pophelp_todt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as sale_per&quot;) COMPUTE(NAME=&quot;&apos;&apos; as edit_status&quot;) COMPUTE(NAME=&quot;&apos;&apos; as country_code&quot;) COLUMN(NAME=&quot;cust_stock.emp_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as emp_name&quot;) COMPUTE(NAME=&quot;FN_GET_POSCODE_DESCR(cust_stock.pos_code) as position_descr&quot;) COLUMN(NAME=&quot;cust_stock.pos_code&quot;) COMPUTE(NAME=&quot;&apos;&apos; as entry_start_dt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as entry_end_dt&quot;) COMPUTE(NAME=&quot;&apos;&apos; as login_poscode&quot;) COLUMN(NAME=&quot;cust_stock.add_user&quot;) COLUMN(NAME=&quot;cust_stock.add_date&quot;) COLUMN(NAME=&quot;cust_stock.add_term&quot;) COLUMN(NAME=&quot;station.descr&quot;) COMPUTE(NAME=&quot;&apos;&apos; as adm_chk&quot;) JOIN (LEFT=&quot;cust_stock.cust_code&quot; OP =&quot;=&quot;RIGHT=&quot;customer.cust_code&quot; ) JOIN (LEFT=&quot;cust_stock.item_ser&quot; OP =&quot;=&quot;RIGHT=&quot;itemser.item_ser&quot; ) JOIN (LEFT=&quot;cust_stock.order_type&quot; OP =&quot;=&quot;RIGHT=&quot;sordertype.order_type&quot; ) JOIN (LEFT=&quot;cust_stock.site_code&quot; OP =&quot;=&quot;RIGHT=&quot;site.site_code&quot; ) JOIN (LEFT=&quot;customer.state_code&quot; OP =&quot;=&quot;RIGHT=&quot;station.state_code&quot; )WHERE( EXP1 =&quot;CUST_STOCK.TRAN_ID&quot; OP =&quot;=&quot; EXP2 =&quot;:tran_id&quot; ) ) ARG(NAME = &quot;tran_id&quot; TYPE = string) </retrieve>
<update>cust_stock</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<argument>
......@@ -1476,42 +1482,6 @@
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>35</id>
<alignment>0</alignment>
<tabsequence>40</tabsequence>
<border>0</border>
<color>255</color>
<x>329</x>
<y>549</y>
<height>15</height>
<width>48</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>login_poscode</name>
<visible>0</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>19</id>
......@@ -2381,11 +2351,90 @@
<y>353</y>
<height>16</height>
<width>240</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>descr</name>
<visible>0</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>35</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>255</color>
<x>329</x>
<y>549</y>
<height>15</height>
<width>48</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>login_poscode</name>
<visible>0</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>40</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>255</color>
<x>398</x>
<y>550</y>
<height>15</height>
<width>58</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>adm_chk</name>
<visible>0</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
......
--User Rights filter--
update user_rights set acc_filt='CUST_STOCK.POS_CODE IN (select CODE from TABLE(FN_ES3_POS_CODE2(''<entityCode>'',''P''))) or CUST_STOCK.ADD_USER IN(SELECT TRIM(CODE) FROM USERS WHERE EMP_CODE=''<entityCode>'')' where obj_name in ('secondory_sale_gwt','secondory_sale_gwt_wiz') and profile_id='SUN';
insert into disparm(prd_code,var_name,var_type,var_value,descr,var_subs,chg_date,chg_user,chg_term) values ('999999','ADM_DIVISION','S','CH','Excluded divisions',null,sysdate,'BASE','BASE');
commit;
delete from pophelp where mod_name='W_SECONDORY_SALE_GWT_WIZ' and field_name='POS_CODE';
commit;
insert into pophelp(field_name,mod_name,sql_str,dw_object,msg_title,width,height,chg_date,chg_user,chg_term,dist_opt,filter_string,sql_input,default_col,pop_align,query_mode,page_context,pophelp_cols,pophelp_source,multi_opt,help_option,popup_xsl_name,auto_fill_len,thumb_obj,thumb_image_col,thumb_alt_col) values ('POS_CODE','W_SECONDORY_SALE_GWT_WIZ','select pos_code,descr,emp_code,name,division,div_description from (select trim(a.pos_code) as pos_code , a.descr,trim(a.emp_code) as emp_code, c.emp_fname||'' ''||c.emp_mname||'' ''||c.emp_lname as name,a.table_no as division,itmser.sh_descr as div_description
from org_structure a ,employee c,itemser itmser,org_structure_cust d
where d.version_id=a.version_id and d.table_no=a.table_no and d.pos_code=a.pos_code and a.emp_code=c.emp_code(+) and itmser.item_ser=a.table_no and a.version_id in(select fn_get_version_id from dual)
and d.cust_code is not null and (case when d.source is null then ''Y'' else d.source end) <> ''A''
and a.pos_code in(
select c.pos_code from org_structure c start with c.pos_code=''?'' connect by prior c.pos_code=c.pos_code__repto and c.version_id =(select fn_get_version_id from dual) )
AND ''N''=''?''
group by a.pos_code,a.descr,a.emp_code,a.table_no,c.emp_fname,c.emp_mname,c.emp_lname,itmser.sh_descr
union all
SELECT trim(A.POS_CODE) as pos_code ,A.DESCR,trim(A.EMP_CODE) as emp_code,C.EMP_FNAME||'' ''||C.EMP_MNAME||'' ''||C.EMP_LNAME NAME,a.table_no as Division,itmser.sh_descr as div_description
from org_structure a ,employee c,itemser itmser,org_structure_cust d
where d.version_id=a.version_id and d.table_no=a.table_no and d.pos_code=a.pos_code and a.emp_code=c.emp_code(+) and itmser.item_ser=a.table_no
and a.version_id =(select fn_get_version_id from dual) and d.cust_code is not null and a.table_no<>''CH'' and (case when d.source is null then ''Y'' else d.source end) <> ''A''
and ''Y''=''?''
group by a.pos_code,a.descr,a.emp_code,a.table_no,c.emp_fname,c.emp_mname,c.emp_lname,itmser.sh_descr ) order by pos_code,descr asc ',null,'Position Code',0,0,null,null,null,'0',null,':login_poscode,:adm_chk,:adm_chk',0,null,null,null,null,null,0,null,null,null,null,null,null);
commit;
insert into messages (msg_no,msg_str,msg_descr,msg_type,msg_opt,msg_time,alarm,err_source,chg_date,chg_user,chg_term,override_input,mail_option)values ('VTINVPSCDE','Invalid Position Code!','Please enter valid Position Code!','E','Y',null,null,null,sysdate,'BASE','BASE',null,null);
commit;
\ No newline at end of file
delete from pophelp where field_name='CUST_CODE' and mod_name ='W_SECONDORY_SALE_GWT_WIZ';
commit;
Insert into pophelp (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL) values ('CUST_CODE','W_SECONDORY_SALE_GWT_WIZ','select distinct trim(cust.cust_code) as cust_code,
cust.cust_name,stn.descr as Station,org.table_no as Division,itmser.sh_descr as Div_description
from org_structure org,org_structure_cust orgcust,customer cust ,
station stn,customer_series custser,state state ,itemser itmser
where org.version_id=orgcust.version_id and
org.pos_code=orgcust.pos_code and
org.table_no=orgcust.table_no and
orgcust.cust_code=cust.cust_code
and itmser.item_ser=org.table_no
and cust.stan_code=stn.stan_code
and custser.cust_code=cust.cust_code
AND orgcust.pos_code =''?''
AND (case when orgcust.source is null then ''Y'' else orgcust.source end) <> ''A''
AND org.table_no =''?''
and org.version_id = (select FN_GET_VERSION_ID from dual)
and orgcust.cust_code not in(SELECT distinct(cust_code) FROM cust_stock WHERE
from_date >= ''?''
and to_date <= ''?'' and item_ser=''?'') AND (cust.SH_NAME LIKE upper(''?%'')
or cust.cust_code LIKE upper(''?%'') OR cust.cust_name LIKE upper(''?%''))
and state.count_code=''?'' and state.state_code=stn.state_code
and (''?'' BETWEEN orgcust.EFF_DATE and orgcust.VALID_UPTO )
and (''?'' BETWEEN orgcust.EFF_DATE and orgcust.VALID_UPTO )
and custser.item_ser in(select item_ser from itemser where grp_code=''?'' and item_ser<>case when grp_code is null then ''.'' else grp_code end
union all
select item_ser from itemser where item_ser=''?'' and item_ser<>case when grp_code is null then ''.'' else grp_code end)
order by stn.descr,cust.cust_name asc ',null,'Customer Code',0,0,null,null,null,'0',null,':pos_code,:item_ser,:pophelp_frmdt,:pophelp_todt,:item_ser,:cust_code,:cust_code,:cust_code,:country_code,:pophelp_frmdt,:pophelp_todt,:item_ser,:item_ser',0,null,null,null,null,null,0,null,null,null,null,null,null);
insert into messages (msg_no,msg_str,msg_descr,msg_type,msg_opt,msg_time,alarm,err_source,chg_date,chg_user,chg_term,override_input,mail_option)values ('VMINVORGCU','Invalid Customer!','Invalid Customer!','E','Y',null,null,null,sysdate,'BASE','BASE',null,null);
commit;
insert into messages (msg_no,msg_str,msg_descr,msg_type,msg_opt,msg_time,alarm,err_source,chg_date,chg_user,chg_term,override_input,mail_option)values ('VTCUST1','Invalid Customer!','Customer not exist in customer master!','E','Y',null,null,null,sysdate,'BASE','BASE',null,null);
commit;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment