alter table emp_travel_info add visa_status char(1);
alter table emp_travel_info add ticket_status char(1);
alter table emp_travel_info add ticket_stat_date date;
alter table emp_travel_info add visa_stat_date date;

INSERT INTO obj_actions (obj_name,line_no,image,description,service_code,interactive,rights_char,title,form_no,service_handler,placement,action_type) VALUES('emp_travel_info','5','cancel.gif','Action Button to Cancel','act_cancel','a','R','Cancel','1','2',NULL,'U');

INSERT INTO  obj_actions (obj_name,line_no,image,description,service_code,interactive,rights_char,title,form_no,service_handler,placement,action_type) VALUES('emp_travel_info','6','confirm.gif','Action Button to Ticket','act_ticket','a','F','Ticket','1','2',NULL,'U');

INSERT INTO  obj_actions (obj_name,line_no,image,description,service_code,interactive,rights_char,title,form_no,service_handler,placement,action_type) VALUES('emp_travel_info','7','confirm.gif','Action Button to Visa','act_visa','a','F','Visa','1','2',NULL,'U');

INSERT INTO  system_events
 (obj_name,event_code,event_context,service_code ,method_rule ,chg_date ,chg_user ,
chg_term ,result_handle ,overwrite_core ,comp_type ,comp_name ,comm_format )
VALUES ('emp_travel_info','act_ticket','1','emp_info_process',NULL,SYSDATE,'BASE',
'BASE111','2','0','EJB','EmpTravelInfoTicket',NULL);

INSERT INTO  system_events
 (obj_name,event_code,event_context,service_code ,method_rule ,chg_date ,chg_user ,
chg_term ,result_handle ,overwrite_core ,comp_type ,comp_name ,comm_format )
VALUES ('emp_travel_info','act_visa','1','emp_info_process',NULL,SYSDATE,'BASE',
'BASE111','2','0','EJB','EmpTravelInfoVisa',NULL);
INSERT INTO   system_events
 (obj_name,event_code,event_context,service_code ,method_rule ,chg_date ,chg_user ,
chg_term ,result_handle ,overwrite_core ,comp_type ,comp_name ,comm_format )
VALUES ('emp_travel_info','act_cancel','1','emp_info_process',NULL,SYSDATE,'BASE',
'BASE111','2','0','EJB','EmpTravelInfoCancel',NULL);

