
START TRANSACTION;

ALTER TABLE `bookings_seats` ADD COLUMN `name` varchar(255) DEFAULT NULL;

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "lblTemplateTokens");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u>\r\n<br/><br/>\r\n{Title}<br/>\r\n{FirstName}<br/>\r\n{LastName}<br/>\r\n{Email}<br/>\r\n{Phone}<br/>\r\n{Notes}<br/>\r\n{Country}<br/>\r\n{City}<br/>\r\n{State}<br/>\r\n{Zip}<br/>\r\n{Address}<br/>\r\n{Company}<br/>\r\n{PickupArea}<br/>\r\n{Date}<br/>\r\n{Bus}<br/>\r\n{Route}<br/>\r\n{Seat}<br/>\r\n{Time}<br/>\r\n{From_Location}<br/>\r\n{To_Location}<br/>\r\n{Return_Date}<br/>\r\n{Departure_Time}<br/>\r\n{Arrival_Time}<br/>\r\n{TicketType}<br/>\r\n{TotalTicketType}<br/>\r\n{UniqueID}<br/>\r\n{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>\r\n{PaymentMethod}<br/>\r\n{CCType}<br/>\r\n{CCNum}<br/>\r\n{CCExp}<br/>\r\n{CCSec}<br/>\r\n{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_email_confirmation_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{Phone}<br/>{Notes}<br/>{Country}<br/>{City}<br/>{State}<br/>{Zip}<br/>{Address}<br/>{Company}<br/>{PickupArea}<br/>{Date}<br/>{Time}<br/>{Bus}<br/>{Route}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{Seats}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{PaymentMethod}<br/>{CCType}<br/>{CCNum}<br/>{CCExp}<br/>{CCSec}<br/>{PrintTickets}<br/>{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_email_payment_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{Phone}<br/>{Notes}<br/>{Country}<br/>{City}<br/>{State}<br/>{Zip}<br/>{Address}<br/>{Company}<br/>{PickupArea}<br/>{Date}<br/>{Time}<br/>{Bus}<br/>{Route}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{Seats}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{PaymentMethod}<br/>{CCType}<br/>{CCNum}<br/>{CCExp}<br/>{CCSec}<br/>{PrintTickets}<br/>{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_email_cancel_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{Phone}<br/>{Notes}<br/>{Country}<br/>{City}<br/>{State}<br/>{Zip}<br/>{Address}<br/>{Company}<br/>{PickupArea}<br/>{Date}<br/>{Time}<br/>{Bus}<br/>{Route}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{Seats}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{PaymentMethod}<br/>{CCType}<br/>{CCNum}<br/>{CCExp}<br/>{CCSec}<br/>{PrintTickets}<br/>{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "lblEmailTokens");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{Phone}<br/>{Notes}<br/>{Country}<br/>{City}<br/>{State}<br/>{Zip}<br/>{Address}<br/>{Company}<br/>{PickupArea}<br/>{Date}<br/>{Seat}<br/>{Bus}<br/>{Route}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{Time}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{PaymentMethod}<br/>{CCType}<br/>{CCNum}<br/>{CCExp}<br/>{CCSec}<br/>{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_sms_confirmation_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{PickupArea}<br/>{Date}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{Phone}' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_email_notify_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{Phone}<br/>{Notes}<br/>{Country}<br/>{City}<br/>{State}<br/>{Zip}<br/>{Address}<br/>{Company}<br/>{PickupArea}<br/>{Date}<br/>{Time}<br/>{Bus}<br/>{Route}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{Seats}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{PaymentMethod}<br/>{CCType}<br/>{CCNum}<br/>{CCExp}<br/>{CCSec}<br/>{PrintTickets}<br/>{CancelURL}<br/>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "opt_o_sms_payment_message_text");
UPDATE `multi_lang` SET `content` = '<u>Available Tokens:</u><br/><br/>{Title}<br/>{FirstName}<br/>{LastName}<br/>{Email}<br/>{PickupArea}<br/>{Date}<br/>{From_Location}<br/>{To_Location}<br/>{Return_Date}<br/>{TicketTypesPrice}<br/>{TotalTicketType}<br/>{UniqueID}<br/>{Total}<br/>{Tax}<br/>{DiscountCode}<br/>{DiscountValue}<br/>{Phone}' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

INSERT INTO `fields` VALUES (NULL, 'front_passenger', 'frontend', 'Label / Passenger', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Passenger', 'script');

INSERT INTO `fields` VALUES (NULL, 'front_pickup_passenger', 'frontend', 'Label / Pickup passenger', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Pickup passenger', 'script');

INSERT INTO `fields` VALUES (NULL, 'front_return_passenger', 'frontend', 'Label / Return passenger', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Return passenger', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerPassengerName', 'backend', 'Label / Passenger name', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Passenger name', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerCountry', 'backend', 'Label / Country', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Country', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerNo', 'backend', 'Label / No', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'No', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerBookingID', 'backend', 'Label / Booking ID', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Booking ID', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerTicketType', 'backend', 'Label / Ticket type', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Ticket type', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerSalesAgents', 'backend', 'Label / Sales / Agents', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Sales / Agents', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerTotalSeats', 'backend', 'Label / Total seat(s)', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Total seat(s)', 'script');

INSERT INTO `fields` VALUES (NULL, 'lblPassengerListTitle', 'backend', 'Label / Passenger List', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Passenger List', 'script');



COMMIT;