

CREATE TABLE INV_LOCK(
LOCK_CODE CHAR(10) NOT NULL,
DESCR VARCHAR2(60) NOT NULL,
CHG_DATE DATE ,
CHG_USER CHAR(10),
CHG_TERM CHAR(15) )tablespace itm_dis_d1;

ALTER TABLE INV_LOCK ADD CONSTRAINT PK_INV_LOCK PRIMARY KEY(LOCK_CODE) using index tablespace itm_dis_i1 ;

CREATE TABLE INV_LOCK_DET(
LOCK_CODE CHAR(10) NOT NULL,
LINE_NO NUMBER(3) NOT NULL,
TRAN_SER CHAR(6) NOT NULL,
ALLOW CHAR(1) NOT NULL) tablespace itm_dis_d1;

ALTER TABLE INV_LOCK_DET ADD CONSTRAINT PK_INV_LOCK_DET PRIMARY KEY(LOCK_CODE,LINE_NO) using index tablespace itm_dis_i1 ;

INSERT INTO itm2menu VALUES (
	'SFA',
	14,
	1,
	3,
	0,
	0,
	'w_inv_lock',
	'Inventory Lock',
	NULL,
	'SFA.14.1.3.0.0',
	'e12_logo.gif',
	NULL,
	NULL,
	'T',
	fn_sysdate(),
	'BASE',
	'Sumit');
INSERT INTO transetup (
	tran_window ,
	save_flag ,
	val_flag ,
	key_flag ,
	repeate_add ,
	chg_date ,
	chg_user ,
	chg_term ,
	edi_option ,
	confirm_mode ,
	mail_option ,
	garbage_opt ,
	table_name,
	application )
VALUES (
	'w_inv_lock',
	'2',
	'2',
	'M',
	'N',
	fn_sysdate(),
	'Sumit ',
	'BASE ',
	'0',
	'0',
	'0',
	'N',
	'inv_lock',
	'WMS');
INSERT INTO obj_forms (
	win_name ,
	title ,
	obj_brow_name ,
	obj_edit_name ,
	form_no)
VALUES (
	'w_inv_lock',
	'Inventory Lock',
	'd_inv_lock_brow',
	'd_inv_lock_edit',
	'1');
INSERT INTO obj_forms (
	win_name ,
	title ,
	obj_brow_name ,
	obj_edit_name ,
	form_no)
VALUES (
	'w_inv_lock',
	'Inventory Lock',
	'd_inv_lock_det_brow',
	'd_inv_lock_det_edit',
	'2');

INSERT INTO obj_actions (
	obj_name ,
	line_no ,
	rights_char ,
	interactive ,
	service_code ,
	description ,
	title ,
	image ,
	action_type ,
	form_no ,
	chg_date ,
	chg_term ,
	chg_user)
VALUES (
	'inv_lock',
	 1,
	'A',
	'a',
	'a',
	'Adding New',
	'Add',
	'add~normal.gif',
	'S',
	'1',
	fn_sysdate(),
	'BASE ',
	'Sumit');

INSERT INTO obj_actions (
	obj_name ,
	line_no ,
	rights_char ,
	interactive ,
	service_code ,
	description ,
	title ,
	image ,
	action_type ,
	form_no ,
	chg_date ,
	chg_term ,
	chg_user)
VALUES (
	'inv_lock',
	2,
	'E',
	'a',
	'a',
	'Editing Existing Record',
	'Edit',
	'edit~normal.gif',
	'S',
	'1',
	fn_sysdate(),
	'BASE ',
	'Sumit');

INSERT INTO system_events (
	obj_name ,
	event_code ,
	event_context,
	service_code ,
	chg_date ,
	chg_user ,
	chg_term ,
	result_handle ,
	overwrite_core ,
	comp_type ,
	comp_name)
VALUES (
	'inv_lock',
	'pre_validate',
	'1',
	'prv_inv_lock',
	fn_sysdate(),
	'Sumit',
	'BASE',
	'2',
	'0',
	'EJB',
	'InvLockIC');

INSERT INTO system_events (
	obj_name ,
	event_code ,
	event_context,
	service_code ,
	chg_date ,
	chg_user ,
	chg_term ,
	result_handle ,
	overwrite_core ,
	comp_type ,
	comp_name )
VALUES (
	'inv_lock',
	'post_item_change',
	'1',
	'poic_inv_lock',
	 fn_sysdate(),
	'Sumit',
	'BASE',
	'2',
	'0',
	'EJB',
	'InvLockIC');

INSERT INTO system_event_services (
	service_code ,
	service_descr ,
	service_uri ,
	service_provider ,
	method_name ,
	return_value ,
	return_type ,	
	chg_date ,
	chg_user ,
	chg_term) 
