
--INSERT NEW RECORDS FOR CASE TRANSFER TRANSACTION ON 23/08/12

create table PALLETMERGE
(TRAN_ID CHAR(10) NOT NULL,
TRAN_DATE DATE NOT NULL,
SITE_CODE CHAR(5) NOT NULL,
CHG_DATE DATE,
CHG_TERM CHAR(15),
CHG_USER CHAR(10) ,
PALLET_NO__FR CHAR(25),
PALLET_NO__TO CHAR(25), 
CONFIRMED CHAR(1),
CONF_DATE DATE,
CONSTRAINT PALLETMERGE_X PRIMARY KEY (TRAN_ID) );

create table PALLETMERGE_DET
(TRAN_ID CHAR(10) NOT NULL,
LINE_NO CHAR(3) NOT NULL,
CARTON_NO VARCHAR2(20),
PICK_ORDER CHAR(10) , 
LINE_NO__PICK NUMBER(3),
DESP_ID CHAR(10),
LINE_NO__DESP CHAR(3),
LINE_NO__DESP_NEW CHAR(3),
ITEM_CODE CHAR(10) NOT NULL,
LOT_NO CHAR(15) NOT NULL,
LOT_SL CHAR(15) NOT NULL,
CHG_DATE DATE,
CHG_TERM CHAR(15),
CHG_USER CHAR(10), 
CONSTRAINT PALLETMERGE_DET_X PRIMARY KEY
(TRAN_ID,LINE_NO) );

ALTER TABLE CARTON_MASTER ADD  PALLET_NO VARCHAR2(25);

Insert into ITM2MENU (APPLICATION,LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4,LEVEL_5,WIN_NAME,DESCR,COMMENTS,MENU_PATH,ICON_PATH,CLOSE_ICON,OPEN_ICON,OBJ_TYPE,CHG_DATE,CHG_TERM,CHG_USER,MOB_DEPLOY) 
values ('WMS',1,39,0,0,0,'w_case_transfer','Case Transfer','Case Transfer','WMS.1.39.0.0.0','e12_logo.gif',null,null,'W',null,'MAHESH','Mahesh',null);

Insert into TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,CUSTOM_PREVIEW_OBJ,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO) 
values ('w_case_transfer','A','2','A','seq10',null,null,null,null,null,'N','09-JUN-12','MAHESH','BASE','0','site_code','CONFIRMED','Y',null,null,null,null,null,null,'TRAN_ID','0','0','N',null,null,null,null,null,null,null,null,null,'PALLETMERGE','WMS',null,null,null,null,null,null,null,null,'PSCAN','F',null,null,null,null,null,null,null,null,null,null,'0',null,null,null,null,null,null,null,null,null,null,null,null,'M',null,null,null,null,null,null,'1');

Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW) 
values ('w_case_transfer','Header',null,null,null,null,null,null,'1','F',null,null,'<SCAN_INFO><INPUT_SCAN ORDER="1"><SCAN_LABEL>Pallet No From :</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>pallet_no__fr</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>',null,null,null,null,null,null,null,null,null,null,null,null,null,'E',null,null,null);

Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW) 
values ('w_case_transfer','Detail',null,null,null,null,null,null,'2','T',null,null,'<SCAN_INFO><MAPPING_SCAN ORDER="1"><SCAN_LABEL>Carton No:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>carton_no</FIELD></FIELDS></MAPPING_SCAN></SCAN_INFO>',null,null,null,null,null,null,null,null,null,'checkedImage@img<carton_no>(<item_code>,<lot_no>,<lot_sl>)',null,null,null,'E',null,null,null);

Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW) 
values ('w_case_transfer','Detail',null,null,null,null,null,null,'3','F',null,null,'<SCAN_INFO><INPUT_SCAN ORDER="1"><SCAN_LABEL>Pallet No To:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>pallet_no__to</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>',null,null,null,null,null,null,null,null,null,null,null,null,null,'E',null,null,null);

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',1,null,'Saving',null,null,'S','Finish','3',null,null,'U',null,'03-AUG-12','BASE','Mahesh');

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',2,null,'Prev','a','a','P','Prev','3',null,null,'U',null,'03-AUG-12','BASE','Mahesh');

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',3,null,'Next',null,null,'N','Next','2',null,null,'U',null,'03-AUG-12','BASE','Mahesh');

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',4,null,'Prev','a','a','P','Prev','2',null,null,'U',null,'03-AUG-12','BASE','Mahesh');

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',5,'confirm~normal.gif','Confirming records','pre_confirm','a','F','Confirm','3','2','1','S',null,'03-AUG-12','BASE','Mahesh');

Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) 
values ('case_transfer',6,null,'Next',null,null,'N','Next','1',null,null,'U',null,'03-AUG-12','BASE','Mahesh');

Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT) 
values ('case_transfer','default_data_wiz','1','phy_scan_default_data',null,'0','03-AUG-12','Mahesh','BASE','2','EJB','CaseTransferIC',null);

Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT) 
values ('case_transfer','pre_validate','1','prv_phy_scan',null,'0','03-AUG-12','Mahesh','BASE','2','EJB','CaseTransferIC',null);

Insert into system_events(OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT) 
values ('case_transfer','post_save','1','pos_phy_scan',null,'0','08-MAY-12','Mahesh','BASE','2','EJB','CaseTransferPos',null);

Insert into system_events(OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT) 
values ('case_transfer','pre_navigate_next','1','prv_phy_scan',null,'0','08-MAY-12','Mahesh','BASE','2','EJB','CaseTransferIC',null);

Insert into system_events(OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT) 
values ('case_transfer','pre_navigate_finish','1','prv_phy_scan',null,'0','08-MAY-12','Mahesh','BASE','2','EJB','CaseTransferIC',null);


UPDATE system_events set service_code = 'prv_nevigate_ejb' where obj_name = 'case_transfer' and event_code = 'pre_navigate_next'
UPDATE system_events set service_code = 'prv_nevigate_ejb' where obj_name = 'case_transfer' and event_code = 'pre_navigate_finish'