errors on the ticket - Initial Deployment
Browse filesFiles changed (2)
- README.md+7-5
- index.html+1177-19
12345678910---title: Receiptemoji: 😻colorFrom: bluecolorTo: indigosdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: receiptemoji: 🐳colorFrom: redcolorTo: graysdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Universal Ticket & Receipt Generator</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');body {font-family: 'Roboto', sans-serif;background-color: #f3f4f6;}.receipt-font {font-family: 'Roboto Mono', monospace;}.ticket-paper {background: repeating-linear-gradient(to bottom,#fff,#fff 24px,#e5e7eb 24px,#e5e7eb 25px);}.ticket-cut {position: relative;}.ticket-cut::before, .ticket-cut::after {content: "";position: absolute;height: 20px;width: 20px;background-color: #f3f4f6;border-radius: 50%;}.ticket-cut::before {top: -10px;left: -10px;}.ticket-cut::after {top: -10px;right: -10px;}.receipt-shadow {box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);}@media print {.no-print {display: none !important;}body {background-color: white;}.ticket-paper {background: white;box-shadow: none;}}</style></head><body class="min-h-screen bg-gray-100"><div class="container mx-auto px-4 py-8"><header class="text-center mb-10"><h1 class="text-4xl font-bold text-indigo-700 mb-2">Universal Ticket Generator</h1><p class="text-gray-600">Create professional tickets and receipts for any purpose</p></header><div class="grid grid-cols-1 lg:grid-cols-3 gap-8"><!-- Form Section --><div class="lg:col-span-1 bg-white rounded-xl shadow-md p-6 no-print"><h2 class="text-2xl font-semibold text-gray-800 mb-6">Ticket Details</h2><div class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Ticket Type</label><select id="ticketType" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"><option value="airline">Airline Ticket</option><option value="bus">Bus Ticket</option><option value="train">Train Ticket</option><option value="taxi">Taxi Receipt</option><option value="event">Event Ticket</option><option value="hotel">Hotel Receipt</option><option value="parking">Parking Ticket</option><option value="movie">Movie Ticket</option><option value="generic">Generic Receipt</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Currency</label><select id="currency" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"><option value="USD">US Dollar ($)</option><option value="EUR">Euro (€)</option><option value="GBP">British Pound (£)</option><option value="JPY">Japanese Yen (¥)</option><option value="CAD">Canadian Dollar (C$)</option><option value="AUD">Australian Dollar (A$)</option><option value="CNY">Chinese Yuan (¥)</option><option value="INR">Indian Rupee (₹)</option><option value="BRL">Brazilian Real (R$)</option><option value="KES">Kenyan Shilling (KSh)</option></select></div><div id="airlineFields"><div class="grid grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Passenger Name</label><input type="text" id="passengerName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Flight Number</label><input type="text" id="flightNumber" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">From</label><input type="text" id="departureCity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">To</label><input type="text" id="arrivalCity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Departure Date</label><input type="datetime-local" id="departureDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Arrival Date</label><input type="datetime-local" id="arrivalDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Seat Number</label><input type="text" id="seatNumber" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Gate</label><input type="text" id="gate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="mt-4"><label class="block text-sm font-medium text-gray-700 mb-1">Price</label><input type="number" id="price" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div id="busFields" class="hidden"><div class="grid grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Passenger Name</label><input type="text" id="busPassengerName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Bus Number</label><input type="text" id="busNumber" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">From</label><input type="text" id="busDepartureCity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">To</label><input type="text" id="busArrivalCity" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Departure Date</label><input type="datetime-local" id="busDepartureDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Arrival Date</label><input type="datetime-local" id="busArrivalDate" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="mt-4"><label class="block text-sm font-medium text-gray-700 mb-1">Seat Number</label><input type="text" id="busSeatNumber" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div class="mt-4"><label class="block text-sm font-medium text-gray-700 mb-1">Price</label><input type="number" id="busPrice" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div id="taxiFields" class="hidden"><div class="grid grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Passenger Name</label><input type="text" id="taxiPassengerName" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Taxi Number</label><input type="text" id="taxiNumber" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Pickup Location</label><input type="text" id="pickupLocation" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Drop Location</label><input type="text" id="dropLocation" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="grid grid-cols-2 gap-4 mt-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Pickup Time</label><input type="datetime-local" id="pickupTime" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Drop Time</label><input type="datetime-local" id="dropTime" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="mt-4"><label class="block text-sm font-medium text-gray-700 mb-1">Distance (km)</label><input type="number" id="distance" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div><div class="mt-4"><label class="block text-sm font-medium text-gray-700 mb-1">Fare</label><input type="number" id="taxiFare" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"></div></div><div class="mt-6"><button id="generateBtn" class="w-full bg-indigo-600 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Generate Ticket</button></div><div class="mt-4"><button id="printBtn" class="w-full bg-gray-600 text-white py-2 px-4 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 no-print">Print Ticket</button></div></div></div><!-- Preview Section --><div class="lg:col-span-2"><div class="bg-white rounded-xl shadow-md p-6 mb-6 no-print"><h2 class="text-2xl font-semibold text-gray-800 mb-4">Ticket Preview</h2><p class="text-gray-600">Your generated ticket will appear here</p></div><!-- Ticket Display Area --><div id="ticketDisplay" class="flex justify-center"><!-- Default airline ticket will be shown here --><div id="airlineTicket" class="bg-white ticket-paper p-6 rounded-lg w-full max-w-md receipt-shadow receipt-font ticket-cut"><div class="absolute -top-1 left-0 right-0 h-1 bg-gray-200"></div><div class="flex justify-center mb-2"><div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center text-gray-500"><i class="fas fa-plane text-xl"></i></div></div><div class="flex justify-between items-center mb-4"><div class="text-2xl font-bold text-indigo-700">AIRLINE TICKET</div><div class="text-sm text-gray-500">BOARDING PASS</div></div><div class="border-t-2 border-b-2 border-dashed border-gray-300 py-3 my-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">PASSENGER</div><div class="font-bold">John Doe</div></div><div><div class="text-xs text-gray-500">FLIGHT</div><div class="font-bold">AA 1234</div></div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">FROM</div><div class="font-bold">New York (JFK)</div></div><div><div class="text-xs text-gray-500">TO</div><div class="font-bold">London (LHR)</div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">DEPARTURE</div><div class="font-bold">15 May 2023</div><div class="text-sm">10:30 AM</div></div><div><div class="text-xs text-gray-500">ARRIVAL</div><div class="font-bold">15 May 2023</div><div class="text-sm">10:30 PM</div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">SEAT</div><div class="font-bold">23A</div></div><div><div class="text-xs text-gray-500">GATE</div><div class="font-bold">B12</div></div></div><div class="border-t-2 border-gray-300 pt-3 mt-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">TOTAL</div><div class="font-bold text-xl">$450.00</div></div><div class="text-right"><div class="text-xs text-gray-500">TICKET NUMBER</div><div class="font-bold">TK12345678</div></div></div></div><div class="mt-6 flex justify-center"><div class="h-16 w-48 bg-gray-100 flex items-center justify-center"><span class="text-xs text-gray-500">BARCODE</span></div></div><div class="mt-4 h-24 bg-gray-100 rounded flex items-center justify-center mb-4"><span class="text-xs text-gray-500">ROUTE MAP</span></div><div class="grid grid-cols-3 gap-2 mt-4 mb-4 text-xs"><div class="bg-gray-100 p-2 rounded text-center"><div>Base Fare</div><div class="font-bold">${currencySymbol}5.00</div></div><div class="bg-gray-100 p-2 rounded text-center"><div>Per Km</div><div class="font-bold">${currencySymbol}2.50</div></div><div class="bg-gray-100 p-2 rounded text-center"><div>Wait Time</div><div class="font-bold">${currencySymbol}0.50/min</div></div></div><div class="mt-4 text-center text-xs text-gray-500"><div>Thank you for flying with us!</div><div class="mt-1">Present this boarding pass at the gate</div></div></div><!-- Bus ticket template (hidden by default) --><div id="busTicket" class="hidden bg-white ticket-paper p-6 rounded-lg w-full max-w-md receipt-shadow receipt-font ticket-cut"><div class="absolute -top-1 left-0 right-0 h-1 bg-gray-200"></div><div class="flex justify-center mb-2"><div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center text-gray-500"><i class="fas fa-bus text-xl"></i></div></div><div class="text-center mb-4"><div class="text-2xl font-bold text-indigo-700">BUS TICKET</div><div class="text-sm text-gray-500">TRAVEL PASS</div></div><div class="border-t-2 border-b-2 border-dashed border-gray-300 py-3 my-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">PASSENGER</div><div class="font-bold">John Doe</div></div><div><div class="text-xs text-gray-500">BUS</div><div class="font-bold">Greyhound 5678</div></div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">FROM</div><div class="font-bold">New York</div></div><div><div class="text-xs text-gray-500">TO</div><div class="font-bold">Boston</div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">DEPARTURE</div><div class="font-bold">15 May 2023</div><div class="text-sm">8:00 AM</div></div><div><div class="text-xs text-gray-500">ARRIVAL</div><div class="font-bold">15 May 2023</div><div class="text-sm">12:30 PM</div></div></div><div class="mb-4"><div class="text-xs text-gray-500">SEAT</div><div class="font-bold">12</div></div><div class="border-t-2 border-gray-300 pt-3 mt-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">TOTAL</div><div class="font-bold text-xl">$35.00</div></div><div class="text-right"><div class="text-xs text-gray-500">TICKET NUMBER</div><div class="font-bold">BT98765432</div></div></div></div><div class="mt-4 text-center text-xs text-gray-500"><div>Thank you for traveling with us!</div><div class="mt-1">Present this ticket to the driver</div></div></div><!-- Taxi receipt template (hidden by default) --><div id="taxiReceipt" class="hidden bg-white ticket-paper p-6 rounded-lg w-full max-w-md receipt-shadow receipt-font"><div class="flex justify-center mb-2"><div class="h-12 w-12 bg-gray-200 rounded-full flex items-center justify-center text-gray-500"><i class="fas fa-taxi text-xl"></i></div></div><div class="text-center mb-4"><div class="text-2xl font-bold text-indigo-700">TAXI RECEIPT</div><div class="text-sm text-gray-500">CITY CAB SERVICE</div></div><div class="border-t-2 border-b-2 border-dashed border-gray-300 py-3 my-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">PASSENGER</div><div class="font-bold">John Doe</div></div><div><div class="text-xs text-gray-500">TAXI #</div><div class="font-bold">NYC 5678</div></div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">PICKUP</div><div class="font-bold">Times Square</div></div><div><div class="text-xs text-gray-500">DROP</div><div class="font-bold">JFK Airport</div></div></div><div class="grid grid-cols-2 gap-4 mb-4"><div><div class="text-xs text-gray-500">PICKUP TIME</div><div class="font-bold">15 May 2023</div><div class="text-sm">6:30 AM</div></div><div><div class="text-xs text-gray-500">DROP TIME</div><div class="font-bold">15 May 2023</div><div class="text-sm">7:15 AM</div></div></div><div class="mb-4"><div class="text-xs text-gray-500">DISTANCE</div><div class="font-bold">18.5 km</div></div><div class="border-t-2 border-gray-300 pt-3 mt-3"><div class="flex justify-between items-center"><div><div class="text-xs text-gray-500">FARE</div><div class="font-bold text-xl">$42.50</div></div><div class="text-right"><div class="text-xs text-gray-500">RECEIPT #</div><div class="font-bold">TX12345678</div></div></div></div><div class="mt-4 text-center text-xs text-gray-500"><div>Thank you for choosing our service!</div><div class="mt-1">Drive safely!</div></div></div></div></div></div></div><script>document.addEventListener('DOMContentLoaded', function() {// Get all elementsconst ticketType = document.getElementById('ticketType');const currency = document.getElementById('currency');const generateBtn = document.getElementById('generateBtn');const printBtn = document.getElementById('printBtn');// Ticket type fieldsconst airlineFields = document.getElementById('airlineFields');const busFields = document.getElementById('busFields');const taxiFields = document.getElementById('taxiFields');// Ticket display templatesconst airlineTicket = document.getElementById('airlineTicket');const busTicket = document.getElementById('busTicket');const taxiReceipt = document.getElementById('taxiReceipt');// Show/hide fields based on ticket typeticketType.addEventListener('change', function() {const type = this.value;// Hide all fields firstairlineFields.classList.add('hidden');busFields.classList.add('hidden');taxiFields.classList.add('hidden');// Hide all ticket templatesairlineTicket.classList.add('hidden');busTicket.classList.add('hidden');taxiReceipt.classList.add('hidden');// Show the selected fields and templateairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');} else if (type === 'bus') {busFields.classList.remove('hidden');busTicket.classList.remove('hidden');} else if (type === 'taxi') {taxiFields.classList.remove('hidden');taxiReceipt.classList.remove('hidden');}});// Generate ticketgenerateBtn.addEventListener('click', function() {const type = ticketType.value;const selectedCurrency = currency.value;let currencySymbol = '$';// Set currency symbolswitch(selectedCurrency) {case 'EUR': currencySymbol = '€'; break;case 'GBP': currencySymbol = '£'; break;case 'JPY': currencySymbol = '¥'; break;case 'CAD': currencySymbol = 'C$'; break;case 'AUD': currencySymbol = 'A$'; break;case 'CNY': currencySymbol = '¥'; break;case 'INR': currencySymbol = '₹'; break;case 'BRL': currencySymbol = 'R }// Get airline ticket dataconst passengerName = document.getElementById('passengerName').value || 'John Doe';const flightNumber = document.getElementById('flightNumber').value || 'AA 1234';const departureCity = document.getElementById('departureCity').value || 'New York (JFK)';const arrivalCity = document.getElementById('arrivalCity').value || 'London (LHR)';const departureDate = document.getElementById('departureDate').value || '2023-05-15T10:30';const arrivalDate = document.getElementById('arrivalDate').value || '2023-05-15T22:30';const seatNumber = document.getElementById('seatNumber').value || '23A';const gate = document.getElementById('gate').value || 'B12';const price = document.getElementById('price').value || '450.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update airline ticketairlineTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;airlineTicket.querySelector('.font-bold:nth-child(4)').textContent = flightNumber;airlineTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;airlineTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;airlineTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;airlineTicket.querySelectorAll('.font-bold')[7].textContent = gate;airlineTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'TK' + Math.floor(10000000 + Math.random() * 90000000);airlineTicket.querySelectorAll('.font-bold')[8].textContent = ticketNumber;} else if (type === 'bus') {// Get bus ticket dataconst passengerName = document.getElementById('busPassengerName').value || 'John Doe';const busNumber = document.getElementById('busNumber').value || 'Greyhound 5678';const departureCity = document.getElementById('busDepartureCity').value || 'New York';const arrivalCity = document.getElementById('busArrivalCity').value || 'Boston';const departureDate = document.getElementById('busDepartureDate').value || '2023-05-15T08:00';const arrivalDate = document.getElementById('busArrivalDate').value || '2023-05-15T12:30';const seatNumber = document.getElementById('busSeatNumber').value || '12';const price = document.getElementById('busPrice').value || '35.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update bus ticketbusTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;busTicket.querySelector('.font-bold:nth-child(4)').textContent = busNumber;busTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;busTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;busTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;busTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'BT' + Math.floor(10000000 + Math.random() * 90000000);busTicket.querySelectorAll('.font-bold')[7].textContent = ticketNumber;} else if (type === 'taxi') {// Get taxi receipt dataconst passengerName = document.getElementById('taxiPassengerName').value || 'John Doe';const taxiNumber = document.getElementById('taxiNumber').value || 'NYC 5678';const pickupLocation = document.getElementById('pickupLocation').value || 'Times Square';const dropLocation = document.getElementById('dropLocation').value || 'JFK Airport';const pickupTime = document.getElementById('pickupTime').value || '2023-05-15T06:30';const dropTime = document.getElementById('dropTime').value || '2023-05-15T07:15';const distance = document.getElementById('distance').value || '18.5';const fare = document.getElementById('taxiFare').value || '42.50';// Format datesconst pickTime = new Date(pickupTime);const dropT = new Date(dropTime);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update taxi receipttaxiReceipt.querySelector('.font-bold:nth-child(2)').textContent = passengerName;taxiReceipt.querySelector('.font-bold:nth-child(4)').textContent = taxiNumber;taxiReceipt.querySelectorAll('.font-bold')[2].textContent = pickupLocation;taxiReceipt.querySelectorAll('.font-bold')[3].textContent = dropLocation;taxiReceipt.querySelectorAll('.font-bold')[4].textContent = pickTime.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[0].textContent = pickTime.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[5].textContent = dropT.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[1].textContent = dropT.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[6].textContent = distance + ' km';taxiReceipt.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(fare).toFixed(2)}`;// Generate random receipt numberconst receiptNumber = 'TX' + Math.floor(10000000 + Math.random() * 90000000);taxiReceipt.querySelectorAll('.font-bold')[7].textContent = receiptNumber;}});// Print ticketprintBtn.addEventListener('click', function() {window.print();});// Initialize with airline ticketairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Musalia/receipt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>; break;case 'KES': currencySymbol = 'KSh'; break;default: currencySymbol = 'if (type === 'airline') {// Get airline ticket dataconst passengerName = document.getElementById('passengerName').value || 'John Doe';const flightNumber = document.getElementById('flightNumber').value || 'AA 1234';const departureCity = document.getElementById('departureCity').value || 'New York (JFK)';const arrivalCity = document.getElementById('arrivalCity').value || 'London (LHR)';const departureDate = document.getElementById('departureDate').value || '2023-05-15T10:30';const arrivalDate = document.getElementById('arrivalDate').value || '2023-05-15T22:30';const seatNumber = document.getElementById('seatNumber').value || '23A';const gate = document.getElementById('gate').value || 'B12';const price = document.getElementById('price').value || '450.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update airline ticketairlineTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;airlineTicket.querySelector('.font-bold:nth-child(4)').textContent = flightNumber;airlineTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;airlineTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;airlineTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;airlineTicket.querySelectorAll('.font-bold')[7].textContent = gate;airlineTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'TK' + Math.floor(10000000 + Math.random() * 90000000);airlineTicket.querySelectorAll('.font-bold')[8].textContent = ticketNumber;} else if (type === 'bus') {// Get bus ticket dataconst passengerName = document.getElementById('busPassengerName').value || 'John Doe';const busNumber = document.getElementById('busNumber').value || 'Greyhound 5678';const departureCity = document.getElementById('busDepartureCity').value || 'New York';const arrivalCity = document.getElementById('busArrivalCity').value || 'Boston';const departureDate = document.getElementById('busDepartureDate').value || '2023-05-15T08:00';const arrivalDate = document.getElementById('busArrivalDate').value || '2023-05-15T12:30';const seatNumber = document.getElementById('busSeatNumber').value || '12';const price = document.getElementById('busPrice').value || '35.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update bus ticketbusTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;busTicket.querySelector('.font-bold:nth-child(4)').textContent = busNumber;busTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;busTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;busTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;busTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'BT' + Math.floor(10000000 + Math.random() * 90000000);busTicket.querySelectorAll('.font-bold')[7].textContent = ticketNumber;} else if (type === 'taxi') {// Get taxi receipt dataconst passengerName = document.getElementById('taxiPassengerName').value || 'John Doe';const taxiNumber = document.getElementById('taxiNumber').value || 'NYC 5678';const pickupLocation = document.getElementById('pickupLocation').value || 'Times Square';const dropLocation = document.getElementById('dropLocation').value || 'JFK Airport';const pickupTime = document.getElementById('pickupTime').value || '2023-05-15T06:30';const dropTime = document.getElementById('dropTime').value || '2023-05-15T07:15';const distance = document.getElementById('distance').value || '18.5';const fare = document.getElementById('taxiFare').value || '42.50';// Format datesconst pickTime = new Date(pickupTime);const dropT = new Date(dropTime);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update taxi receipttaxiReceipt.querySelector('.font-bold:nth-child(2)').textContent = passengerName;taxiReceipt.querySelector('.font-bold:nth-child(4)').textContent = taxiNumber;taxiReceipt.querySelectorAll('.font-bold')[2].textContent = pickupLocation;taxiReceipt.querySelectorAll('.font-bold')[3].textContent = dropLocation;taxiReceipt.querySelectorAll('.font-bold')[4].textContent = pickTime.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[0].textContent = pickTime.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[5].textContent = dropT.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[1].textContent = dropT.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[6].textContent = distance + ' km';taxiReceipt.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(fare).toFixed(2)}`;// Generate random receipt numberconst receiptNumber = 'TX' + Math.floor(10000000 + Math.random() * 90000000);taxiReceipt.querySelectorAll('.font-bold')[7].textContent = receiptNumber;}});// Print ticketprintBtn.addEventListener('click', function() {window.print();});// Initialize with airline ticketairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');});</script></body></html>;}if (type === 'airline') {// Get airline ticket dataconst passengerName = document.getElementById('passengerName').value || 'John Doe';const flightNumber = document.getElementById('flightNumber').value || 'AA 1234';const departureCity = document.getElementById('departureCity').value || 'New York (JFK)';const arrivalCity = document.getElementById('arrivalCity').value || 'London (LHR)';const departureDate = document.getElementById('departureDate').value || '2023-05-15T10:30';const arrivalDate = document.getElementById('arrivalDate').value || '2023-05-15T22:30';const seatNumber = document.getElementById('seatNumber').value || '23A';const gate = document.getElementById('gate').value || 'B12';const price = document.getElementById('price').value || '450.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update airline ticketairlineTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;airlineTicket.querySelector('.font-bold:nth-child(4)').textContent = flightNumber;airlineTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;airlineTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;airlineTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;airlineTicket.querySelectorAll('.font-bold')[7].textContent = gate;airlineTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'TK' + Math.floor(10000000 + Math.random() * 90000000);airlineTicket.querySelectorAll('.font-bold')[8].textContent = ticketNumber;} else if (type === 'bus') {// Get bus ticket dataconst passengerName = document.getElementById('busPassengerName').value || 'John Doe';const busNumber = document.getElementById('busNumber').value || 'Greyhound 5678';const departureCity = document.getElementById('busDepartureCity').value || 'New York';const arrivalCity = document.getElementById('busArrivalCity').value || 'Boston';const departureDate = document.getElementById('busDepartureDate').value || '2023-05-15T08:00';const arrivalDate = document.getElementById('busArrivalDate').value || '2023-05-15T12:30';const seatNumber = document.getElementById('busSeatNumber').value || '12';const price = document.getElementById('busPrice').value || '35.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update bus ticketbusTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;busTicket.querySelector('.font-bold:nth-child(4)').textContent = busNumber;busTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;busTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;busTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;busTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'BT' + Math.floor(10000000 + Math.random() * 90000000);busTicket.querySelectorAll('.font-bold')[7].textContent = ticketNumber;} else if (type === 'taxi') {// Get taxi receipt dataconst passengerName = document.getElementById('taxiPassengerName').value || 'John Doe';const taxiNumber = document.getElementById('taxiNumber').value || 'NYC 5678';const pickupLocation = document.getElementById('pickupLocation').value || 'Times Square';const dropLocation = document.getElementById('dropLocation').value || 'JFK Airport';const pickupTime = document.getElementById('pickupTime').value || '2023-05-15T06:30';const dropTime = document.getElementById('dropTime').value || '2023-05-15T07:15';const distance = document.getElementById('distance').value || '18.5';const fare = document.getElementById('taxiFare').value || '42.50';// Format datesconst pickTime = new Date(pickupTime);const dropT = new Date(dropTime);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update taxi receipttaxiReceipt.querySelector('.font-bold:nth-child(2)').textContent = passengerName;taxiReceipt.querySelector('.font-bold:nth-child(4)').textContent = taxiNumber;taxiReceipt.querySelectorAll('.font-bold')[2].textContent = pickupLocation;taxiReceipt.querySelectorAll('.font-bold')[3].textContent = dropLocation;taxiReceipt.querySelectorAll('.font-bold')[4].textContent = pickTime.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[0].textContent = pickTime.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[5].textContent = dropT.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[1].textContent = dropT.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[6].textContent = distance + ' km';taxiReceipt.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(fare).toFixed(2)}`;// Generate random receipt numberconst receiptNumber = 'TX' + Math.floor(10000000 + Math.random() * 90000000);taxiReceipt.querySelectorAll('.font-bold')[7].textContent = receiptNumber;}});// Print ticketprintBtn.addEventListener('click', function() {window.print();});// Initialize with airline ticketairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');});</script></body></html>;}if (type === 'airline') {// Get airline ticket dataconst passengerName = document.getElementById('passengerName').value || 'John Doe';const flightNumber = document.getElementById('flightNumber').value || 'AA 1234';const departureCity = document.getElementById('departureCity').value || 'New York (JFK)';const arrivalCity = document.getElementById('arrivalCity').value || 'London (LHR)';const departureDate = document.getElementById('departureDate').value || '2023-05-15T10:30';const arrivalDate = document.getElementById('arrivalDate').value || '2023-05-15T22:30';const seatNumber = document.getElementById('seatNumber').value || '23A';const gate = document.getElementById('gate').value || 'B12';const price = document.getElementById('price').value || '450.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update airline ticketairlineTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;airlineTicket.querySelector('.font-bold:nth-child(4)').textContent = flightNumber;airlineTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;airlineTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;airlineTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;airlineTicket.querySelectorAll('.font-bold')[7].textContent = gate;airlineTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'TK' + Math.floor(10000000 + Math.random() * 90000000);airlineTicket.querySelectorAll('.font-bold')[8].textContent = ticketNumber;} else if (type === 'bus') {// Get bus ticket dataconst passengerName = document.getElementById('busPassengerName').value || 'John Doe';const busNumber = document.getElementById('busNumber').value || 'Greyhound 5678';const departureCity = document.getElementById('busDepartureCity').value || 'New York';const arrivalCity = document.getElementById('busArrivalCity').value || 'Boston';const departureDate = document.getElementById('busDepartureDate').value || '2023-05-15T08:00';const arrivalDate = document.getElementById('busArrivalDate').value || '2023-05-15T12:30';const seatNumber = document.getElementById('busSeatNumber').value || '12';const price = document.getElementById('busPrice').value || '35.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update bus ticketbusTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;busTicket.querySelector('.font-bold:nth-child(4)').textContent = busNumber;busTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;busTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;busTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;busTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'BT' + Math.floor(10000000 + Math.random() * 90000000);busTicket.querySelectorAll('.font-bold')[7].textContent = ticketNumber;} else if (type === 'taxi') {// Get taxi receipt dataconst passengerName = document.getElementById('taxiPassengerName').value || 'John Doe';const taxiNumber = document.getElementById('taxiNumber').value || 'NYC 5678';const pickupLocation = document.getElementById('pickupLocation').value || 'Times Square';const dropLocation = document.getElementById('dropLocation').value || 'JFK Airport';const pickupTime = document.getElementById('pickupTime').value || '2023-05-15T06:30';const dropTime = document.getElementById('dropTime').value || '2023-05-15T07:15';const distance = document.getElementById('distance').value || '18.5';const fare = document.getElementById('taxiFare').value || '42.50';// Format datesconst pickTime = new Date(pickupTime);const dropT = new Date(dropTime);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update taxi receipttaxiReceipt.querySelector('.font-bold:nth-child(2)').textContent = passengerName;taxiReceipt.querySelector('.font-bold:nth-child(4)').textContent = taxiNumber;taxiReceipt.querySelectorAll('.font-bold')[2].textContent = pickupLocation;taxiReceipt.querySelectorAll('.font-bold')[3].textContent = dropLocation;taxiReceipt.querySelectorAll('.font-bold')[4].textContent = pickTime.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[0].textContent = pickTime.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[5].textContent = dropT.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[1].textContent = dropT.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[6].textContent = distance + ' km';taxiReceipt.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(fare).toFixed(2)}`;// Generate random receipt numberconst receiptNumber = 'TX' + Math.floor(10000000 + Math.random() * 90000000);taxiReceipt.querySelectorAll('.font-bold')[7].textContent = receiptNumber;}});// Print ticketprintBtn.addEventListener('click', function() {window.print();});// Initialize with airline ticketairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');});</script></body></html>;}if (type === 'airline') {// Get airline ticket dataconst passengerName = document.getElementById('passengerName').value || 'John Doe';const flightNumber = document.getElementById('flightNumber').value || 'AA 1234';const departureCity = document.getElementById('departureCity').value || 'New York (JFK)';const arrivalCity = document.getElementById('arrivalCity').value || 'London (LHR)';const departureDate = document.getElementById('departureDate').value || '2023-05-15T10:30';const arrivalDate = document.getElementById('arrivalDate').value || '2023-05-15T22:30';const seatNumber = document.getElementById('seatNumber').value || '23A';const gate = document.getElementById('gate').value || 'B12';const price = document.getElementById('price').value || '450.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update airline ticketairlineTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;airlineTicket.querySelector('.font-bold:nth-child(4)').textContent = flightNumber;airlineTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;airlineTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;airlineTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);airlineTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);airlineTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;airlineTicket.querySelectorAll('.font-bold')[7].textContent = gate;airlineTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'TK' + Math.floor(10000000 + Math.random() * 90000000);airlineTicket.querySelectorAll('.font-bold')[8].textContent = ticketNumber;} else if (type === 'bus') {// Get bus ticket dataconst passengerName = document.getElementById('busPassengerName').value || 'John Doe';const busNumber = document.getElementById('busNumber').value || 'Greyhound 5678';const departureCity = document.getElementById('busDepartureCity').value || 'New York';const arrivalCity = document.getElementById('busArrivalCity').value || 'Boston';const departureDate = document.getElementById('busDepartureDate').value || '2023-05-15T08:00';const arrivalDate = document.getElementById('busArrivalDate').value || '2023-05-15T12:30';const seatNumber = document.getElementById('busSeatNumber').value || '12';const price = document.getElementById('busPrice').value || '35.00';// Format datesconst depDate = new Date(departureDate);const arrDate = new Date(arrivalDate);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update bus ticketbusTicket.querySelector('.font-bold:nth-child(2)').textContent = passengerName;busTicket.querySelector('.font-bold:nth-child(4)').textContent = busNumber;busTicket.querySelectorAll('.font-bold')[2].textContent = departureCity;busTicket.querySelectorAll('.font-bold')[3].textContent = arrivalCity;busTicket.querySelectorAll('.font-bold')[4].textContent = depDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[0].textContent = depDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[5].textContent = arrDate.toLocaleDateString('en-US', options);busTicket.querySelectorAll('.text-sm')[1].textContent = arrDate.toLocaleTimeString('en-US', timeOptions);busTicket.querySelectorAll('.font-bold')[6].textContent = seatNumber;busTicket.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(price).toFixed(2)}`;// Generate random ticket numberconst ticketNumber = 'BT' + Math.floor(10000000 + Math.random() * 90000000);busTicket.querySelectorAll('.font-bold')[7].textContent = ticketNumber;} else if (type === 'taxi') {// Get taxi receipt dataconst passengerName = document.getElementById('taxiPassengerName').value || 'John Doe';const taxiNumber = document.getElementById('taxiNumber').value || 'NYC 5678';const pickupLocation = document.getElementById('pickupLocation').value || 'Times Square';const dropLocation = document.getElementById('dropLocation').value || 'JFK Airport';const pickupTime = document.getElementById('pickupTime').value || '2023-05-15T06:30';const dropTime = document.getElementById('dropTime').value || '2023-05-15T07:15';const distance = document.getElementById('distance').value || '18.5';const fare = document.getElementById('taxiFare').value || '42.50';// Format datesconst pickTime = new Date(pickupTime);const dropT = new Date(dropTime);const options = { year: 'numeric', month: 'short', day: 'numeric' };const timeOptions = { hour: '2-digit', minute: '2-digit' };// Update taxi receipttaxiReceipt.querySelector('.font-bold:nth-child(2)').textContent = passengerName;taxiReceipt.querySelector('.font-bold:nth-child(4)').textContent = taxiNumber;taxiReceipt.querySelectorAll('.font-bold')[2].textContent = pickupLocation;taxiReceipt.querySelectorAll('.font-bold')[3].textContent = dropLocation;taxiReceipt.querySelectorAll('.font-bold')[4].textContent = pickTime.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[0].textContent = pickTime.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[5].textContent = dropT.toLocaleDateString('en-US', options);taxiReceipt.querySelectorAll('.text-sm')[1].textContent = dropT.toLocaleTimeString('en-US', timeOptions);taxiReceipt.querySelectorAll('.font-bold')[6].textContent = distance + ' km';taxiReceipt.querySelector('.text-xl').textContent = `${currencySymbol}${parseFloat(fare).toFixed(2)}`;// Generate random receipt numberconst receiptNumber = 'TX' + Math.floor(10000000 + Math.random() * 90000000);taxiReceipt.querySelectorAll('.font-bold')[7].textContent = receiptNumber;}});// Print ticketprintBtn.addEventListener('click', function() {window.print();});// Initialize with airline ticketairlineFields.classList.remove('hidden');airlineTicket.classList.remove('hidden');});</script></body></html>
README.md+7-5
index.html+1177-19