
START TRANSACTION;

DROP TABLE IF EXISTS `clients`;
CREATE TABLE IF NOT EXISTS `clients` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `foreign_id` int(10) unsigned DEFAULT NULL,
  `customer_title` varchar(255) DEFAULT NULL,
  `customer_company` varchar(255) DEFAULT NULL,
  `customer_address_1` varchar(255) DEFAULT NULL,
  `customer_address_2` varchar(255) DEFAULT NULL,
  `customer_country` varchar(255) DEFAULT NULL,
  `customer_state` varchar(255) DEFAULT NULL,
  `customer_city` varchar(255) DEFAULT NULL,
  `customer_zip` varchar(255) DEFAULT NULL,
  `customer_notes` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

ALTER TABLE `bookings` ADD COLUMN `client_id` int(10) UNSIGNED DEFAULT NULL AFTER `booking_id`;

INSERT IGNORE INTO `notifications` (`id`, `recipient`, `transport`, `variant`, `is_active`) VALUES
(NULL, 'client', 'email', 'account', 1),
(NULL, 'client', 'email', 'forgot', 1);

ALTER TABLE `bookings` ADD COLUMN `booking_discount` decimal(16,2) UNSIGNED DEFAULT NULL AFTER `insurance`;
ALTER TABLE `bookings` ADD COLUMN `discount_code` VARCHAR(255) DEFAULT NULL AFTER `booking_discount`;

DROP TABLE IF EXISTS `bookings_files`;
CREATE TABLE IF NOT EXISTS `bookings_files` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `foreign_id` int(10) unsigned DEFAULT NULL,
  `type` enum('booking','vehicle') DEFAULT 'booking',
  `file_name` varchar(255) DEFAULT NULL,
  `file_path` varchar(255) DEFAULT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;


ALTER TABLE `bookings` ADD COLUMN (
	`c_driver_license` varchar(255) DEFAULT NULL,
	`c_birthday` date DEFAULT NULL
);

ALTER TABLE `clients` ADD COLUMN (
	`customer_driver_license` varchar(255) DEFAULT NULL,
	`customer_birthday` date DEFAULT NULL
);

INSERT INTO `options` (`foreign_id`, `key`, `tab_id`, `value`, `label`, `type`, `order`, `is_visible`, `style`) VALUES
(1, 'o_bf_include_driver_license_number', 2, '1|2|3::2', 'No|Yes|Yes (required)', 'enum', 16, 1, NULL),
(1, 'o_bf_include_birthday', 2, '1|2|3::2', 'No|Yes|Yes (required)', 'enum', 17, 1, NULL);

ALTER TABLE `cars` ADD COLUMN (
	`service_phone_number` varchar(255) DEFAULT NULL,
	`insurance_customer_number` varchar(255) DEFAULT NULL
);

INSERT INTO `options` (`foreign_id`, `key`, `tab_id`, `value`, `label`, `type`, `order`, `is_visible`, `style`) VALUES
(1, 'o_booking_page', 1, '', NULL, 'string', 19, 1, NULL);

ALTER TABLE `cars` ADD COLUMN (
	`file_name` varchar(255) DEFAULT NULL,
  	`file_path` varchar(255) DEFAULT NULL
);

ALTER TABLE `bookings` ADD COLUMN (
	`damage_report_file_name` varchar(255) DEFAULT NULL,
  	`damage_report_file_path` varchar(255) DEFAULT NULL
);

INSERT INTO `options` (`foreign_id`, `key`, `tab_id`, `value`, `label`, `type`, `order`, `is_visible`, `style`) VALUES
(1, 'o_rental_agreement', 6, '', NULL, 'text', 1, 1, NULL);


INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblDefaultPickupTime', 'backend', 'Label / Default pick-up time', 'script', '2013-09-18 08:45:51');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Default pick-up time', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_rental_agreement', 'backend', 'Options / Rental agreement', 'script', '2018-05-31 06:44:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Rental agreement', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_AO10', 'arrays', 'error_bodies_ARRAY_AO10', 'script', '2013-10-07 11:42:11');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'All the changes made to rental agreement have been saved.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_AO10', 'arrays', 'error_titles_ARRAY_AO10', 'script', '2013-10-07 11:42:21');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Rental agreement updated!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_AO29', 'arrays', 'error_titles_ARRAY_AO29', 'script', '2013-09-18 08:44:51');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Rental Agreement', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_AO29', 'arrays', 'error_bodies_ARRAY_AO29', 'script', '2013-09-18 08:45:51');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Enter booking rental agreement.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblDamageReport', 'backend', 'Label / Damage report', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Damage report', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblDocuments', 'backend', 'Label / Documents', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Documents', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_booking_page', 'backend', 'Label / Booking page', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'URL to the webpage where the main script is installed', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblServicePhoneNumber', 'backend', 'Label / Service phone number', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Service phone number', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblInsuranceCustomerNumber', 'backend', 'Label / Insurance customer number', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Insurance customer number', 'script');


INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_bf_include_driver_license_number', 'backend', 'Options / Booking form Driver License Number', 'script', '2018-05-31 06:44:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Driver''s license #', 'script');
				
INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_bf_include_birthday', 'backend', 'Options / Booking form Birthday', 'script', '2018-05-31 06:44:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Birthday', 'script');
			
INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblDriverLicenseNumber', 'backend', 'Label / Driver''s license #', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Driver''s license #', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblBirthday', 'backend', 'Label / Birthday', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Birthday', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_driver_license_number', 'frontend', 'Label / Driver''s license #', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Driver''s license #', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_birthday', 'frontend', 'Label / Birthday', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Birthday', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblClientLastBooking', 'backend', 'Label / Last booking', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Last booking', 'script');


INSERT INTO `plugin_base_fields` VALUES (NULL, 'menuClients', 'backend', 'Menu / Clients', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Clients', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoClientsTitle', 'backend', 'Infobox / Client list', 'script', '2020-08-07 08:55:21');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client list', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoClientsDesc', 'backend', 'Infobox / Client list', 'script', '2020-08-07 08:55:47');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Below is a list of the people who have used the system to make bookins. Click on the pencil icon of each row to see and edit client details.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'btnAddClient', 'backend', 'Button / Add Client', 'script', '2020-08-07 08:56:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Add Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblBookings', 'backend', 'Label / Bookings', 'script', '2020-08-07 08:57:27');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Bookings', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoCreateClientTitle', 'backend', 'Infobox / Add Client', 'script', '2020-08-07 09:00:44');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Add Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoCreateClientDesc', 'backend', 'Infobox / Add Client', 'script', '2020-08-07 09:01:11');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Fill in the form below and "Save" to create new client.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblTitle', 'backend', 'Label / Title', 'script', '2020-08-07 09:02:13');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Title', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblCompany', 'backend', 'Label / Company', 'script', '2020-08-07 09:06:52');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Company', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoUpdateClientTitle', 'backend', 'Infobox / Update Client', 'script', '2020-08-07 09:12:02');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Update Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'infoUpdateClientDesc', 'backend', 'Infobox / Update Client', 'script', '2020-08-07 09:12:17');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Use the form below to make changes to client''s details.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblClientTotalBookings', 'backend', 'Label / Total bookings', 'script', '2020-08-07 09:13:00');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Total bookings', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_ACL01', 'backend', 'error_bodies_ARRAY_ACL01', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'All changes made to the client have been saved.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_ACL03', 'backend', 'error_bodies_ARRAY_ACL03', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'The client has been added into the system.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_ACL04', 'backend', 'error_bodies_ARRAY_ACL04', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'The client could not be added into the system.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_bodies_ARRAY_ACL08', 'backend', 'error_bodies_ARRAY_ACL08', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'We are sorry that client you are looking for is missing.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_ACL01', 'backend', 'error_titles_ARRAY_ACL01', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client updated!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_ACL03', 'backend', 'error_titles_ARRAY_ACL03', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client added!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_ACL04', 'backend', 'error_titles_ARRAY_ACL04', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client not added!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'error_titles_ARRAY_ACL08', 'backend', 'error_titles_ARRAY_ACL08', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client not found!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblNewClient', 'backend', 'Label / New Client', 'script', '2020-08-09 11:06:27');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'New Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblExistingClient', 'backend', 'Label / Existing Client', 'script', '2020-08-09 11:06:41');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Existing Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblClient', 'backend', 'Label / Client', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_profile', 'frontend', 'Menu / Profile', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Profile', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_reservations', 'frontend', 'Menu / Reservations', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Reservations', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_logout', 'frontend', 'Menu / Logout', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Logout', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_register', 'frontend', 'Menu / Register', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Register', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_login', 'frontend', 'Menu / Login', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Login', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_home', 'frontend', 'Menu / Home', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Home', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_menu_search', 'frontend', 'Menu / Search', 'script', '2020-08-11 07:08:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Search', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_email', 'arrays', 'client_account_required_ARRAY_email', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'E-Mail address is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_invalid_email', 'arrays', 'client_account_required_ARRAY_invalid_email', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'E-Mail address is invalid', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_password', 'arrays', 'client_account_required_ARRAY_password', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Password is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_title', 'arrays', 'client_account_required_ARRAY_title', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Title is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_name', 'arrays', 'client_account_required_ARRAY_name', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Name is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_phone', 'arrays', 'client_account_required_ARRAY_phone', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Phone is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_company', 'arrays', 'client_account_required_ARRAY_company', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Company is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_address', 'arrays', 'client_account_required_ARRAY_address', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Address is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_address_1', 'arrays', 'client_account_required_ARRAY_address_1', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Address 1 is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_address_2', 'arrays', 'client_account_required_ARRAY_address_2', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Address 2 is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_city', 'arrays', 'client_account_required_ARRAY_city', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'City is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_state', 'arrays', 'client_account_required_ARRAY_state', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'State is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_zip', 'arrays', 'client_account_required_ARRAY_zip', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Zip is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_country', 'arrays', 'client_account_required_ARRAY_country', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Country is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_button_login', 'frontend', 'Button / Login', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Login', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_forgot_password_link', 'frontend', 'Label / Forgot password?', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Forgot password?', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_err_ARRAY_1', 'arrays', 'front_login_err_ARRAY_1', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Email does not exists', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_err_ARRAY_2', 'arrays', 'front_login_err_ARRAY_2', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Password is incorrect', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_err_ARRAY_3', 'arrays', 'front_login_err_ARRAY_3', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Account is disabled', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_err_ARRAY_4', 'arrays', 'front_login_err_ARRAY_4', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Please enter your email and password', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login', 'frontend', 'Label / Login', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Login', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_forgot_password', 'frontend', 'Label / Forgot password', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Forgot password', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_button_send', 'frontend', 'Button / Send', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Send', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_forgot_err_ARRAY_1', 'arrays', 'front_forgot_err_ARRAY_1', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Email does not exists in the system', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_forgot_err_ARRAY_2', 'arrays', 'front_forgot_err_ARRAY_2', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'An email with the password has been sent to your email address.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_profile', 'frontend', 'Label / Profile', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Profile', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_not_loggedin', 'frontend', 'Label / You have not logged in!', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'You have not logged in!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_email_exists', 'frontend', 'Label / Email already existed', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Email already existed', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_button_update_profile', 'frontend', 'Button / Update profile', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Update profile', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_profile_updated_msg', 'frontend', 'Label / Profile updated', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Your profile has been updated!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_email', 'frontend', 'Label / E-mail address', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'E-mail address', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_password', 'backend', 'client_password', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Password', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_title', 'frontend', 'Label / Title', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Title', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_name', 'frontend', 'Label / Name', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Name', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_password', 'frontend', 'Label / Password', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Password', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_phone', 'frontend', 'Label / Phone', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Phone', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_company_name', 'frontend', 'Label / Company name', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Company name', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_address', 'frontend', 'Label / Address', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Address', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_city', 'frontend', 'Label / City', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'City', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_state', 'frontend', 'Label / County/Region/State', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'County/Region/State', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_zip', 'frontend', 'Label / Zip', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Zip', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_country', 'frontend', 'Label / Country', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Country', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_client_notes', 'frontend', 'Label / Notes', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Notes', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_button_register', 'frontend', 'Button / Register', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Register', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_register_success_msg', 'frontend', 'Label / Register success msg', 'script', '2018-05-31 07:02:37');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Your account has been successfully created.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_register_fail_msg', 'frontend', 'Label / Register fail msg', 'script', '2018-05-31 07:02:37');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Failed to created account, please try again!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_update_profile_msg', 'frontend', 'Label / Profile Form', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Your profile has been updated.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_history', 'frontend', 'Label / Reservations', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Reservations', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_pickup_return', 'frontend', 'Label / Pick-up / Return', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Pick-up / Return', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_type', 'frontend', 'Label / Type', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Type', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_car', 'frontend', 'Label / Car', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Car', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_client', 'frontend', 'Label / Client', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_total', 'frontend', 'Label / Total', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Total', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_status', 'frontend', 'Label / Status', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Status', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_empty', 'frontend', 'Label / Orders not found!', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Orders not found!', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_orders_id', 'frontend', 'Label / ID', 'script', '2020-08-19 14:25:20');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'ID', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'forgot_messages_ARRAY_100', 'arrays', 'forgot_messages_ARRAY_100', 'script', '2020-08-19 14:11:29');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'There is no such account in the system.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'forgot_messages_ARRAY_101', 'arrays', 'forgot_messages_ARRAY_101', 'script', '2020-08-19 14:11:56');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Your account is not active yet.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'forgot_messages_ARRAY_200', 'arrays', 'forgot_messages_ARRAY_200', 'script', '2020-08-19 14:12:26');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'The password has been to your mail box.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_titles_ARRAY_client_email_account', 'arrays', 'notifications_titles_ARRAY_client_email_account', 'plugin', '2020-08-17 07:37:59');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'New client account email sent to Client', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_subtitles_ARRAY_client_email_account', 'arrays', 'notifications_subtitles_ARRAY_client_email_account', 'plugin', '2020-08-17 07:38:34');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'This message is sent to the client when new account is created.', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_ARRAY_client_email_account', 'arrays', 'notifications_ARRAY_client_email_account', 'plugin', '2020-08-17 07:40:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'New client account email', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_ARRAY_client_email_forgot', 'arrays', 'notifications_ARRAY_client_email_forgot', 'plugin', '2020-08-17 07:40:38');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Send forgot password email', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_titles_ARRAY_client_email_forgot', 'arrays', 'notifications_titles_ARRAY_client_email_forgot', 'plugin', '2020-08-17 07:41:02');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Send forgot password email to Client', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'notifications_subtitles_ARRAY_client_email_forgot', 'arrays', 'notifications_subtitles_ARRAY_client_email_forgot', 'plugin', '2020-08-17 07:41:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'This message is sent to client when he requests for password recovery.', 'plugin');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'opt_o_email_account_body_text', 'backend', 'Options / Email body text', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` (`id`, `foreign_id`, `model`, `locale`, `field`, `content`, `source`) VALUES
(NULL, @id, 'pjField', 1, 'title', '<div class="col-xs-12">
<div><small><strong>{Title}</strong> - The client''s title</small></div>
<div><small><strong>{Name}</strong> - The client''s name</small></div>
<div><small><strong>{Email}</strong> - The client''s email</small></div>
<div><small><strong>{Password}</strong> - The client''s password</small></div>
<div><small><strong>{Company}</strong> - The client''s company</small></div>
<div><small><strong>{Phone}</strong> - The client''s phone number</small></div>
<div><small><strong>{Notes}</strong> - Additional notes</small></div>
<div><small><strong>{Country}</strong> - The provided country</small></div>
<div><small><strong>{State}</strong> - The provided state</small></div>
<div><small><strong>{City}</strong> - The provided city</small></div>
<div><small><strong>{Zip}</strong> - The provided zip</small></div>
<div><small><strong>{Address}</strong> - The provided address</small></div>
 </div>
', 'script');


INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_voucher', 'frontend', 'Frontend / Voucher', 'script', '2020-09-25 11:07:13');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_voucher_code', 'frontend', 'Frontend / Voucher code', 'script', '2020-09-25 11:09:57');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher code', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_btn_apply', 'frontend', 'Button / Apply', 'script', '2020-09-25 11:14:34');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Apply', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'apply_voucher_msg_ARRAY_100', 'arrays', 'apply_voucher_msg_ARRAY_100', 'script', '2020-09-25 11:28:55');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher code is missing.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_summary_discount', 'frontend', 'Summary / Discount', 'script', '2020-09-28 03:43:38');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Discount', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_summary_subtotal', 'frontend', 'Summary / Subtotal', 'script', '2020-09-28 03:44:30');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Subtotal', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_discount_code_applied', 'frontend', 'Summary / Discount code is applied', 'script', '2020-09-28 04:03:47');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Discount code is applied', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'apply_voucher_msg_ARRAY_101', 'arrays', 'apply_voucher_msg_ARRAY_101', 'script', '2020-09-28 04:06:56');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher code is not valid.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'apply_voucher_msg_ARRAY_200', 'arrays', 'apply_voucher_msg_ARRAY_200', 'script', '2020-09-28 04:07:12');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher code is applied.', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'booking_discount', 'backend', 'Bookings / Discount', 'script', '2020-09-28 07:30:27');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Discount', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'booking_voucher_code', 'backend', 'Bookings / Voucher code', 'script', '2020-09-28 07:31:19');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Voucher code', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_form', 'frontend', 'Label / Login Form', 'script', '2020-08-17 10:48:32');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Login Form', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_login_form_popup_desc', 'frontend', 'Info / Login form popup desc', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'You already have an account. If you want, log-in here', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_btn_login', 'frontend', 'Button / Login', 'script', '2020-08-17 10:31:25');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Login', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_btn_cancel', 'frontend', 'Button / Cancel', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Cancel', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'btn_apply', 'backend', 'Button / Apply', 'script', '2020-09-25 11:14:34');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Apply', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblBookingFiles', 'backend', 'Label / Files', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Files', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_booking_files', 'frontend', 'Label / Files', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Files', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'btn_select_files', 'backend', 'Label / Select files', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Select files', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'btn_change_files', 'backend', 'Label / Change files', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Change files', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'booking_files_dtitle', 'backend', 'Label / Delete file title', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Delete file', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'booking_files_dbody', 'backend', 'Label / Delete file body', 'script', '2020-08-07 07:54:31');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Are you sure you want to delete this file?', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_4_v_driver_license', 'frontend', 'Options / Driver''s license # required', 'script', '2018-05-31 06:44:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Driver''s license number is required', 'script');
				
INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_4_v_birthday', 'backend', 'frontend / Booking form Birthday is required', 'script', '2018-05-31 06:44:09');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Birthday is required', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_driver_license', 'arrays', 'client_account_required_ARRAY_driver_license', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Driver''s license number is required', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'client_account_required_ARRAY_birthday', 'arrays', 'client_account_required_ARRAY_birthday', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Birthday is required', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_price_from', 'backend', 'Label / Price from', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Price from', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_not_available', 'backend', 'Label / Not available', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Not available', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'front_btn_book_now', 'backend', 'Label / Book Now', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Book Now', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblInstallCodeMainBookingSystem', 'backend', 'Label / Main Booking System', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Main Booking System', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblInstallCodeShowCarLists', 'backend', 'Label / Show Fleet List', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Show Fleet List', 'script');
	
INSERT INTO `plugin_base_fields` VALUES (NULL, 'menuRentalAgreement', 'backend', 'Menu / Rental Agreement', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Rental Agreement', 'script');
	
	

SET @level_1_id := (SELECT `id` FROM `plugin_auth_permissions` WHERE `key`='pjAdminOptions');

  INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_1_id, 'pjAdminOptions_pjActionRentalAgreement');
  SET @level_2_id := (SELECT LAST_INSERT_ID());
  INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @level_2_id, 'pjAuthPermission', '::LOCALE::', 'title', 'Rental Agreement', 'data');
  

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminOptions_pjActionRentalAgreement', 'backend', 'Label / Rental Agreement', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Rental Agreement', 'script');


INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, NULL, 'pjAdminClients');
SET @level_1_id := (SELECT LAST_INSERT_ID());

  INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_1_id, 'pjAdminClients_pjActionIndex');
  SET @level_2_id := (SELECT LAST_INSERT_ID());

    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionCreate');
    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionUpdate');
    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionDeleteClient');
    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionDeleteClientBulk');
    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionStatusClient'); 
    INSERT INTO `plugin_auth_permissions` (`id`, `parent_id`, `key`) VALUES (NULL, @level_2_id, 'pjAdminClients_pjActionExportClient');
    
    
    
INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients', 'backend', 'pjAdminClients', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Clients Menu', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionCreate', 'backend', 'pjAdminClients_pjActionCreate', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Add clients', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionDeleteClient', 'backend', 'pjAdminClients_pjActionDeleteClient', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Delete single client', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionDeleteClientBulk', 'backend', 'pjAdminClients_pjActionDeleteClientBulk', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Delete multiple clients', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionExportClient', 'backend', 'pjAdminClients_pjActionExportClient', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Export clients', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionIndex', 'backend', 'pjAdminClients_pjActionIndex', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Clients List', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionStatusClient', 'backend', 'pjAdminClients_pjActionStatusClient', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Revert clients status', 'script');

INSERT INTO `plugin_base_fields` VALUES (NULL, 'pjAdminClients_pjActionUpdate', 'backend', 'pjAdminClients_pjActionUpdate', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Edit clients', 'script');
    
INSERT INTO `plugin_base_fields` VALUES (NULL, 'lblPhotos', 'backend', 'Label / Photos', 'script', '2020-10-09 14:28:18');
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `plugin_base_multi_lang` VALUES (NULL, @id, 'pjBaseField', '::LOCALE::', 'title', 'Photos', 'script');
    

COMMIT;