VALUES (
	'prv_inv_lock',
	'Validation',
	'http://localhost:9090/axis/services/ValidatorService',
	'BASE',
	'wfValData',
	'String',
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_event_services (
	service_code ,
	service_descr ,
	service_uri ,
	service_provider ,
	method_name ,
	return_value ,
	return_type ,	
	chg_date ,
	chg_user ,
	chg_term) 
VALUES (
	'poic_inv_lock',
	'post item change',
	'http://localhost:9090/axis/services/ValidatorService',
	'BASE',
	'itemChanged',
	'String',
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term ,
	arg_value )
VALUES (
	'prv_inv_lock',
	 1,
	'COMPONENT_TYPE',
	'I',
	'S',
	fn_sysdate(),
	'sumit ',
	'BASE',
	'EJB');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term ,
	arg_value)
VALUES (
	'prv_inv_lock',
	2,
	'COMPONENT_NAME',
	'I',	
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE',
	'InvLockIC');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'prv_inv_lock',
	3,
	'XML_DATA',
	'l',
	'S',
	fn_sysdate(),
	'sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'prv_inv_lock',
	4,
	'XML_DATA_1',
	'l',
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
 VALUES (
	'prv_inv_lock',
	5,
	'XML_DATA_ALL',
	'l',	
	'S',	
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'prv_inv_lock',
	6,
	'OBJ_CONTEXT',
	'l',
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'prv_inv_lock',
	 7,
	'EDIT_FLAG',
	'l',	
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'prv_inv_lock',
	8,
	'XTRA_PARAMS',
	'l',	
	'S',	
	fn_sysdate(),
	'Sumit',
	'BASE');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term ,
	arg_value )
VALUES (
	'poic_inv_lock',
	 1,
	'COMPONENT_TYPE',
	'I',
	'S',
	fn_sysdate(),
	'Sumit ',
	'BASE',
	'EJB');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term ,
	arg_value )
VALUES (
	'poic_inv_lock',
	 2,
	'COMPONENT_NAME',
	'I',	
	'S',	
	fn_sysdate(),
	'Sumit ',
	'BASE',
	'InvLockIC');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	3,
	'XML_DATA',
	'I',
	'S',
	fn_sysdate(),
	'Sumit ',
	'BASE');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	4,
	'XML_DATA_1',
	'I',
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
				
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	5,
	'XML_DATA_ALL',
	'I',	
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	6,
	'OBJ_CONTEXT',
	'I',
	'S',	
	fn_sysdate(),
	'Sumit ',
	'BASE');

INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	 7,
	'FOCUSED_COLUMN',
	'I',	
	'S',
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES (
	'poic_inv_lock',
	8,
	'EDIT_FLAG',
	'I',
	'S',	
	fn_sysdate(),
	'Sumit',
	'BASE');
INSERT INTO system_service_args (
	service_code ,
	line_no ,
	arg_name ,
	arg_mode ,
	arg_type ,	
	chg_date ,
	chg_user,
	chg_term )
VALUES(
	'poic_inv_lock',
	9,
	'XTRA_PARAMS',
	'I',
	'S',	
	fn_sysdate(),
	'Sumit',
	'BASE');

INSERT INTO obj_itemchange (
	obj_name ,
	form_no ,
	field_name)
 VALUES(
	'inv_lock',
	'2',
	'itm_default');

INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'INVLOCKEXT',
	'Lock Code exist',
	'Entered lock code is already exist, pleae enter new lock code',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'NULLDESCR',
	'Null description',
	'Lock code description is blank, please enter description',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'NULLREFSER',
	'Null trans ser',
	'Transaction series can not be blank, please enter valid series code',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'NULLALLOW',
	'Allow code is blank',
	'Allow code can not be blank, please select allow code',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'INVLOCKCD',
	'Invalid Lock Code',
	'Lock code entered does not valid, please enter valid code',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'INVREFSER',
	'Transer not exist',
	'Transaction series entered does not exist, please enter valid code',
	'E',
	'Y',
	fn_sysdate(),
	'Sumit'  ,
	'BASE ');
INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'DUPREFSER',
	'Duplicate Entry',
	'You can not enter transaction series more than one for single lock code',
	'E',
	'Y',
	fn_sysdate(),
	'Gulzar'  ,
	'BASE141');
INSERT INTO pophelp (
	field_name ,
	mod_name ,
	sql_str ,	
	width ,
	height ,
	chg_date,
	chg_user ,
	chg_term ,
	dist_opt) 	
VALUES (
	'LOCK_CODE',
	'W_INV_HOLD',
	'SELECT LOCK_CODE, DESCR FROM INV_LOCK ',
	0,
	0,
	fn_sysdate(),
	'Rohan',
	'BASE',
	'1');


INSERT INTO MESSAGES (
	msg_no ,
	msg_str ,
	msg_descr ,
	msg_type ,
	msg_opt ,  
	chg_date ,
	chg_user ,
	chg_term )
VALUES (
	'VTREPLISS1',
	'Null Customer Code',
	'Please enter Customer code, it can not be blank.',
	'E',
	'Y',
	fn_sysdate(),
	'ROHAN'  ,
	'BASE '); 

