Commit b8572193 authored by jshinde's avatar jshinde

Request ID:W15HSUN003 ,pallet request with stock details .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99433 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 572bd779
......@@ -306,6 +306,71 @@ chg_date,chg_user,chg_term,dist_opt,sql_input,HELP_OPTION)
values ('LOC_CODE','W_PALLET_REQ_STK','SELECT LOC_CODE,DESCR FROM LOCATION WHERE INV_STAT NOT IN
(''AWMS'',''AWMSQ'') AND SITE_CODE=''?''','User-defined Type',0,0,
SYSDATE,'BASE','BASE','0',':site_code','0');
--------------------------------------------As per client requirment (Confirm)15/12/2015--------------------------------------------------
-------------------------------------------------FUNCTION----------------------------------------------------------------
CREATE OR REPLACE FUNCTION FN_CHK_PRS
(as_loccode in char)
return number is
ll_retval number(1) := 0;
begin
begin
select count(1) into ll_retval from swms_to_awms a
where A.IN_OUT= 'O' AND a.schedule_status = 'N'
and a.pallet_no = as_loccode;
exception when others then
ll_retval := 0;
end;
if ll_retval = 0 then
begin
select count(1) into ll_retval from pallet_req_hdr h, pallet_req_det d
where h.tran_id = d.tran_id
and h.confirmed = 'N'
and d.pallet_no = as_loccode;
exception when others then
ll_retval := 0;
end;
end if;
return (ll_retval);
end;
/
create synonym USER.fn_chk_prs for fn_chk_prs;
grant execute on FN_CHK_PRS to USER;
--------------------------------------------------MESSAGES----------------------------------------------------------------------
insert into messages (msg_no,msg_str,msg_descr,msg_type,msg_opt,chg_date,chg_user,chg_term)
values ('VMPALDEPEX','Invalid Pallet Details',
'Entered Pallet Details already added in previous transaction.','E','Y',sysdate,'base','base');
DELETE from pophelp where mod_name='W_PALLET_REQ_STK' and field_name='PALLET_NO';
commit;
INSERT INTO POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,
chg_term,dist_opt,sql_input,help_option)
values ('PALLET_NO','W_PALLET_REQ_STK','select distinct s.loc_code as pallet_no from stock s where
S.INV_STAT IN (''AWMS'') AND S.SITE_CODE=''?'' AND S.QUANTITY > 0 and FN_CHK_PRS(TRIM(S.LOC_CODE)) = 0
union all
select distinct substr(s.loc_code,1,instr(s.loc_code,''Q'')-1) from stock s where
s.inv_stat in (''AWMSQ'') and s.site_code=''?'' and s.quantity > 0
and FN_CHK_PRS(SUBSTR(S.LOC_CODE,1,INSTR(S.LOC_CODE,''Q'')-1)) = 0'
,'User-defined Type',0,0,sysdate,'BASE','BASE','0',':site_code,:site_code',
'0');
-------------------------------------------------------------------END----------------------------------------------------------------------------
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