diff --git a/airplane_mode/airplane_mode/doctype/__init__.py b/airplane_mode/airplane_mode/doctype/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airline/__init__.py b/airplane_mode/airplane_mode/doctype/airline/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airline/airline.js b/airplane_mode/airplane_mode/doctype/airline/airline.js
new file mode 100644
index 0000000..2687640
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airline/airline.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airline", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airline/airline.json b/airplane_mode/airplane_mode/doctype/airline/airline.json
new file mode 100644
index 0000000..ebc778b
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airline/airline.json
@@ -0,0 +1,65 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "autoname": "prompt",
+ "creation": "2024-06-16 11:10:17.363379",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "founding_year",
+ "customer_care_number",
+ "headquarters"
+ ],
+ "fields": [
+ {
+ "fieldname": "founding_year",
+ "fieldtype": "Int",
+ "label": "Founding Year",
+ "non_negative": 1
+ },
+ {
+ "fieldname": "customer_care_number",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Customer Care Number",
+ "reqd": 1
+ },
+ {
+ "fieldname": "headquarters",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Headquarters",
+ "reqd": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "links": [
+ {
+ "link_doctype": "Airplane",
+ "link_fieldname": "name"
+ }
+ ],
+ "modified": "2024-06-16 13:51:31.156362",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airline",
+ "naming_rule": "Set by user",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airline/airline.py b/airplane_mode/airplane_mode/doctype/airline/airline.py
new file mode 100644
index 0000000..73491cd
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airline/airline.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class Airline(Document):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airline/test_airline.py b/airplane_mode/airplane_mode/doctype/airline/test_airline.py
new file mode 100644
index 0000000..6d3c456
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airline/test_airline.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirline(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane/__init__.py b/airplane_mode/airplane_mode/doctype/airplane/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airplane/airplane.js b/airplane_mode/airplane_mode/doctype/airplane/airplane.js
new file mode 100644
index 0000000..2600dee
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane/airplane.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airplane", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airplane/airplane.json b/airplane_mode/airplane_mode/doctype/airplane/airplane.json
new file mode 100644
index 0000000..25f4bb0
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane/airplane.json
@@ -0,0 +1,63 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "autoname": "format:{airline}-{###}",
+ "creation": "2024-06-16 11:16:39.956469",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "model",
+ "airline",
+ "capacity"
+ ],
+ "fields": [
+ {
+ "fieldname": "model",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Model",
+ "reqd": 1
+ },
+ {
+ "fieldname": "airline",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Airline",
+ "options": "Airline",
+ "reqd": 1
+ },
+ {
+ "fieldname": "capacity",
+ "fieldtype": "Int",
+ "in_list_view": 1,
+ "label": "Capacity",
+ "non_negative": 1,
+ "reqd": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "links": [],
+ "modified": "2024-06-16 11:30:54.145867",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airplane",
+ "naming_rule": "Expression",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane/airplane.py b/airplane_mode/airplane_mode/doctype/airplane/airplane.py
new file mode 100644
index 0000000..3f48711
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane/airplane.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class Airplane(Document):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane/test_airplane.py b/airplane_mode/airplane_mode/doctype/airplane/test_airplane.py
new file mode 100644
index 0000000..308aba9
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane/test_airplane.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirplane(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/__init__.py b/airplane_mode/airplane_mode/doctype/airplane_flight/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.js b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.js
new file mode 100644
index 0000000..76d2a9b
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airplane Flight", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.json b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.json
new file mode 100644
index 0000000..40fec0b
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.json
@@ -0,0 +1,174 @@
+{
+ "actions": [],
+ "allow_guest_to_view": 1,
+ "allow_rename": 1,
+ "autoname": "format:{airplane}-{MM}-{YYYY}",
+ "creation": "2024-07-14 11:12:26.517001",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "airplane",
+ "column_break_havb",
+ "status",
+ "column_break_bfaw",
+ "amended_from",
+ "airport_details_section",
+ "source_airport",
+ "source_airport_code",
+ "column_break_fbqe",
+ "destination_airport",
+ "destination_airport_code",
+ "departure_details_section",
+ "date_of_departure",
+ "duration",
+ "column_break_idnl",
+ "time_of_departure",
+ "published",
+ "route"
+ ],
+ "fields": [
+ {
+ "fieldname": "airplane",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Airplane",
+ "options": "Airplane",
+ "reqd": 1
+ },
+ {
+ "fieldname": "date_of_departure",
+ "fieldtype": "Date",
+ "in_list_view": 1,
+ "label": "Date of Departure",
+ "reqd": 1
+ },
+ {
+ "fieldname": "time_of_departure",
+ "fieldtype": "Time",
+ "in_list_view": 1,
+ "label": "Time of Departure",
+ "reqd": 1
+ },
+ {
+ "fieldname": "duration",
+ "fieldtype": "Duration",
+ "in_list_view": 1,
+ "label": "Duration",
+ "reqd": 1
+ },
+ {
+ "default": "Scheduled",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "label": "Status",
+ "options": "Scheduled\nCompleted\nCancelled"
+ },
+ {
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "label": "Amended From",
+ "no_copy": 1,
+ "options": "Airplane Flight",
+ "print_hide": 1,
+ "read_only": 1,
+ "search_index": 1
+ },
+ {
+ "fieldname": "column_break_bfaw",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fetch_from": "source_airport.code",
+ "fieldname": "source_airport_code",
+ "fieldtype": "Data",
+ "label": "Source Airport Code"
+ },
+ {
+ "fetch_from": "destination_airport.code",
+ "fieldname": "destination_airport_code",
+ "fieldtype": "Data",
+ "label": "Destination Airport Code"
+ },
+ {
+ "fieldname": "source_airport",
+ "fieldtype": "Link",
+ "label": "Source Airport",
+ "options": "Airport",
+ "reqd": 1
+ },
+ {
+ "fieldname": "destination_airport",
+ "fieldtype": "Link",
+ "label": "Destination Airport",
+ "options": "Airport",
+ "reqd": 1
+ },
+ {
+ "fieldname": "column_break_havb",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "airport_details_section",
+ "fieldtype": "Section Break",
+ "label": "Airport Details"
+ },
+ {
+ "fieldname": "column_break_fbqe",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "departure_details_section",
+ "fieldtype": "Section Break",
+ "label": "Departure Details"
+ },
+ {
+ "fieldname": "column_break_idnl",
+ "fieldtype": "Column Break"
+ },
+ {
+ "default": "0",
+ "fieldname": "published",
+ "fieldtype": "Check",
+ "label": "published"
+ },
+ {
+ "fieldname": "route",
+ "fieldtype": "Data",
+ "label": "Route"
+ }
+ ],
+ "has_web_view": 1,
+ "index_web_pages_for_search": 1,
+ "is_published_field": "published",
+ "is_submittable": 1,
+ "links": [
+ {
+ "link_doctype": "Airplane Ticket",
+ "link_fieldname": "flight"
+ }
+ ],
+ "modified": "2024-07-21 19:30:05.323909",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airplane Flight",
+ "naming_rule": "Expression",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "route": "flights",
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.py b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.py
new file mode 100644
index 0000000..425550f
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/airplane_flight.py
@@ -0,0 +1,11 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.website.website_generator import WebsiteGenerator
+
+
+class AirplaneFlight(WebsiteGenerator):
+
+ def on_submit(self):
+ self.status = 'Completed'
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight.html b/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight.html
new file mode 100644
index 0000000..c104009
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight.html
@@ -0,0 +1,25 @@
+{% extends "templates/web.html" %}
+
+{% block page_content %}
+
{{ title |e }}
+
+
Flight Details
+
Airline:{{ doc.airplane }}
+
{{ doc.source_airport_code }} -> {{ doc.destination_airport_code }}
+ {% set duration = frappe.utils.format_duration(doc.duration) %}
+ {% set date = frappe.utils.format_date(doc.date_of_departure, "d MMMM, YYYY") %}
+
{{ date }} | {{ doc.time_of_departure }}
+
duration: {{ duration }}
+ {% set flight = title %}
+ {% set flight_price = 2000.0 |float %}
+
+
+
+
Book flight
+
+
+
+
+{% endblock %}
+
+
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight_row.html b/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight_row.html
new file mode 100644
index 0000000..c7ec5ea
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/templates/airplane_flight_row.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
{{ doc.airplane }}
+
{{ doc.source_airport_code }} -> {{ doc.destination_airport_code }}
+ {% set duration = frappe.utils.format_duration(doc.duration) %}
+ {% set date = frappe.utils.format_date(doc.date_of_departure, "d MMMM, YYYY") %}
+
{{ date }} | {{ doc.time_of_departure }}| {{ duration }}
+
View flight
+
+
+
+
diff --git a/airplane_mode/airplane_mode/doctype/airplane_flight/test_airplane_flight.py b/airplane_mode/airplane_mode/doctype/airplane_flight/test_airplane_flight.py
new file mode 100644
index 0000000..a2fb51e
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_flight/test_airplane_flight.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirplaneFlight(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket/__init__.py b/airplane_mode/airplane_mode/doctype/airplane_ticket/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.js b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.js
new file mode 100644
index 0000000..39ad85e
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.js
@@ -0,0 +1,38 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on("Airplane Ticket", {
+ refresh(frm) {
+
+ },
+ flight_price(frm) {
+ var addonprice = 0.0;
+ var total_price = 0.0;
+
+ if(frm.doc.flight_price)
+ {
+ $.each(frm.doc.items || [], function(i, d) {
+ for (var addon in d.add_ons)
+ {
+ addonprice += addon.amount
+ }
+ total_price+= d.flight_price + addonprice;
+ });
+
+
+ frm.set_value("total_amount",total_price);
+ }
+ }
+
+});
+
+frappe.ui.form.on("Airplane Ticket Add-on Item", {
+ airplane_ticket_addon_item_add(frm,cdt,cdn)
+ {
+ let total_addon = 0;
+ frm.doc.add_ons.forEach(addon =>{
+ total_addon += addon.amount;
+ });
+ frm.set_value("total_amount",frm.doc.flight_price + total_addon);
+ }
+});
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.json b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.json
new file mode 100644
index 0000000..78b1357
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.json
@@ -0,0 +1,202 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "autoname": "format:{flight}-{source_airport_code}-to-{destination_airport_code}-###",
+ "creation": "2024-06-16 11:39:03.757608",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "passenger",
+ "status",
+ "column_break_vgrd",
+ "flight",
+ "seat",
+ "section_break_gqwg",
+ "source_airport_code",
+ "column_break_izmz",
+ "destination_airport_code",
+ "section_break_hvlf",
+ "add_ons",
+ "section_break_rgek",
+ "flight_price",
+ "column_break_fxof",
+ "total_amount",
+ "departure_details_section",
+ "departure_time",
+ "departure_date",
+ "column_break_eyvy",
+ "duration_of_flight",
+ "amended_from"
+ ],
+ "fields": [
+ {
+ "fieldname": "passenger",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Passenger",
+ "options": "Flight Passenger",
+ "reqd": 1
+ },
+ {
+ "fetch_from": "flight.source_airport_code",
+ "fieldname": "source_airport_code",
+ "fieldtype": "Data",
+ "label": "Source Airport Code",
+ "read_only": 1,
+ "reqd": 1
+ },
+ {
+ "fetch_from": "flight.destination_airport_code",
+ "fieldname": "destination_airport_code",
+ "fieldtype": "Data",
+ "label": "Destination Airport Code",
+ "read_only": 1,
+ "reqd": 1
+ },
+ {
+ "fieldname": "flight",
+ "fieldtype": "Link",
+ "label": "Flight",
+ "options": "Airplane Flight",
+ "reqd": 1
+ },
+ {
+ "fetch_from": "flight.date_of_departure",
+ "fieldname": "departure_date",
+ "fieldtype": "Date",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Departure Date",
+ "reqd": 1
+ },
+ {
+ "fetch_from": "flight.time_of_departure",
+ "fieldname": "departure_time",
+ "fieldtype": "Time",
+ "label": "Departure Time",
+ "reqd": 1
+ },
+ {
+ "fetch_from": "flight.duration",
+ "fieldname": "duration_of_flight",
+ "fieldtype": "Duration",
+ "label": "Duration of Flight",
+ "reqd": 1
+ },
+ {
+ "fieldname": "column_break_vgrd",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "departure_details_section",
+ "fieldtype": "Section Break",
+ "label": "Departure Details"
+ },
+ {
+ "fieldname": "column_break_eyvy",
+ "fieldtype": "Column Break"
+ },
+ {
+ "default": "Booked",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "label": "Status",
+ "options": "Booked\nChecked-In\nBoarded"
+ },
+ {
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "label": "Amended From",
+ "no_copy": 1,
+ "options": "Airplane Ticket",
+ "print_hide": 1,
+ "read_only": 1,
+ "search_index": 1
+ },
+ {
+ "fieldname": "section_break_hvlf",
+ "fieldtype": "Section Break",
+ "label": "Add ons"
+ },
+ {
+ "fieldname": "add_ons",
+ "fieldtype": "Table",
+ "label": "add_ons",
+ "options": "Airplane Ticket Add-on Item"
+ },
+ {
+ "fieldname": "flight_price",
+ "fieldtype": "Currency",
+ "label": "Flight Price",
+ "reqd": 1
+ },
+ {
+ "fieldname": "total_amount",
+ "fieldtype": "Currency",
+ "label": "Total Amount"
+ },
+ {
+ "fieldname": "seat",
+ "fieldtype": "Data",
+ "label": "Seat",
+ "read_only": 1
+ },
+ {
+ "fieldname": "section_break_gqwg",
+ "fieldtype": "Section Break"
+ },
+ {
+ "fieldname": "column_break_izmz",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "section_break_rgek",
+ "fieldtype": "Section Break"
+ },
+ {
+ "fieldname": "column_break_fxof",
+ "fieldtype": "Column Break"
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "is_submittable": 1,
+ "links": [],
+ "modified": "2024-07-22 18:33:53.217697",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airplane Ticket",
+ "naming_rule": "Expression",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": [
+ {
+ "color": "Gray",
+ "title": "Booked"
+ },
+ {
+ "color": "Purple",
+ "title": "Checked-In"
+ },
+ {
+ "color": "Green",
+ "title": "Boarded"
+ }
+ ],
+ "track_changes": 1
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.py b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.py
new file mode 100644
index 0000000..158e9a5
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket/airplane_ticket.py
@@ -0,0 +1,43 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+import frappe
+from frappe.model.document import Document
+import random
+
+
+class AirplaneTicket(Document):
+
+ def validate(self):
+ existing_addons = set()
+ for addon in self.add_ons:
+ addon_key = (addon.item)
+ if addon_key in existing_addons:
+ frappe.throw("Duplicate add-on found. Each add-on must be unique.")
+ existing_addons.add(addon_key)
+
+ def before_validate(self):
+ if len(self.add_ons) < len(set(self.add_ons)):
+ frappe.throw("Duplicate add ons")
+ else:
+ total_addon = 0.0
+ for addon in self.add_ons:
+ total_addon = total_addon + addon.amount
+
+ self.total_amount = float(self.flight_price) + total_addon
+
+
+ def before_submit(self):
+ if self.status != 'Boarded':
+ frappe.throw("Cannot submit if flight not boarded")
+
+
+ def before_insert(self):
+ seatsArray = (("A"),("B"),("C"),("D"),("E"))
+ self.seat = f'{random.randrange(1,99)}{random.choice(seatsArray)}'
+
+
+
+
+
+
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket/test_airplane_ticket.py b/airplane_mode/airplane_mode/doctype/airplane_ticket/test_airplane_ticket.py
new file mode 100644
index 0000000..0bab219
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket/test_airplane_ticket.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirplaneTicket(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/__init__.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.js b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.js
new file mode 100644
index 0000000..8e0317f
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airplane Ticket Add-on Item", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.json b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.json
new file mode 100644
index 0000000..c5cba4c
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.json
@@ -0,0 +1,40 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "creation": "2024-07-11 14:43:59.264508",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "item",
+ "amount"
+ ],
+ "fields": [
+ {
+ "default": "0",
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "label": "Amount",
+ "non_negative": 1
+ },
+ {
+ "fieldname": "item",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Item",
+ "options": "Airplane Ticket Add-on Type",
+ "reqd": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "istable": 1,
+ "links": [],
+ "modified": "2024-07-22 19:07:25.689330",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airplane Ticket Add-on Item",
+ "owner": "Administrator",
+ "permissions": [],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.py
new file mode 100644
index 0000000..90bd999
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/airplane_ticket_add_on_item.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class AirplaneTicketAddonItem(Document):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/test_airplane_ticket_add_on_item.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/test_airplane_ticket_add_on_item.py
new file mode 100644
index 0000000..5b151a5
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_item/test_airplane_ticket_add_on_item.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirplaneTicketAddonItem(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/__init__.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.js b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.js
new file mode 100644
index 0000000..bdee2f7
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airplane Ticket Add-on Type", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.json b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.json
new file mode 100644
index 0000000..d3ca3b9
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.json
@@ -0,0 +1,44 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "autoname": "prompt",
+ "creation": "2024-07-11 14:43:04.537186",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "description"
+ ],
+ "fields": [
+ {
+ "fieldname": "description",
+ "fieldtype": "Data",
+ "label": "Description",
+ "unique": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "links": [],
+ "modified": "2024-07-22 19:01:09.410218",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airplane Ticket Add-on Type",
+ "naming_rule": "Set by user",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.py
new file mode 100644
index 0000000..ac7dbba
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/airplane_ticket_add_on_type.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class AirplaneTicketAddonType(Document):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/test_airplane_ticket_add_on_type.py b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/test_airplane_ticket_add_on_type.py
new file mode 100644
index 0000000..bc1b624
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airplane_ticket_add_on_type/test_airplane_ticket_add_on_type.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirplaneTicketAddonType(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airport/__init__.py b/airplane_mode/airplane_mode/doctype/airport/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/airport/airport.js b/airplane_mode/airplane_mode/doctype/airport/airport.js
new file mode 100644
index 0000000..1f612e3
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airport/airport.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Airport", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/airport/airport.json b/airplane_mode/airplane_mode/doctype/airport/airport.json
new file mode 100644
index 0000000..a04d08c
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airport/airport.json
@@ -0,0 +1,61 @@
+{
+ "actions": [],
+ "allow_rename": 1,
+ "autoname": "prompt",
+ "creation": "2024-06-16 11:32:11.775771",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "code",
+ "city",
+ "country"
+ ],
+ "fields": [
+ {
+ "fieldname": "code",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Code",
+ "reqd": 1
+ },
+ {
+ "fieldname": "city",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "City",
+ "reqd": 1
+ },
+ {
+ "fieldname": "country",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Country",
+ "reqd": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "links": [],
+ "modified": "2024-06-16 11:33:04.571303",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Airport",
+ "naming_rule": "Set by user",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": []
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/airport/airport.py b/airplane_mode/airplane_mode/doctype/airport/airport.py
new file mode 100644
index 0000000..57b217f
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airport/airport.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class Airport(Document):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/airport/test_airport.py b/airplane_mode/airplane_mode/doctype/airport/test_airport.py
new file mode 100644
index 0000000..b56ceb2
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/airport/test_airport.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestAirport(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/doctype/flight_passenger/__init__.py b/airplane_mode/airplane_mode/doctype/flight_passenger/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.js b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.js
new file mode 100644
index 0000000..7cbb5f1
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2024, snehalatha and contributors
+// For license information, please see license.txt
+
+// frappe.ui.form.on("Flight Passenger", {
+// refresh(frm) {
+
+// },
+// });
diff --git a/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.json b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.json
new file mode 100644
index 0000000..7af4432
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.json
@@ -0,0 +1,70 @@
+{
+ "actions": [],
+ "autoname": "autoincrement",
+ "creation": "2024-06-16 11:33:27.963861",
+ "doctype": "DocType",
+ "engine": "InnoDB",
+ "field_order": [
+ "first_name",
+ "last_name",
+ "full_name",
+ "date_of_birth"
+ ],
+ "fields": [
+ {
+ "fieldname": "first_name",
+ "fieldtype": "Data",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "in_preview": 1,
+ "in_standard_filter": 1,
+ "label": "First Name",
+ "reqd": 1
+ },
+ {
+ "fieldname": "last_name",
+ "fieldtype": "Data",
+ "label": "Last Name"
+ },
+ {
+ "fieldname": "date_of_birth",
+ "fieldtype": "Date",
+ "in_list_view": 1,
+ "label": "Date Of Birth",
+ "reqd": 1
+ },
+ {
+ "fieldname": "full_name",
+ "fieldtype": "Data",
+ "label": "Full Name",
+ "read_only": 1
+ }
+ ],
+ "index_web_pages_for_search": 1,
+ "links": [],
+ "modified": "2024-07-11 14:38:53.132726",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Flight Passenger",
+ "naming_rule": "Autoincrement",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "show_title_field_in_link": 1,
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "states": [],
+ "title_field": "full_name"
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.py b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.py
new file mode 100644
index 0000000..ff33c57
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/flight_passenger/flight_passenger.py
@@ -0,0 +1,17 @@
+# Copyright (c) 2024, snehalatha and contributors
+# For license information, please see license.txt
+
+# import frappe
+from frappe.model.document import Document
+
+
+class FlightPassenger(Document):
+
+ def before_validate(self):
+
+ if not self.last_name:
+ self.full_name = self.first_name
+ else:
+ self.full_name = f"{self.first_name} {self.last_name}"
+
+
diff --git a/airplane_mode/airplane_mode/doctype/flight_passenger/test_flight_passenger.py b/airplane_mode/airplane_mode/doctype/flight_passenger/test_flight_passenger.py
new file mode 100644
index 0000000..0344b8e
--- /dev/null
+++ b/airplane_mode/airplane_mode/doctype/flight_passenger/test_flight_passenger.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2024, snehalatha and Contributors
+# See license.txt
+
+# import frappe
+from frappe.tests.utils import FrappeTestCase
+
+
+class TestFlightPassenger(FrappeTestCase):
+ pass
diff --git a/airplane_mode/airplane_mode/notification/__init__.py b/airplane_mode/airplane_mode/notification/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/notification/flight_notification/__init__.py b/airplane_mode/airplane_mode/notification/flight_notification/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.json b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.json
new file mode 100644
index 0000000..02ed3a5
--- /dev/null
+++ b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.json
@@ -0,0 +1,30 @@
+{
+ "attach_print": 0,
+ "channel": "System Notification",
+ "condition": "doc.status == \"Scheduled\"",
+ "creation": "2024-07-22 11:42:55.357114",
+ "date_changed": "date_of_departure",
+ "days_in_advance": 1,
+ "docstatus": 0,
+ "doctype": "Notification",
+ "document_type": "Airplane Flight",
+ "enabled": 1,
+ "event": "Days Before",
+ "idx": 0,
+ "is_standard": 1,
+ "message": "Add your message here
\n",
+ "message_type": "Markdown",
+ "modified": "2024-07-22 12:21:55.059669",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "Flight Notification",
+ "owner": "Administrator",
+ "recipients": [
+ {
+ "receiver_by_document_field": "owner"
+ }
+ ],
+ "send_system_notification": 0,
+ "send_to_all_assignees": 0,
+ "subject": "Departs in 24 hours!"
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.md b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.md
new file mode 100644
index 0000000..f96f7f9
--- /dev/null
+++ b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.md
@@ -0,0 +1 @@
+Add your message here
diff --git a/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.py b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.py
new file mode 100644
index 0000000..e1ada61
--- /dev/null
+++ b/airplane_mode/airplane_mode/notification/flight_notification/flight_notification.py
@@ -0,0 +1,5 @@
+import frappe
+
+def get_context(context):
+ # do your magic here
+ pass
diff --git a/airplane_mode/airplane_mode/web_form/__init__.py b/airplane_mode/airplane_mode/web_form/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_ticket/__init__.py b/airplane_mode/airplane_mode/web_form/book_flight_ticket/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.js b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.js
new file mode 100644
index 0000000..699703c
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.js
@@ -0,0 +1,3 @@
+frappe.ready(function() {
+ // bind events here
+})
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.json b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.json
new file mode 100644
index 0000000..586040b
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.json
@@ -0,0 +1,76 @@
+{
+ "allow_comments": 0,
+ "allow_delete": 0,
+ "allow_edit": 0,
+ "allow_incomplete": 0,
+ "allow_multiple": 0,
+ "allow_print": 0,
+ "anonymous": 0,
+ "apply_document_permissions": 0,
+ "button_label": "Confirm",
+ "condition_json": "[]",
+ "creation": "2024-07-21 23:34:32.914741",
+ "doc_type": "Airplane Ticket",
+ "docstatus": 0,
+ "doctype": "Web Form",
+ "idx": 0,
+ "introduction_text": "",
+ "is_standard": 1,
+ "list_columns": [],
+ "login_required": 0,
+ "max_attachment_size": 0,
+ "modified": "2024-07-21 23:48:46.923992",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "book-flight-ticket",
+ "owner": "Administrator",
+ "published": 1,
+ "route": "book-flight-ticket-web-form",
+ "show_attachments": 0,
+ "show_list": 0,
+ "show_sidebar": 0,
+ "title": "Book Flight Ticket Web Form",
+ "web_form_fields": [
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "passenger",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Passenger",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "Flight Passenger",
+ "precision": "",
+ "read_only": 0,
+ "reqd": 1,
+ "show_in_filter": 0
+ },
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "flight",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Flight",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "Airplane Flight",
+ "precision": "",
+ "read_only": 0,
+ "reqd": 1,
+ "show_in_filter": 0
+ },
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "flight_price",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "label": "Flight Price",
+ "max_length": 0,
+ "max_value": 0,
+ "precision": "",
+ "read_only": 1,
+ "reqd": 1,
+ "show_in_filter": 0
+ }
+ ]
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.py b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.py
new file mode 100644
index 0000000..e1ada61
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_ticket/book_flight_ticket.py
@@ -0,0 +1,5 @@
+import frappe
+
+def get_context(context):
+ # do your magic here
+ pass
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/__init__.py b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.js b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.js
new file mode 100644
index 0000000..699703c
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.js
@@ -0,0 +1,3 @@
+frappe.ready(function() {
+ // bind events here
+})
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.json b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.json
new file mode 100644
index 0000000..c8cf750
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.json
@@ -0,0 +1,76 @@
+{
+ "allow_comments": 0,
+ "allow_delete": 0,
+ "allow_edit": 0,
+ "allow_incomplete": 0,
+ "allow_multiple": 0,
+ "allow_print": 0,
+ "anonymous": 0,
+ "apply_document_permissions": 0,
+ "button_label": "Confirm",
+ "condition_json": "[]",
+ "creation": "2024-07-22 10:14:53.077024",
+ "doc_type": "Airplane Ticket",
+ "docstatus": 0,
+ "doctype": "Web Form",
+ "idx": 0,
+ "introduction_text": "",
+ "is_standard": 1,
+ "list_columns": [],
+ "login_required": 0,
+ "max_attachment_size": 0,
+ "modified": "2024-07-23 10:50:44.460752",
+ "modified_by": "Administrator",
+ "module": "Airplane mode",
+ "name": "book-flight-tickets-web-form",
+ "owner": "Administrator",
+ "published": 1,
+ "route": "book-flight-tickets-web-form",
+ "show_attachments": 0,
+ "show_list": 0,
+ "show_sidebar": 0,
+ "title": "Book Flight Tickets Web form",
+ "web_form_fields": [
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "passenger",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Passenger",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "Flight Passenger",
+ "precision": "",
+ "read_only": 0,
+ "reqd": 1,
+ "show_in_filter": 0
+ },
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "flight",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "label": "Flight",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "Airplane Flight",
+ "precision": "",
+ "read_only": 0,
+ "reqd": 1,
+ "show_in_filter": 0
+ },
+ {
+ "allow_read_on_all_link_options": 0,
+ "fieldname": "flight_price",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "label": "Flight Price",
+ "max_length": 0,
+ "max_value": 0,
+ "precision": "",
+ "read_only": 1,
+ "reqd": 0,
+ "show_in_filter": 0
+ }
+ ]
+}
\ No newline at end of file
diff --git a/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.py b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.py
new file mode 100644
index 0000000..e1ada61
--- /dev/null
+++ b/airplane_mode/airplane_mode/web_form/book_flight_tickets_web_form/book_flight_tickets_web_form.py
@@ -0,0 +1,5 @@
+import frappe
+
+def get_context(context):
+ # do your magic here
+ pass
diff --git a/airplane_mode/www/show-me.html b/airplane_mode/www/show-me.html
new file mode 100644
index 0000000..fe91a91
--- /dev/null
+++ b/airplane_mode/www/show-me.html
@@ -0,0 +1,24 @@
+
+
+{% block page_content %}
+
+
+
+
+
+ Show Colored Rectangle
+
+
+
+
+
+
+
+
+{% endblock %}
diff --git a/airplane_mode/www/show-me.py b/airplane_mode/www/show-me.py
new file mode 100644
index 0000000..4a25b6e
--- /dev/null
+++ b/airplane_mode/www/show-me.py
@@ -0,0 +1,7 @@
+import frappe
+from frappe.website.render import render
+
+def get_context(context):
+ # Get the color query parameter from the request
+ color = frappe.form_dict.get('color')
+ context.color = color
\ No newline at end of file