Insert into   SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM) values ('emp_info_process','Submit emp traval information','http://localhost/axis/services/ConfirmService',null,'confirm',null,'S',null,null,sysdate,'BASE','BASE111');
  
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 ('emp_info_process',1,'COMPONENT_TYPE','I',null,'S',null,SYSDATE,'BASE      ','BASE111','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 ('emp_info_process',2,'COMPONENT_NAME','I',null,'S',null,SYSDATE,'BASE      ','BASE111',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 ('emp_info_process',3,'<tran_id>','I',null,'B.String',null,SYSDATE,'BASE      ','BASE111',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 ('emp_info_process',4,'XTRA_PARAMS','I',null,'S',null,SYSDATE,'BASE      ','BASE111',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 ('emp_info_process',5,'FORCED_FLAG','I',null,'S',null,SYSDATE,'BASE111','BASE111',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 ('emp_info_process',6,'DB_CONN','I',null,'S.Connection',null,SYSDATE,'BASE','BASE111',null);


INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term  )
VALUES ('VTVISACONF', 'Visa Status Already Updated!',  'Visa Status is Already Updated',   '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 ('VTTCKTCONF', 'Already Updated!',  'Ticket Status Already Updated',   '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 ('VTNOTCONF2', 'Not Confirmed!',  'Employee Travel information not confirmed',   '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 ('VTTKTSUC', 'Ticket Status is updated!',  'Ticket Status is updated Sucessfully',   'P',   'Y',  SYSDATE,  'BASE ', 'BASE ');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term  )
VALUES ('VTERRTIKT', 'Unable to Update Status!',  'Unable to Update Ticket Status',   '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 ('VTVISASUC', 'Visa Status is updated!',  'Visa Status is updated Sucessfully',   'P',   'Y',  SYSDATE,  'BASE ', 'BASE ');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term  )
VALUES ('VTERRVISA', 'Unable to Update Status!',  'Unable to Update Visa Status',   '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 ('VTCANCEL5', 'Transaction Cancelled!',  'Transaction Cancelled Sucessfully',   'P',   'Y',  SYSDATE,  'BASE ', 'BASE ');

INSERT INTO MESSAGES (msg_no , msg_str , msg_descr ,  msg_type ,  msg_opt , chg_date , chg_user , chg_term  )
VALUES ('VTERRCAN', 'Unable to cancel transaction!',  'Unable to cancel transaction',   '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 ('VTNOTCONF3', 'Invalid Confirm!',  'Employee Travel information is already cancelled',   '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 ('VTNOTSUB', 'Invalid Submit!',  'Employee Travel information  is already cancelled',   'E',   'Y',  SYSDATE,  'BASE ', 'BASE ');

-- START added by chandrashekar for sending email if cancel Star Club Employee Travel Information 19/05/2014 [W14BSUN003]

UPDATE system_events SET comm_format='CANTRAN' WHERE obj_name='emp_travel_info' and event_code='act_cancel';

Insert into mail_format (FORMAT_CODE,FORMAT_TYPE,SEND_TO,COPY_TO,BLIND_COPY,SUBJECT,BODY_TEXT,BODY_COMP,PRIORITY,DELIVERY_REPORT,RETURN_RECEIPT,MAIL_APPLICATION,MAIL_SERVER,MAIL_BOX,MAIL_ID,ATTACH_TYPE,ATTACH_TEXT,WINNAME,WIN_NAME,MAIL_GENERATION,MAIL_DESCR,FN_NAME,COND_METHOD) values ('CANTRAN                       ','T','[(E)EMP_CODE]','[(E)TRAVEL_CODE]','chandrashekar.aluka@baseinformation.com','Employee Travel Information Cancelled  ','Dear Sir/Madam, Following are Details of Cancelled Travel Information Status Change.',1,1,1,1,'M','192.168.0.136','192.168.0.136','employee@baseinfo.com',null,null,null,'w_emp_travel_info','I',null,null,null);

-- END added by chandrashekar for sending email if cancel Star Club Employee Travel Information 19/05/2014 [W14BSUN003]
-- START added by chandrashekar for Flight Book Link Star Club Employee Travel Information 26/05/2014 [W14BSUN003]
Insert into obj_links (OBJ_NAME,FORM_NO,FIELD_NAME,TARGET_OBJ_NAME,LINK_FORM_NAME,LINK_TITLE,LINK_URI,LINK_TYPE,LINK_ARG,UPDATE_FLAG,LINK_NAME,RIGHTS_CHAR,IMAGE) 
values ('emp_travel_info','1','tran_date','emp_travel_info11','emp_travel_info11','Flight Booking','/ibase/webitm/jsp/empFligtInfo.jsp','3','tran_id.String:tran_id','0',null,'*',null);

update  transetup set  allow_attach = '1'  where  tran_window='w_emp_travel_info';

alter table emp_travel_info add flight_code  varchar2(20);

-- End added by chandrashekar for Flight Book Link Star Club Employee Travel Information 26/05/2014 [W14BSUN003]

-- START added by chandrashekar for msgtype change Star Club Employee Travel Information 29/05/2014 [W14BSUN003]
UPDATE messages SET msg_type='E' WHERE msg_no='VTCANCEL5';
UPDATE messages SET msg_type='E' WHERE msg_no='VTVISASUC';
UPDATE messages SET msg_type='E' WHERE msg_no='VTTKTSUC';
-- End added by chandrashekar for msg type change Star Club Employee Travel Information 29/05/2014 [W14BSUN003]



