
--INSERT NEW RECORDS FOR PHYSICAL ITEM SCAN MANUALLY TRANSACTION on 03/08/12

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,31,0,0,0,'w_phy_item_mscan','Physical Item Scan Manually','Physical Item Scan Manually','WMS.1.31.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) 
values ('w_phy_item_mscan','2','2','A','seq10',null,null,null,null,null,'N','09-JUN-12','Mahesh','Mahesh','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,'PHYSCAN','WMS',null,null,null,null,null,null,null,null,'PSCAN','F',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'M',null,null,null,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_phy_item_mscan','Physical Item Scan',null,null,null,null,null,null,'1','F',null,null,'<SCAN_INFO><INPUT_SCAN ORDER="1"><SCAN_LABEL>Task Type:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>inv_stat</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_phy_item_mscan','Detail',null,null,null,null,null,null,'2','T',null,null,'<SCAN_INFO><MAPPING_SCAN ORDER="1"><SCAN_LABEL>Location Code:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>loc_code</FIELD></FIELDS></MAPPING_SCAN><MAPPING_SCAN ORDER="2"><SCAN_LABEL>LPN NO:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>lot_sl</FIELD></FIELDS></MAPPING_SCAN><INPUT_SCAN ORDER="1"><SCAN_LABEL>Scan Item Code-Lot No:</SCAN_LABEL><FIELDS SEPARATOR="D" DELIMITER="-"><FIELD ORDER="1">item_code</FIELD><FIELD ORDER="2">lot_no</FIELD></FIELDS></INPUT_SCAN><INPUT_SCAN ORDER="2"><SCAN_LABEL>Case Count:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>phy_input</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>',null,null,null,null,null,null,null,null,null,'checkedImage@img<descr>(<item_code>),<loc_code>,<lot_no>,<lot_sl>',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 ('phy_item_mscan',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 ('phy_item_mscan',2,null,'Prev','a','a','P','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 ('phy_item_mscan',3,null,'Next','a','a','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 ('phy_item_mscan',4,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 ('phy_item_mscan',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 ('phy_item_mscan',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 ('phy_item_mscan','default_data_wiz','1','phy_scan_default_data',null,'0','03-AUG-12','Mahesh','BASE','2','EJB','MPhyItemScanIC',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 ('phy_item_mscan','pre_validate','1','prv_phy_scan',null,'0','03-AUG-12','Mahesh','BASE','2','EJB','MPhyItemScanIC',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 ('phy_item_mscan','pre_navigate_next','1','prv_phy_scan',null,'0','03-AUG-12','Mahesh','BASE','2','EJB','MPhyItemScanIC',null);


update obj_forms 
set
scan_metadata='<SCAN_INFO><INPUT_SCAN ORDER="1"><SCAN_LABEL>Location Code:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>loc_code</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>'
where win_name = 'w_phy_item_mscan' and form_no='1';



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 ('phy_item_mscan','post_save','1','pos_phy_scan',null,'0','08-MAY-12','Mahesh','BASE','2','EJB','MPhyItemScanPos',null);

Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,RETURN_XFRM_XSL,CHG_DATE,CHG_USER,CHG_TERM) 
values ('pos_phy_scan','Validation','http://localhost:9090/axis/services/ValidatorService','BASE','postSave','String','S',null,null, EMPTY_BLOB(),'08-MAY-12','Mahesh','BASE');

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',1,'COMPONENT_TYPE','I',null,'S',null,'08-MAY-12','Mahesh','Mahesh','EJB');

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',2,'COMPONENT_NAME','I',null,'S',null,'08-MAY-12','Mahesh','Mahesh','MPhyItemScanPos');

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',3,'XML_DATA_ALL','I',null,'S',null,'08-MAY-12','Mahesh','Mahesh',null);

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',4,'<tran_id>','I',null,'B.String',null,'08-MAY-12','Mahesh','Mahesh',null);

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',5,'EDIT_FLAG','I',null,'S',null,'08-MAY-12','Mahesh','Mahesh',null);

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',6,'XTRA_PARAMS','I',null,'S',null,'08-MAY-12','Mahesh','Mahesh',null);

Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) 
values ('pos_phy_scan',7,'DB_CONN','I',null,'S.Connection',null,'08-MAY-12','Mahesh','Mahesh',null);

--update obj_forms set scan_metadata = '<SCAN_INFO><MAPPING_SCAN ORDER="1"><SCAN_LABEL>Item Code:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>item_code</FIELD></FIELDS></MAPPING_SCAN><MAPPING_SCAN ORDER="2"><SCAN_LABEL>Lot No:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>lot_no</FIELD></FIELDS></MAPPING_SCAN><MAPPING_SCAN ORDER="3"><SCAN_LABEL>LPN NO:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>lot_sl</FIELD></FIELDS></MAPPING_SCAN><INPUT_SCAN ORDER="1"><SCAN_LABEL>Physical Input:</SCAN_LABEL><FIELDS SEPARATOR="" DELIMITER=""><FIELD>phy_input</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>' where win_name = 'w_phy_item_mscan' and form_no = 2;


update obj_forms set   SCAN_METADATA = '<SCAN_INFO><MAPPING_SCAN
ORDER="1"><SCAN_LABEL>LPN NO:</SCAN_LABEL><FIELDS SEPARATOR=""
DELIMITER=""><FIELD>lot_sl</FIELD></FIELDS></MAPPING_SCAN>
<MAPPING_SCAN
ORDER="2"><SCAN_LABEL>Scan Item Code-Lot No</SCAN_LABEL>
<FIELDS SEPARATOR="D" DELIMITER="-">
<FIELD ORDER="1">item_code</FIELD>
<FIELD ORDER="2">lot_no</FIELD></FIELDS></MAPPING_SCAN>
<INPUT_SCAN
ORDER="1"><SCAN_LABEL>Physical Input:</SCAN_LABEL><FIELDS SEPARATOR=""
DELIMITER=""><FIELD>phy_input</FIELD></FIELDS></INPUT_SCAN></SCAN_INFO>' WHERE WIN_NAME ='w_phy_item_mscan' AND FORM_NO =2;

update transetup set save_flag = 'A' where tran_window = 'w_phy_item_mscan';