/* SQL Updated by SAGAR on 21/MAR/14 for Freight List(DI3LSUN004)  */

INSERT INTO itm2menu (application,level_1,level_2,level_3,level_4,level_5,win_name,descr,comments,menu_path,icon_path,obj_type,chg_user,chg_term,chg_date,open_icon,mob_deploy,close_icon)
VALUES ('FRT',0,0,0,0,0,'-','Freight Calculation',NULL,'FRT.0.0.0.0.0',NULL,NULL,'BASE','BASE',SYSDATE,NULL,NULL,NULL);

INSERT INTO itm2menu (application,level_1,level_2,level_3,level_4,level_5,win_name,descr,comments,menu_path,icon_path,obj_type,chg_user,chg_term,chg_date,open_icon,mob_deploy,close_icon)
VALUES ('FRT',1,0,0,0,0,'-','Freight  Master and Transaction',NULL,'FRT.1.0.0.0.0',NULL,NULL,'BASE','BASE',SYSDATE,NULL,NULL,NULL);

INSERT INTO itm2menu (application,level_1,level_2,level_3,level_4,level_5,win_name,descr,comments,menu_path,icon_path,obj_type,chg_user,chg_term,chg_date,open_icon,mob_deploy,close_icon)
VALUES ('FRT',1,3,0,0,0,'w_frt_list','Freight List',NULL,'FRT.1.3.0.0.0','e12_logo.gif','T','BASE','BASE',SYSDATE,NULL,NULL,NULL);

INSERT INTO transetup (tran_window,save_flag,val_flag,key_flag,key_string,repeate_add,chg_date,chg_user,chg_term,edi_option,site_acc_col,confirm_col,confirm_val,
auto_confirm,ledg_post_conf,tran_id_col,workflow_opt,ref_ser,tax_forms,wrkflw_init,audit_trail_opt)
VALUES ('w_frt_list','2','2','M',NULL,NULL,SYSDATE,'BASE','BASE','0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F-LST',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 )
VALUES ('w_frt_list','freight_list','d_frt_list_brow','d_frt_list_edit',NULL,NULL,NULL,NULL,'1');

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,IS_CONFIRMATION_REQ)
VALUES ('frt_list',1,'add.gif','Adding New','a','a','A','Add','1',NULL,NULL,'S',NULL,SYSDATE,'BASE','BASE',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,IS_CONFIRMATION_REQ) 
VALUES ('frt_list',2,'edit.gif','Editing Existing Record','a','a','E','Edit','1',NULL,NULL,'S',NULL,SYSDATE,'BASE','BASE',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,IS_CONFIRMATION_REQ) 
VALUES ('frt_list',4,'save.gif','Saving','a','a','S','Save','1',NULL,NULL,'S',NULL,SYSDATE,'BASE','BASE',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,IS_CONFIRMATION_REQ) 
VALUES ('frt_list',21,'menu.bmp','View Audit Trail','audit_trail','1','X','View Audit','1','1','1','U',NULL,SYSDATE,'BASE','BASE',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 ('frt_list','audit_trail','1','project_audit_trail',NULL,'0',SYSDATE,'BASE','BASE','2',NULL,NULL,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 ('frt_list','post_item_change','1','poic_default_ejb',NULL,'0',SYSDATE,'BASE','BASE','2','EJB','FreightListIC',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 ('frt_list','post_save','1','createedi',NULL,'0',SYSDATE,'BASE','BASE','2','WSR','nvo_business_object_win_methods',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 ('frt_list','post_validate','1','post_gen_val',NULL,'0',SYSDATE,'BASE','BASE','2','EJB','GenValidate',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 ('frt_list','pre_validate','1','prv_default_ejb',NULL,'0',SYSDATE,'BASE','BASE','2','EJB','FreightListIC',NULL);

INSERT INTO obj_itemchange (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) VALUES ('frt_list','1','curr_code',NULL);
INSERT INTO obj_itemchange (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) VALUES ('frt_list','1','inc_chg__call',NULL);
INSERT INTO obj_itemchange (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) VALUES ('frt_list','1','inc_chg__dlv',NULL);
INSERT INTO obj_itemchange (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) VALUES ('frt_list','1','inc_chg__dtn',NULL);
INSERT INTO obj_itemchange (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) VALUES ('frt_list','1','load_type',NULL);

INSERT INTO pophelp (FIELD_NAME,MOD_NAME,SQL_STR,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,HELP_OPTION,POPHELP_SOURCE)
VALUES ('FRT_LIST','X','select frt_list,descr from freight_list','Freight List',0,0,SYSDATE,'BASE','BASE','0','0','S');

INSERT INTO pophelp (FIELD_NAME,MOD_NAME,SQL_STR,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,HELP_OPTION,POPHELP_SOURCE)
VALUES ('FRT_CHGS_TABLE','X','select distinct frt_chgs_table from freight_charges_table','Freight Chgs. Table',0,0,SYSDATE,'BASE','BASE','0','0','S');

INSERT INTO pophelp (FIELD_NAME,MOD_NAME,SQL_STR,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,HELP_OPTION,POPHELP_SOURCE)
VALUES ('LOAD_TYPE','X','select fld_value, descr from gencodes where fld_name = ''LOAD_TYPE'' and mod_name = ''X''','Load Type',0,0,SYSDATE,'BASE','BASE','0','0','S');

INSERT INTO pophelp (FIELD_NAME,MOD_NAME,SQL_STR,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,DEFAULT_COL,POP_ALIGN,HELP_OPTION,POPHELP_SOURCE) 
VALUES ('INC_CHG','X','select rtrim(fld_value),descr from gencodes where fld_name = ''INC_CHG'' and mod_name = ''X''','Incidental Charges',0,0,SYSDATE,'BASE','BASE','0',0,'C','0','S');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULLFRTL', 'Empty Freight List !','Freight List should not be Empty. !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term )
VALUES ('VMDUPFRTLT', 'Duplicate Freight List','Freight List Alrady exist in master !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDCURNC', 'Error Invalid Currency','Currency Code not defined in Masters !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULLCURN', 'Empty Currency Code','Currency code cannot be blank !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULFRTBL', 'Empty Freight Charges Table','Freight Charges Table should not be Empty !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULLDTYP', 'Empty Load Type!','Load Type should not be Empty !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDFRTTB', 'Invalid Freight Charges Table','Freight Charges Table does not exists in master !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDCALI1', 'Invalid Call Inc. Charges.','Call Incidental Charges doesnot exists in master !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULCALI2', 'Empty Call Inc. Charges','Call Incidental Charges should not be empty !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDDLVCG', 'Invalid Delivery Inc. Charges','Delivery Incidental  Charges does not exists in master !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULDLVCG', 'Empty Dlv. Incidental Charges','Delivery Incidental Charges should not be empty !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDDETCG', 'Invalid Detention Inc Charges!','Detention Incidental Charges doesnot exists in master !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMNULDETCG', 'Empty Dtn. Incidental Charges!','Detention Incidental Charges should not be empty !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMEFROMDTE', 'Empty Effective From Date','Please Enter Effective From Date !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDTODTE', 'Empty Valid Upto Date','Please Enter Valid Upto Date !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term ) 
VALUES ('VMVLDFRMTO', 'Invalid Date','Valid Upto Date can not be less than Effective From Date !', 'E', 'Y', SYSDATE, 'BASE', 'BASE');
