INSERT INTO `sps_eod_report_select` (`eod_report_id`, `eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, 'loyalty_discount', '1', '1', '1', '21', '1', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL);

INSERT INTO `sps_eod_report_select` (`eod_report_id`, `eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, 'max_charge_discount', '1', '1', '1', '22', '1', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL);

INSERT INTO `sps_eod_report_select` (`eod_report_id`, `eod_report_name`, `status`, `area_id`, `location_id`, `eod_reportvise_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, 'down_time_O-Manual', '1', '1', '1', '23', '1', '0', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL);



UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '8' WHERE `sps_eod_report_select`.`eod_report_id` = 24;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '9' WHERE `sps_eod_report_select`.`eod_report_id` = 25;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '10' WHERE `sps_eod_report_select`.`eod_report_id` = 6;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '11' WHERE `sps_eod_report_select`.`eod_report_id` = 9;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '12' WHERE `sps_eod_report_select`.`eod_report_id` = 8;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '13' WHERE `sps_eod_report_select`.`eod_report_id` = 7;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '14' WHERE `sps_eod_report_select`.`eod_report_id` = 26;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '15' WHERE `sps_eod_report_select`.`eod_report_id` = 13;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '16' WHERE `sps_eod_report_select`.`eod_report_id` = 5;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '17' WHERE `sps_eod_report_select`.`eod_report_id` = 10;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '18' WHERE `sps_eod_report_select`.`eod_report_id` = 15;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '19' WHERE `sps_eod_report_select`.`eod_report_id` = 14;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '20' WHERE `sps_eod_report_select`.`eod_report_id` = 19;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '21' WHERE `sps_eod_report_select`.`eod_report_id` = 16;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '22' WHERE `sps_eod_report_select`.`eod_report_id` = 11;

UPDATE `sps_eod_report_select` SET `eod_reportvise_id` = '23' WHERE `sps_eod_report_select`.`eod_report_id` = 2;



/*---------- sps_menu tables ----------*/

/*--For loyalty discount--*/
INSERT INTO `sps_menu` (`id`, `menu_item`, `menu_url`, `menu_class`, `parent_menu_id`, `action`, `order`, `status`, `location_id`, `area_id`, `created_by`, `created_at`, `updated_at`, `deleted_at`, `updated_by`) VALUES (NULL, 'loyalty_discount', 'admin/loyalty_discount', 'menu', '46', '', '11.28', '1', '1', '1', '1', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL, '1');

/*--For max charge discount--*/
INSERT INTO `sps_menu` (`id`, `menu_item`, `menu_url`, `menu_class`, `parent_menu_id`, `action`, `order`, `status`, `location_id`, `area_id`, `created_by`, `created_at`, `updated_at`, `deleted_at`, `updated_by`) VALUES (NULL, 'max_charge_discount', 'admin/max_charge_discount', 'menu', '46', '', '11.29', '1', '1', '1', '1', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL, '1');


/*--------- sps_menu_action_mapping table -----------------*/

/*--For loyalty discount--*/
INSERT INTO `sps_menu_action_mapping` (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, '100', '1', '', '', '', '', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

/*--For max charge discount--*/
INSERT INTO `sps_menu_action_mapping` (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (NULL, '101', '1', '0', '0', '0', '0', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

/*--After this inserting go to user access right menu then click on loyalty discount and max charge discount and then log Out and log IN.--*/





/*----Query For Export function of Loyalty Discount and Max Charge Discount for Report Section is added below*/
INSERT INTO `sps_menu_action_mapping`
        (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`)
        VALUES (NULL, (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "loyalty_discount"), '6', '0', '0', '0', '0', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

INSERT INTO `sps_access_rights`
	(`id`, `role_id`, `menu_id`, `action_id`, `created_by`, `updated_at`, `deleted_at`, `location_id`, `area_id`, `updated_by`, `created_at`)
	VALUES ('0', '1', (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "loyalty_discount"), '6', '0', CURRENT_TIMESTAMP, NULL, '0', '0', '0', CURRENT_TIMESTAMP);


INSERT INTO `sps_menu_action_mapping`
        (`id`, `menu_id`, `action_id`, `area_id`, `location_id`, `created_by`, `updated_by`, `created_at`, `updated_at`, `deleted_at`)
        VALUES (NULL, (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "max_charge_discount"), '6', '0', '0', '0', '0', CURRENT_TIMESTAMP, '0000-00-00 00:00:00.000000', NULL);

INSERT INTO `sps_access_rights`
	(`id`, `role_id`, `menu_id`, `action_id`, `created_by`, `updated_at`, `deleted_at`, `location_id`, `area_id`, `updated_by`, `created_at`)
	VALUES ('0', '1', (SELECT id FROM sps_menu WHERE sps_menu.menu_item = "max_charge_discount"), '6', '0', CURRENT_TIMESTAMP, NULL, '0', '0', '0', CURRENT_TIMESTAMP);