-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.py
150 lines (129 loc) · 9.55 KB
/
project.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
import time,sys,os,maskpass,pyfiglet
from yachalk import chalk
from InquirerPy import inquirer
msg="WELCOME TO THE BAKERY MANAGEMENT SYSTEM"
print(pyfiglet.figlet_format(msg, font="digital"))
for char in msg:
sys.stdout.write(chalk.blue.bg_magenta.bold.italic.underline(char))
time.sleep(0.05)
time.sleep(0.2)
import pandas as pd
import matplotlib.pyplot as plt
print()
n1=0
n7=input(chalk.bg_cyan_bright('ENTER YOUR NAME:\n'))
n8=0
n8=maskpass.advpass(prompt=chalk.bg_cyan_bright("ENTER THE PASSWORD:"),mask="*")
while n8!='qwerty':
print(chalk.rgb(255,87,51).bold("TRY AGAIN!!!!"))
n8=maskpass.advpass(prompt=chalk.bg_cyan_bright("ENTER THE PASSWORD:"),mask="*")
print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
while n1!="Exit The System":
print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
n1 = inquirer.select(
message="SELECT YOUR CHOICE",
choices=["The Sales Report", "The List of Items in Shop", "Update the List of Items in Shop", "Profit Calculator","The Maximum,Minimum,Total of the Sales","Exit The System"],
).execute()
print("---------------------------------------------------------------------------------------------------------------------------")
if n1=="The Sales Report":
df=pd.read_csv("Book11.csv")
df.plot(kind='bar',color='Yellow',edgecolor='Black',linestyle='dashed',linewidth=1)
ticks = df.index.tolist()
plt.xticks(ticks,df.Months)
plt.title('MONTHLY SALES REPORT')
plt.ylabel('Sales(in Rs)')
plt.xlabel('Months')
plt.grid(True)
plt.show()
elif n1=="The List of Items in Shop":
print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
n2=inquirer.select(message="SELECT YOUR CHOICE",choices=["CAKES", "SNACKS" , "BEVERAGES"],).execute()
print("---------------------------------------------------------------------------------------------------------------------------")
if n2=="CAKES":
Cakes=pd.read_csv("cakes.csv")
print(Cakes)
elif n2=="SNACKS":
Snacks=pd.read_csv("snacks.csv")
print(Snacks)
elif n2=="BEVERAGES":
Beverages=pd.read_csv("B1.csv")
print(Beverages)
# print("---------------------------------------------------------------------------------------------------------------------------")
else:
print(chalk.red_bright('VALUE ERROR! PLEASE CHECK'))
# print("---------------------------------------------------------------------------------------------------------------------------")
elif n1=="Update the List of Items in Shop":
import os
# print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
n3=inquirer.select(message="SELECT YOUR CHOICE",choices=["CAKES","SNACKS","BEVERAGES"],).execute()
print("---------------------------------------------------------------------------------------------------------------------------")
if n3=="CAKES":
os.system("start cakes.csv")
elif n3=="SNACKS":
os.system("start snacks.csv")
elif n3=="BEVERAGES":
os.system("start B1.csv")
print("---------------------------------------------------------------------------------------------------------------------------")
else:
print(chalk.red_bright('VALUE ERROR! PLEASE CHECK'))
elif n1=="Profit Calculator":
# print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
n3=inquirer.select(message="SELECT YOUR CHOICE",choices=["To Get the Net Profit", "To Get Profit Per Item"],).execute()
# print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
if n3=="To Get the Net Profit":
c1=int(input(chalk.bg_cyan_bright("Enter the Number of Cakes Sold:\n")))
c2=int(input(chalk.bg_cyan_bright("Enter the Number of Snacks Sold:\n")))
c3=int(input(chalk.bg_cyan_bright("Enter the Number of Beverages Sold:\n")))
print(chalk.bg_blue("Net Profit= Rs",(c1*50)+(c2*20)+(c3*60)))
# print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
elif n3=="To Get Profit Per Item":
n4=inquirer.select(message="SELECT YOUR CHOICE",choices=["CAKES","SNACKS","BEVERAGES"],).execute()
if n4=="CAKES":
n5=int(input(chalk.bg_cyan_bright("Enter the Number of Cakes Sold:\n")))
print(chalk.bg_blue("Net Profit is=Rs",n5*50))
# print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
elif n4=="SNACKS":
n6=int(input(chalk.bg_cyan_bright("Enter the Number of Snacks Sold:\n")))
print(chalk.bg_blue("Net Profit is=Rs",n6*20))
# print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
elif n4=="BEVERAGES":
n7=int(input(chalk.bg_cyan_bright("Enter the Number of Beverages Sold:\n")))
print(chalk.bg_blue("Net Profit is=Rs",n7*60))
# print("---------------------------------------------------------------------------------------------------------------------------")
# print("---------------------------------------------------------------------------------------------------------------------------")
else:
print(chalk.red_bright('VALUE ERROR! PLEASE CHECK'))
print("---------------------------------------------------------------------------------------------------------------------------")
elif n1=="The Maximum,Minimum,Total of the Sales":
print("---------------------------------------------------------------------------------------------------------------------------")
df = pd.read_excel("Book1.xlsx")
print(chalk.bg_blue("Net Sales:Rs",df["Sales"].sum()))
time.sleep(0.4)
print()
print(chalk.bg_blue("Maximum Sales with Month:\n",df.max()))
time.sleep(0.4)
print()
print(chalk.bg_blue("Minimum Sales With Month:\n",df.min()))
# print("---------------------------------------------------------------------------------------------------------------------------")
elif n1=="Exit The System":
os.system('cls')
time.sleep(1)
print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
print(chalk.magenta("THANK YOU"),chalk.rgb(255,0,255).bold.italic(n7),chalk.magenta("FOR USING B.M.S......."))
print("---------------------------------------------------------------------------------------------------------------------------")
print("---------------------------------------------------------------------------------------------------------------------------")
else:
print(chalk.red_bright('VALUE ERROR! PLEASE CHECK'))
if n8!='qwerty':
print(chalk.rgb(255,87,51).bold("TRY AGAIN!!!!"))