-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProject of Hotel management.py
2301 lines (2123 loc) · 108 KB
/
Project of Hotel management.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# THIS IS A PROGRAM OF HOTEL MANAGEMENT SYSTEM
# IMPORT ALL EXTERNAL LIBRARIES
import mysql.connector as mysqlt
import datetime
from datetime import date
import random
import PIL.Image
from PIL import Image
import tkinter.ttk as ttk
from tkinter import *
from plyer import notification
from tkinter import messagebox
from tabulate import tabulate
import matplotlib.pyplot as plt
from prettytable import PrettyTable
from time import sleep
import webbrowser
import calendar
import time
import csv
# CALLING OWN CREATING LIBRARY
import _Menu_card_
import _Room_info_
import _Hotel_policies_
# CONNECT PYTHON WITH MYSQL SERVER TO ENTER GIVEN INFORMATION
mydb = mysqlt.connect(
host="localhost",
user="root",
password="ujjwal2003",
database="hotel_management"
)
cursor = mydb.cursor()
##if mydb.is_connected():
## print("CONNECTION ESTABILISED")
##else:
## print("CONNECTION ERROR !!")
# GLOBAL LIST DECLARATION
name_of_children = [] # FOR NAME OF CHILDREN
number_of_customer_adult = [] # FOR NUMBER OF ADULTS
number_of_customer_children = [] # FOR NUMBER OF CHILDREN
number_of_customer = [] # FOR NUMBER OF CUSTOMER
name_of_the_customer = [] # FOR NAME OF CUSTOMERS
age_of_the_customer = [] # FOR AGE OF CUSTOMERS
gender_of_the_customer = [] # FOR GENDER OF CUSTOMERS
aadhaar_of_the_customer = [] # FOR AADHAAR CARD OF CUSTOMERS
mobile_of_the_customer = [] # FOR MOBILE NUMBER OF CUSTOMERS
address_of_customer = [] # FOR ADDRESS OF CUSTOMERS
number_of_customer = [] # FOR NUMBER OF CUSTOMER
checkin_date = [] # FOR CHECK-IN DATE OF CUSTOMERS
checkin_month = [] # FOR CHECK-IN MONTH OF CUSTOMERS
year_in = [] # FOR CHECK-IN YEAR OF CUSTOMERS
checkout_date = [] # FOR CHECK-OUT DATE OF CUSTOMERS
checkout_month = [] # FOR CHECK-OUT MONTH OF CUSTOMERS
out_year = [] # FOR CHECK-OUT YEAR OF CUSTOMERS
for_owner_room_number = [] # FOR NUMBER OF ROOM
bill_numbering = [] # FOR BILL NUMBER RANDOMLY GENERATED NUMBER
# FOR CHECKING-INFO AND FOR DELETED DATA
name_info = [] # FOR LAST NAME
age_info = [] # FOR LAST AGE
gender_info = [] # FOR LAST GENDER
aadhaar_info = [] # FOR LAST AADHAAR NUMBER
room_type = [] # FOR ROOM TYPE
total_price = [] # FOR TOTAL PRICE
# THIS IS ONLY FOR TABLE GENERATOR AND FOR INVOICE WHICH CLEAR AFTER EVERY RE-RUN
name_of_customer = [] # FOR TABLE NAME OF CUSTOMERS
age_of_customer = [] # FOR TABLE AGE OF CUSTOMERS
gender_of_customer = [] # FOR TABLE GENDER OF CUSTOMERS
aadhaar_of_customer = [] # FOR TABLE AADHAAR CARD OF CUSTOMERS
mobile_of_customer = [] # FOR TABLE MOBILE NUMBER OF CUSTOMERS
room_of_type = [] # FOR BILL INVOICE TYPE OF ROOM
room_of_number = [] # FOR BILL INVOICE ROOM NUMBER
room_of_price = [] # FOR BILL INVOICE PRICE OF ROOM
day_of_checkin = [] # FOR BILL INVOICE CHECK-IN DATE
month_of_checkin = [] # FOR BILL INVOICE CHECK-IN MONTH
year_of_checkin = [] # FOR BILL INVOICE CHECK-IN YEAR
day_of_checkout = [] # FOR BILL INVOICE CHECK-OUT DATE
month_of_checkout = [] # FOR BILL INVOICE CHECK-OUT MONTH
year_of_checkout = [] # FOR BILL INVOICE CHECK-OUT YEAR
booking_loop = 0 # STARTING VALUE ASSIGNING TO BE ZERO
def startup():
# FOR TABLE AND INVOICE CLEAR ALL PREVIOUS DATA
name_of_customer.clear()
age_of_customer.clear()
gender_of_customer.clear()
aadhaar_of_customer.clear()
mobile_of_customer.clear()
room_of_type.clear()
room_of_number.clear()
room_of_price.clear()
day_of_checkin.clear()
month_of_checkin.clear()
year_of_checkin.clear()
day_of_checkout.clear()
month_of_checkout.clear()
year_of_checkout.clear()
# STARTUP MENU RUN FROM HERE
for i in range(100):
print("")
print("LOADING.....")
sleep(3)
print("\n" * 4)
print("\t\t\t", "=" * 20, " RE-RUN MENU ", "=" * 23)
print("\n")
xyz1 = str(input("YOU WANT TO RUN THE PROGRAM AGAIN [Y/N]="))
xyz = xyz1.upper()
if xyz == "Y" or xyz == "YES":
print("\n" * 4)
print("\t\t", "=" * 26, " RESTART MENU ", "=" * 30)
print("\n" * 1)
main_menu()
elif xyz == "N" or xyz == "NO":
print("")
win_exit_str = str(input("ARE YOU SURE YOU EXIT THE PROGRAM !! [Y/N] = "))
win_exit = win_exit_str.upper()
if win_exit == "Y" or win_exit == "YES":
# PATH LINK
my_image = PIL.Image.open(r"E:\Python\Cs_Project\python_thankyou.png")
my_image.show()
exit()
elif win_exit == "N" or win_exit == "NO":
startup()
else:
startup()
else:
print("WRONG CHOICE")
print("")
def booking():
# OPENING CSV FILE
file_check = open("type_database.csv", "w")
create_writer = csv.writer(file_check) # MAKE A WRITER TO ADD ROWS
# CALL THE FUNCTION OF CHECK - IN OR CHECK - OUT
# check_in_or_out() # THIS IS ONLY FOR EMERGENCY CASE
# PASSING THE VARIABLE IN BETWEEN THE FUNCTION
choose_month_upper, number_of_days, customer_check_in, month, year, check_out_date, _mon_out_, _yr_out = check_in_or_out()
# MAKE A WRITEROW
create_writer.writerow(["Check-in Date", "Check-in Month", "Check-in Year"])
create_rec = [customer_check_in, month, year]
create_writer.writerow(create_rec)
# MAKE A WRITEROW
create_writer.writerow(["Check-out Date", "Check-out Month", "Check-out Year"])
create_rec = [check_out_date, _mon_out_, _yr_out]
create_writer.writerow(create_rec)
# MAKE A WRITEROW
create_writer.writerow(["Number of days"])
create_rec = [number_of_days]
create_writer.writerow(create_rec)
# NUMBER OF ADULT AND NUMBER OF CHILDREN
print("")
print("\t\t", "=" * 26, "NUMBER OF ADULTS", "=" * 30)
print("")
str_customer_adult = str(input("HOW MANY ADULTS ARE ?? "))
try:
customer_adult = int(str_customer_adult)
print("")
if customer_adult != 0:
number_of_customer_adult.append(customer_adult) # append function
print("OKAY!! ", customer_adult, " ADULTS ")
print("")
sleep(3)
print("\t\t", "=" * 26, "NUMBER OF CHILDREN", "=" * 30)
print("")
str_customer_children = str(input("HOW MANY CHILDREN ARE ?? "))
try:
customer_children = int(str_customer_children)
number_of_customer_children.append(customer_children) # append function
if customer_children == 0 or customer_children != 0:
print("")
print("OKAY !!", customer_children, " CHILDREN")
print("")
sleep(3)
if customer_children > 0:
for children in range(customer_children): # THIS LOOP WILL TERMINATE WITH CHILDREN NUMBER
print("\t\t\t ", "-" * 15, "INFORMATION OF CHILD", children + 1, "-" * 15)
print("")
children_name_lower = input("ENTER NAME OF THE CHILD [OPTIONAL] = ")
children_name = children_name_lower.upper()
children_name_append = name_of_children.append(children_name) # append function
str_children_age = str(input("ENTER THE AGE OF CHILD = "))
print("")
print("LOADING.....")
sleep(3)
try:
children_age = int(str_children_age)
if children_age <= 9:
print("")
print("YOUR CHILD", children_name, "CHILDREN NO.", children + 1, "ENTRY IS FREE")
print("")
print("NO NEED TO PAY EXTRA AMOUNT TO BOOK THE ROOM")
customer_number = customer_adult
number_of_customer.append(customer_number) # NUMBER OF CUSTOMER ADDED IN THE LIST
# append function
print("")
elif 10 <= children_age <= 17:
print("")
print("YOUR CHILD", children_name, "CHILDREN NO.", children + 1,
"ENTRY IS NOT FREE")
print("")
print("YOU NEED TO PAY EXTRA AMOUNT TO BOOK THE ROOM FOR YOUR CHILD")
customer_number = customer_adult + customer_children
number_of_customer.append(customer_number) # NUMBER OF CUSTOMER ADDED IN THE LIST
# append function
print("")
elif children_age >= 18:
print("")
print("THE PERSON AGE OF", children_age, "IS NOT A CHILD")
print("")
print("PLEASE RE-RUN THE PROGRAM\n\nAND ENTER THE CORRECT INFORMATION")
startup()
else:
print("")
print("INVALID AGE ENTERED")
print("\nPLEASE RE-RUN THE PROGRAM\n\nAND ENTER THE CORRECT INFORMATION")
startup()
except:
print("")
print("AGE ONLY IN NUMERICAL FORM BUT YOU ENTER IN STRING")
print("\nPLEASE RE-RUN THE PROGRAM")
messagebox.showerror("Error", "Age only in Numerical")
startup()
else:
print("NUMBER OF TOTAL CUSTOMERS ARE = ", customer_adult)
else:
print("")
print("SORRY YOU ENTERED WRONG INFORMATION")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("")
print("NUMBER OF CHILDERNS ONLY IN NUMBERS")
print("\nRE-RUN THE PROGRAM")
messagebox.showerror("Error", "Number of Children Only in Numericals")
startup()
elif customer_adult == 0:
print("")
print("LOADING.....")
sleep(3)
print("")
print("NUMBER OF ADULT = ", customer_adult)
print("\nNO ADULT WITH YOU")
print("\nYOU NOT BOOKED THE ROOM\n\nBECAUSE NO UNDER AGE PERSON BOOK THE ROOM IN OUR HOTEL")
messagebox.showwarning("Warning", "No person Under 18 Booked Room in our Hotel SORRY !!")
exit()
else:
print("")
print("INVALID SYNTAX")
startup()
except:
print("")
print("NUMBER OF ADULTS ONLY IN NUMBERS")
print("\nRE-RUN THE PROGRAM")
messagebox.showerror("Error", "Number of Adults Only in Numericals")
startup()
# ADULT CUSTOMER INFORMATION
print("")
try:
count = 0
for num_adult_customer in range(customer_adult):
count = count + 1
print("")
print("\t ", "=" * 23, " DETAIL OF ADULT CUSTOMER ", count, "=" * 23)
print("")
customer_name = str(input("ENTER NAME OF THE CUSTOMERS = ")) # NAME OF THE CUSTOMER
customer_name_UPPER = customer_name.upper()
name_of_customer.append(customer_name_UPPER) # NAME OF CUSTOMER ADDED IN THE LIST
name_of_the_customer.append(customer_name_UPPER) # NAME OF CUSTOMER ADDED IN THE LIST
# append function
customer_age_str = str(input("ENTER YOUR AGE = "))
try:
customer_age = int(customer_age_str)
if 18 <= customer_age <= 100:
age_of_customer.append(customer_age) # AGE OF CUSTOMER ADDED IN THE LIST
age_of_the_customer.append(customer_age) # AGE OF CUSTOMER ADDED IN THE LIST
# append function
elif customer_age < 18:
print("")
print("THIS PERSON IS NOT ADULT")
print("\nBEACAUSE HIS/HER AGE IS UNDER 18")
print("\nINVALID ENTRY")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
else:
print("")
print("WRONG AGE ENTERED ONLY CUSTOMER UPTO 100 YEARS")
print("\nIF ANY OF THE CUSTOMER IS ABOVE 100 YEARS PLEASE GO TO OUR ONLINE WEBSITE")
print("\nIF YOU ENTERED WRONGLY SO ENTER DETAILS AGAIN OF AGE")
print("")
customer_age_str = str(input("ENTER YOUR AGE = "))
try:
customer_age = int(customer_age_str)
if 18 <= customer_age <= 80:
print("NOW YOU ENTERED CORRECT AGE INFORMATION")
age_of_customer.append(customer_age) # AGE OF CUSTOMER ADDED IN THE LIST
age_of_the_customer.append(customer_age) # AGE OF CUSTOMER ADDED IN THE LIST
# append function
else:
if customer_age < 18:
print("YOU ENTER WRONG INFORMATION UNDER 18 AGE PERSON IS COUNTED AS CHILD NOT ADULT")
print("")
print("PLEASE RE-RUN THE PROGRAM")
startup()
else:
print("YOU AGAIN ENTER WRONG AGE")
print("\nRE-RUN THE PROGRAM")
startup()
except:
print("INVALID SYNTAX")
print("\nRE-RUN THE PROGRAM")
messagebox.showerror("Error", "Age only in Numericals")
startup()
customer_gender = str(
input("ENTER THE GENDER OF CUSTOMER [MALE/FEMALE/OTHER]= ")) # GENDER OF THE CUSTOMER
customer_gender_UPPER = customer_gender.upper()
if customer_gender_UPPER == "MALE" or "M":
gender_of_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
gender_of_the_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
# append function
elif customer_gender_UPPER == "FEMALE" or "F":
gender_of_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
gender_of_the_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
# append function
elif customer_gender_UPPER == "OTHER" or "O":
gender_of_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
gender_of_the_customer.append(customer_gender_UPPER) # GENDER OF CUSTOMER ADDED IN THE LIST
# append function
else:
print("")
print("WRONG GENDER ENTERED\n")
print("ONLY THREE GENDER EXISTS IN OUR WEBSITE\n")
print("RE-RUN THE PROGRAM")
startup()
print("")
# TO UPLOAD IDENTITY CARD DETAILS
print("FOR UNIQUE IDENTIFICATION ! \nTO UPLOAD AADHAAR CARD DETAILS ")
print("")
# AADHAAR CARD DETAILS
str_customer_aadhaar_details = str(
input("ENTER THE AADHAAR CARD NUMBER [12 DIGIT] = ")) # length of number is 12
aadhaar_length = len(str_customer_aadhaar_details)
print("")
print("LOADING......")
sleep(3)
print("")
try:
customer_aadhaar_details = int(str_customer_aadhaar_details)
if aadhaar_length == 12:
aadhaar_of_customer.append(
customer_aadhaar_details) # AADHAAR IDENTIFICATION OF CUSTOMER ADDED IN THE LIST
aadhaar_of_the_customer.append(
customer_aadhaar_details) # AADHAAR IDENTIFICATION OF CUSTOMER ADDED IN THE LIST
# append function
print("YOUR AADHAAR NUMBER RECORDED")
# MAKE A WRITEROWS
create_writer.writerow(["Name", "Age", "Gender", "Aadhaar"])
create_rec = [customer_name_UPPER, customer_age, customer_gender_UPPER,
customer_aadhaar_details]
create_writer.writerow(create_rec)
# INSERT DATA INTO MYSQL SERVER
columns_create_3 = "INSERT INTO adult_looping(NAME,AGE,GENDER,AADHAAR) VALUES(%s,%s,%s,%s)"
_input_3 = (customer_name_UPPER, customer_age, customer_gender_UPPER, customer_aadhaar_details)
cursor.execute(columns_create_3, _input_3)
mydb.commit()
elif 1 <= aadhaar_length <= 11 or 13 <= aadhaar_length <= 20:
print("YOUR AADHAAR NUMBER IS WRONG")
print("\nPLEASE RE-ENTERED THE DETAILS OF AADHAAR CARD")
print("\nTHE LENGTH OF AADHAAR NUMBER IS 12\n")
str_customer_aadhaar_details = str(
input("ENTER THE AADHAAR CARD NUMBER = ")) # length of number is 12
aadhaar_length = len(str_customer_aadhaar_details)
print("")
print("LOADING......")
sleep(3)
print("")
try:
customer_aadhaar_details = int(str_customer_aadhaar_details)
if aadhaar_length == 12:
aadhaar_of_customer.append(
customer_aadhaar_details) # AADHAAR IDENTIFICATION OF CUSTOMER ADDED IN THE LIST
aadhaar_of_the_customer.append(
customer_aadhaar_details) # AADHAAR IDENTIFICATION OF CUSTOMER ADDED IN THE LIST
# append function
print("YOUR AADHAAR NUMBER RECORDED")
# MAKE A WRITEROWS
create_writer.writerow(["Name", "Age", "Gender", "Aadhaar"])
create_rec = [customer_name_UPPER, customer_age, customer_gender_UPPER,
customer_aadhaar_details]
create_writer.writerow(create_rec)
# INSERT DATA INTO MYSQL SERVER
columns_create_3 = "INSERT INTO adult_looping(NAME,AGE,GENDER,AADHAAR) VALUES(%s,%s,%s,%s)"
_input_3 = (
customer_name_UPPER, customer_age, customer_gender_UPPER, customer_aadhaar_details)
cursor.execute(columns_create_3, _input_3)
mydb.commit()
else:
print("\nWRONG AADHAAR NUMBER SECOND TIME \n\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("\nRE-RUN THE PROGRAM \n\nAADHAAR NUMBER ONLY IN NUMERICAL FORM")
messagebox.showerror("Error", "Aadhaar Number only in Numericals not in Alphabets")
startup()
else:
print("\THE AADHAAR NUMBER IS ONLY OF 12 NUMBERS")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("\nRE-RUN THE PROGRAM \n\nAADHAAR NUMBER ONLY IN NUMERICAL FORM")
messagebox.showerror("Error", "Aadhaar Number only in Numericals not in Alphabets")
startup()
except:
print("")
print("\nYOU ENTERED THE WRONG AGE [IT IS ONLY IN NUMERICALS FORM]")
print("\nRE-RUN THE PROGRAM")
messagebox.showerror("Error", "Age only in Numericals")
startup()
# FOR INFO DETAILS
name_info.append(customer_name_UPPER)
age_info.append(customer_age)
gender_info.append(customer_gender_UPPER)
aadhaar_info.append(customer_aadhaar_details)
print("")
print("\t\t", "=" * 30, " OTHER DETAILS ", "=" * 30)
print("")
customer_address = str(input("ENTER YOUR PERMANENT ADDRESS = ")) # ADDRESS OF THE CUSTOMER
customer_address_UPPER = customer_address.upper()
address_of_customer.append(customer_address_UPPER)
# append function
print("")
str_customer_mobile_number = str(input("ENTER YOUR MOBILE NUMBER [10 DIGIT] = ")) # MOBILE NUMBER OF CUSTOMER
customer_mobile_length = len(str_customer_mobile_number)
try:
customer_mobile_number = int(str_customer_mobile_number)
if customer_mobile_length == 10:
print("")
print("LOADING.....")
sleep(3)
print("")
mobile_of_customer.append(customer_mobile_number) # MOBILE NUMBER ADDED IN THE LIST
mobile_of_the_customer.append(customer_mobile_number) # MOBILE NUMBER ADDED IN THE LIST
# append function
print("YOU ENTERED THE CORRECT MOBILE NUMBER")
# MAKE A WRITEROWS
create_writer.writerow(["Address", "Mobile Number"])
create_rec = [customer_address_UPPER, customer_mobile_number]
create_writer.writerow(create_rec)
elif 2 <= customer_mobile_length <= 9 or 11 <= customer_mobile_length <= 16:
print("\nYOU ENTERED THE WRONG MOBILE NUMBER\n")
print("PLEASE RE - ENTERED YOUR MOBILE NUMBER\n")
str_customer_mobile_number = str(
input("ENTER YOUR MOBILE NUMBER [10 DIGIT] = ")) # MOBILE NUMBER OF CUSTOMER 2 time
customer_mobile_length = len(str_customer_mobile_number)
print("")
print("LOADING.....")
sleep(3)
print("")
try:
customer_mobile_number = int(str_customer_mobile_number)
if customer_mobile_length == 10:
print("\nNOW YOU ENTERED THE CORRECT MOBILE NUMBER")
mobile_of_customer.append(customer_mobile_number) # MOBILE NUMBER ADDED IN THE LIST
mobile_of_the_customer.append(customer_mobile_number) # MOBILE NUMBER ADDED IN THE LIST
# append function
# MAKE A WRITEROWS
create_writer.writerow(["Address", "Mobile Number"])
create_rec = [customer_address_UPPER, customer_mobile_number]
create_writer.writerow(create_rec)
else:
print("\nYOU ENTERED WRONG MOBILE NUMBER SECOND TIME")
print("\nNOW YOU RE-RUN THE PROGRAM")
startup()
except:
print("\nMOBILE NUMBER ONLY IN NUMERICAL FORM")
print("\nPLEASE RE-RUN THE PROGRAM")
messagebox.showerror("Error", "Mobile Number only in Numericals")
startup()
else:
print("\nYOU ENTERED WRONG FORMAT OF MOBILE NUMBER")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("\nMOBILE NUMBER ONLY IN NUMERICAL FORM")
print("\nPLEASE RE-RUN THE PROGRAM")
messagebox.showerror("Error", "Mobile Number only in Numericals")
startup()
print("")
print("PLEASE WAIT WE GENERATE A TABLE.....")
sleep(8)
print("")
# CREATING A TABLE
# WHEN NUMBER OF CUSTOMER IS 1
if customer_adult == 1:
print("NUMBER OF ADULT CUSTOMER", customer_adult)
list1 = ["1"]
list2 = [name_of_customer[0]]
list3 = [age_of_customer[0]]
list4 = [gender_of_customer[0]]
list5 = [aadhaar_of_customer[0]]
list6 = [mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS 2
elif customer_adult == 2:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2"]
list2 = [name_of_customer[0], name_of_customer[1]]
list3 = [age_of_customer[0], age_of_customer[1]]
list4 = [gender_of_customer[0], gender_of_customer[1]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1]]
list6 = [mobile_of_customer[0], mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS 3
elif customer_adult == 3:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2", "3"]
list2 = [name_of_customer[0], name_of_customer[1], name_of_customer[2]]
list3 = [age_of_customer[0], age_of_customer[1], age_of_customer[2]]
list4 = [gender_of_customer[0], gender_of_customer[1], gender_of_customer[2]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1], aadhaar_of_customer[2]]
list6 = [mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS 4
elif customer_adult == 4:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2", "3", "4"]
list2 = [name_of_customer[0], name_of_customer[1], name_of_customer[2], name_of_customer[3]]
list3 = [age_of_customer[0], age_of_customer[1], age_of_customer[2], age_of_customer[3]]
list4 = [gender_of_customer[0], gender_of_customer[1], gender_of_customer[2], gender_of_customer[3]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1], aadhaar_of_customer[2], aadhaar_of_customer[3]]
list6 = [mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS 5
elif customer_adult == 5:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2", "3", "4", "5"]
list2 = [name_of_customer[0], name_of_customer[1], name_of_customer[2], name_of_customer[3],
name_of_customer[4]]
list3 = [age_of_customer[0], age_of_customer[1], age_of_customer[2], age_of_customer[3], age_of_customer[4]]
list4 = [gender_of_customer[0], gender_of_customer[1], gender_of_customer[2], gender_of_customer[3],
gender_of_customer[4]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1], aadhaar_of_customer[2], aadhaar_of_customer[3],
aadhaar_of_customer[4]]
list6 = [mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0],
mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS 6
elif customer_adult == 6:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2", "3", "4", "5", "6"]
list2 = [name_of_customer[0], name_of_customer[1], name_of_customer[2], name_of_customer[3],
name_of_customer[4], name_of_customer[5]]
list3 = [age_of_customer[0], age_of_customer[1], age_of_customer[2], age_of_customer[3], age_of_customer[4],
age_of_customer[5]]
list4 = [gender_of_customer[0], gender_of_customer[1], gender_of_customer[2], gender_of_customer[3],
gender_of_customer[4], gender_of_customer[5]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1], aadhaar_of_customer[2], aadhaar_of_customer[3],
aadhaar_of_customer[4], aadhaar_of_customer[5]]
list6 = [mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0],
mobile_of_customer[0], mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
# WHEN NUMBER OF CUSTOMER IS ELSE
else:
print("NUMBER OF ADULT CUSTOMERS", customer_adult)
list1 = ["1", "2", "3", "4", "5", "6", "7"]
list2 = [name_of_customer[0], name_of_customer[1], name_of_customer[2], name_of_customer[3],
name_of_customer[4], name_of_customer[5], name_of_customer[6]]
list3 = [age_of_customer[0], age_of_customer[1], age_of_customer[2], age_of_customer[3], age_of_customer[4],
age_of_customer[5], age_of_customer[6]]
list4 = [gender_of_customer[0], gender_of_customer[1], gender_of_customer[2], gender_of_customer[3],
gender_of_customer[4], gender_of_customer[5], gender_of_customer[6]]
list5 = [aadhaar_of_customer[0], aadhaar_of_customer[1], aadhaar_of_customer[2], aadhaar_of_customer[3],
aadhaar_of_customer[4], aadhaar_of_customer[5], aadhaar_of_customer[6]]
list6 = [mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0],
mobile_of_customer[0], mobile_of_customer[0], mobile_of_customer[0]]
table = PrettyTable(
["Number of customer", "Name of the customer", "Age", "Gender", "Identification", "Mobile number"])
for customer_table in range(0, customer_adult):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table]])
print(table)
print("")
print("LOADING.....")
sleep(5)
# PASSING THE VARIABLE IN BETWEEN THE FUNCTION
room_rent, room, room_number = display_room()
print("")
print("YOU BOOK ROOM OF CATEGORY ", room)
if customer_adult <= 3:
number_of_room = 1
room_rent_after = room_rent * number_of_room * number_of_days
room_type.append(room)
total_price.append(room_rent_after)
room_of_type.append(room)
room_of_number.append(number_of_room)
room_of_price.append(room_rent_after)
elif customer_adult > 3:
print("")
str_number_of_room = input("ENTER HOW MANY ROOM YOU BOOK [1/2/3 OR SO ON] = ")
try:
number_of_room = int(str_number_of_room)
if number_of_room == 0:
print("")
print("SORRY WE CANCEL YOUR BOOKING BECAUSE YOU ENTER WRONG INFORMATION")
print("\nIF YOU BOOK THE HOTEL RE-RUN THE PROGRAM")
startup()
elif number_of_room != 0:
if number_of_days == 0:
room_rent_after = room_rent * number_of_room
else:
room_rent_after = room_rent * number_of_room * number_of_days
room_type.append(room)
total_price.append(room_rent_after)
room_of_type.append(room)
room_of_number.append(number_of_room)
room_of_price.append(room_rent_after)
else:
print("INVALID SYNTAX")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("")
print("NUMBER OF ROOM ONLY IN NUMERICAL FORM")
print("\nPLEASE RE-RUN THE PROGRAM")
messagebox.showerror("Error", "Number Of Rooms only in Numericals")
print("")
str_number_of_room = input("ENTER HOW MANY ROOM YOU BOOK [1/2/3 OR SO ON] = ")
try:
number_of_room = int(str_number_of_room)
if number_of_room == 0:
print("")
print("SORRY WE CANCEL YOUR BOOKING BECAUSE YOU ENTER WRONG INFORMATION")
print("\nIF YOU BOOK THE HOTEL RE-RUN THE PROGRAM")
startup()
elif number_of_room != 0:
if number_of_days == 0:
room_rent_after = room_rent * number_of_room
else:
room_rent_after = room_rent * number_of_room * number_of_days
room_type.append(room)
total_price.append(room_rent_after)
room_of_type.append(room)
room_of_number.append(number_of_room)
room_of_price.append(room_rent_after)
else:
print("INVALID SYNTAX")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
except:
print("")
print("NUMBER OF ROOM ONLY IN NUMERICAL FORM")
print("\nPLEASE RE-RUN THE PROGRAM")
messagebox.showerror("Error", "Number Of Rooms only in Numericals")
startup()
else:
print("WRONG INFORMATION !!!")
print("")
sleep(4)
print("YOUR ROOM RENT IS ", room_rent_after)
print("")
print("LOADING.....")
sleep(4)
print("")
# FOR PAYMENT
payment_method = input("FOR PAYMENT\nPRESS 1 : FOR SCAN QR CODE\nPRESS 2 : FOR NEFT\nPRESS 3 : FOR CASH\n\nCHOOSE YOUR OPTION = ")
if payment_method == "1":
print("")
print("YOU PAY BY SCAN QR CODE")
print("")
# PATH LINK
my_image = PIL.Image.open(r"E:\Python\Cs_Project\UPI qr code.png")
my_image.show()
elif payment_method == "2":
print("")
print("YOU PAY BY NEFT")
print("\nDETAILS FOR NEFT GIVEN BELOW :")
print("\nNAME OF A/C HOLDER = TAJ HOTEL\nBANK NAME = STATE BANK OF INDIA\nACCOUNT NUMBER = 98471002980\nIFSC CODE = SBIN0020852\nBRANCH = NEW DELHI")
print("")
elif payment_method == "3":
print("")
print("YOU PAY BY CASH")
print("")
else:
print("")
print("INVALID OPTION SELECTED")
print("\nPLEASE RE-ENTER THE INFORMATION")
print("")
# FOR PAYMENT
payment_method = input("FOR PAYMENT\nPRESS 1 : FOR SCAN QR CODE\nPRESS 2 : FOR NEFT\nPRESS 3 : FOR CASH\n\nCHOOSE YOUR OPTION = ")
if payment_method == "1":
print("")
print("YOU PAY BY SCAN QR CODE")
print("")
# PATH LINK
my_image = PIL.Image.open(r"E:\Python\Cs_Project\UPI qr code.png")
my_image.show()
elif payment_method == "2":
print("")
print("YOU PAY BY NEFT")
print("\nDETAILS FOR NEFT GIVEN BELOW")
print("\nNAME OF A/C HOLDER = TAJ HOTEL\nBANK NAME = STATE BANK OF INDIA\nACCOUNT NUMBER = 98471002980\nIFSC CODE = SBIN0020852\nBRANCH = NEW DELHI")
print("")
elif payment_method == "3":
print("")
print("YOU PAY BY CASH")
print("")
else:
print("")
print("SORRY YOU RE-ENTER THE WRONG INFORMATION")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
print("LOADING.....")
sleep(8)
print("")
print("DIRECTION OF HOTEL FROM CURRENT LOCATION")
# PATH LINK
# location for school
# webbrowser.open("https://www.google.com/maps/dir/Sbm+Sr.Sec+School,+Block+D,+Karam+Pura,+New+Delhi,+Delhi/Taj+Palace,+New+Delhi,+2,+Sardar+Patel+Marg,+Diplomatic+Enclave,+Chanakyapuri,+New+Delhi,+Delhi+110021/@28.6299701,77.1181172,13z/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0x390d032fdfc10bf7:0xd998c979666530e4!2m2!1d77.1482251!2d28.664819!1m5!1m1!1s0x390d1da3d0e98c7b:0xf56c1b12e18dd9b!2m2!1d77.1709502!2d28.5951864!3e0?hl=en",new=2)
# location for home
webbrowser.open("https://www.google.com/maps/dir/Blooming+Buds+Public+School,+B+Block,+New+Moti+Nagar,+Karampura+West,+Near+Education+Department+Office,+Phase+1,+Block+B+1,+New+Moti+Nagar,+Moti+Nagar,+New+Delhi,+Delhi+110015,+India/Taj+Palace,+New+Delhi,+Taj+Palace,+Sardar+Patel+Marg,+Diplomatic+Enclave,+Malcha,+New+Delhi,+Delhi/@28.6300416,77.1309956,13z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x390d03aa270562d9:0xe2dc3a221de9b12c!2m2!1d77.1424777!2d28.6643522!1m5!1m1!1s0x390d1da3d0e98c7b:0xf56c1b12e18dd9b!2m2!1d77.1709502!2d28.5951864?hl=en",new=2)
print("")
sleep(12)
print("FOR MORE QUERY GO TO OUR ONLINE WEBSITE")
print("")
print("LOADING.....")
sleep(8)
# PATH LINK
webbrowser.open("https://www.tajhotels.com/en-in/taj/taj-palace-new-delhi/", new=2)
print("")
sleep(20)
print("YOUR BOOKING IS RECORDED")
print("")
if number_of_room == 1:
aabb = 1122
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
elif number_of_room == 0:
startup()
else:
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
check_count = 1
for number_check in range(number_of_room - 1):
check_count += 1
if room == "A":
room_number = random.randint(1, 20)
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
elif room == "B":
room_number = random.randint(21, 35)
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
elif room == "C":
room_number = random.randint(51, 70)
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
elif room == "D":
room_number = random.randint(70, 100)
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
elif room == "S":
room_number = random.randint(36, 50)
print("YOUR ROOM NUMBER IS ", room_number)
for_owner_room_number.append(room_number)
else:
print("SORRY !!")
# Generated a bill number at random
bill_number_generated = random.randint(5000, 15000)
bill_numbering.append(bill_number_generated)
# MAKE A WRITEROWS
create_writer.writerow(["Room type", "Number of rooms", "Room number", "Total price"])
create_rec = [room, number_of_room, room_number, room_rent_after]
create_writer.writerow(create_rec)
file_check.close() # THIS STATEMENT CLOSE THE FILE
# INSERT DATA INTO MYSQL SERVER
columns_create_1 = "INSERT INTO Booking_info(BILL_NO,NAME,AGE,GENDER,AADHAAR,ADDRESS,MOBILE,NUMBER_ROOMS,ROOM_RENT,ROOM_TYPE,ROOM_NUMBER) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
_input_1 = (
bill_number_generated, customer_name_UPPER, customer_age, customer_gender_UPPER, customer_aadhaar_details,
customer_address_UPPER, customer_mobile_number, number_of_room, room_rent_after, room, room_number)
cursor.execute(columns_create_1, _input_1)
mydb.commit()
# INSERT DATA OF DATES INTO MYSQL SERVER
columns_create_2 = "INSERT INTO Booked_dates(BILL_NO,CHECK_IN_DATE,CHECK_IN_MONTH,CHECK_IN_YEAR,CHECK_OUT_DATE,CHECK_OUT_MONTH,CHECK_OUT_YEAR) VALUES(%s,%s,%s,%s,%s,%s,%s)"
_input_2 = (bill_number_generated, customer_check_in, month, year, check_out_date, _mon_out_, _yr_out)
cursor.execute(columns_create_2, _input_2)
mydb.commit()
print("")
print("INVOICE GENERATED.....")
sleep(3)
print("\t\t", "-" * 70)
sleep(1)
print("\t\t\t\t\t\t\t\t\tBILL AREA")
sleep(1)
print("\t\t", "-" * 70)
sleep(1)
print("\t\t\t\t\t\t\t\tHOTEL MANAGEMENT SYSTEM")
sleep(1)
print("\t\t\t\t\t\t\t\t\tHOTEL TAJ")
sleep(1)
a = " +91 11-2611-0202"
print("\t\t\t\t\t\t\t Phone Number.", a)
print("")
sleep(1)
print("Bill no. :", bill_number_generated)
sleep(1)
print("Customer Name :", name_of_customer[0])
sleep(1)
print("Phone Number. :", mobile_of_customer[0])
print("")
sleep(1)
# COMPARE ALL THE VARIABLE TO MAKE ONE VARIABLE FOR CHECK-IN AND CHECK-OUT
checkin_invoice = day_of_checkin[0], month_of_checkin[0], year_of_checkin[0]
checkout_invoice = day_of_checkout[0], month_of_checkout[0], year_of_checkout[0]
if choose_month_upper == "Y" or choose_month_upper == "YES":
list1 = [name_of_customer[0], " ", " ", " ", " ", " ", " "]
list2 = [room_of_type[0], "", " ", " ", " ", " ", " "]
list3 = [room_of_number[0], " ", " ", " ", " ", " ", " "]
list4 = [checkin_invoice, " ", " ", " ", " ", " ", " "]
list5 = [checkout_invoice, " ", " ", " ", " ", " ", " "]
list6 = [number_of_days, " ", " ", " ", " ", " ", " "]
list7 = [room_of_price[0], " ", " ", " ", " ", " ", " "]
table = PrettyTable(
["Name", "Room Type", "Number of Rooms", "Check-In", "Check-Out", "Number of Days", "Price"])
for customer_table in range(0, 6):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table], list7[customer_table]])
print(table)
print("\t" * 10, "TOTAL PRICE :", room_of_price[0])
elif choose_month_upper == "N" or choose_month_upper == "NO":
list1 = [name_of_customer[0], " ", " ", " ", " ", " ", " "]
list2 = [room_of_type[0], "", " ", " ", " ", " ", " "]
list3 = [room_of_number[0], " ", " ", " ", " ", " ", " "]
list4 = [checkin_invoice, " ", " ", " ", " ", " ", " "]
list5 = [checkout_invoice, " ", " ", " ", " ", " ", " "]
list6 = [number_of_days, " ", " ", " ", " ", " ", " "]
#list7 = [room_of_price[0]," "," "," "," "," "," "]
table = PrettyTable(["Name", "Room Type", "Number of Rooms", "Check-In", "Check-Out", "Number of Days"])
for customer_table in range(0, 5):
table.add_row(
[list1[customer_table], list2[customer_table], list3[customer_table], list4[customer_table],
list5[customer_table], list6[customer_table], ])
print(table)
print("\t" * 7, "TOTAL PRICE :", room_of_price[0])
else:
aabb = 11222
print("\t" * 8, "THANK YOU !!\n", "\t" * 8, "VISITING AGAIN")
sleep(2)
# PATH LINK
my_image = PIL.Image.open(r"E:\Python\Cs_Project\python_thankyou.png")
my_image.show()
startup()
except:
print("")
print("WRONG CHOICE")
messagebox.showerror("Showerror", "Error")
startup()
def check_in_or_out():
global customer_check_in, check_out_date, month, month_out
# FOR CHECK - IN DATE
print("")
print("\t\t", "=" * 30, " CHECK - IN ", "=" * 32)
print("")
# FOR CURENT TIME
time.time
present_time = time.asctime()
str_month = str(input("ENTER THE MONTH OF BOOKING [IN NUMBERS] = "))
try:
month = int(str_month)
if 1 <= month <= 12:
print("")
UPPER_checkin_year = "Y"
if UPPER_checkin_year == "Y" or UPPER_checkin_year == "YES":
year_check = str(input("ENTER THE YEAR [2021/2022/2023] = "))
print("")
if year_check == "2021":
year = 2021
current_time = datetime.datetime.now()
month_present = current_time.month
if month < month_present: # THIS IS A CURRENT MONTH
print("")
print("SORRY YOU ENTER WRONG INFORMATION")
print("\nYOUR MONTH WHICH YOU ENTER ABOVE IS PREVIOUS BUT WE BOOKED THE ROOM FOR ADVANCE")
print("\nPLEASE RE-RUN THE PROGRAM")
startup()
else:
aabb = 10
elif year_check == "2022":
year = 2022
elif year_check == "2023":
year = 2023
else:
print("INVALID YEAR ENTERED !!")
print("\nRE-RUN THE PROGRAM")
startup()
print("LOADING.....")
sleep(3)
print("")
year_for_append = int(year_check)
calendar.setfirstweekday(calendar.SUNDAY)
yr = calendar.month(year, month)
print("THIS IS THE CALENDAR OF MONTH ", month)
print("")
print(yr)
# MONTH HAVING 31 DAYS
if month == 1 or month == 3 or month == 5 or month == 7 or month == 8 or month == 10 or month == 12:
print("")
str_customer_check_in = str(input("ENTER THE DATE OF BOOKING = "))
print("")
print("LOADING.....")
sleep(3)