0% found this document useful (0 votes)
19 views

Billing Full Code Python

Uploaded by

shashankpal115
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Billing Full Code Python

Uploaded by

shashankpal115
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

name=[]

cat=[]
price=[]
qua=[]
total=[]
SGST=[]
CGST=[]
final=[]

i=0
gt=0
while(True):
i=i+1
print("Enter details of product",i,":")
n=input("Enter product name:")
c=input("Enter product category:")
p=float(input("Enter price:"))
q=float(input("Enter quantity:"))
t=p*q
if c=="food":
g=5/100*t
elif c=="elec":
g=18/100*t
elif c=="cloth":
g=12/100*t
sg=g/2
cg=g/2
f=t+g
name.append(n)
cat.append(c)
price.append(p)
qua.append(q)
total.append(t)
SGST.append(sg)
CGST.append(cg)
final.append(f)
gt=gt+f
ch=input("Do you wish to add more products in bill(y/n)?:")
if ch=='n':
break
if gt>=500:
d=10/100*gt
else:
d=5/100*gt
fi=gt-d

print(" Sales Invoice")


print(" *************")
print(" ABC SHOPPING MART")
print(" *****************")
print("GSTIN:00987897HGF56")
print("S.no\tname\tcat\tprice\tqua\ttot\tsgst\tcgst\tfinal")
for j in range(0,i-1+1,1):
print(str(j+1)+"\t"+name[j]+"\t"+cat[j]+"\t"+str(round(price[j],2))+"\
t"+str(round(qua[j],2))+"\t"+str(round(total[j],2))+"\t"+str(round(SGST[j],2))+"\
t"+str(round(CGST[j],2))+"\t"+str(round(final[j],2)))

print("Grand Total:Rs",round(gt,2))
print("Discount:Rs",round(d,2))
print("Final Payment:Rs",round(fi,2))
print(" HAPPY SHOPPING")
print(" PLEASE VISIT AGAIN")

You might also like