0% found this document useful (0 votes)
62 views2 pages

Sales Invoice Generator Script

The document is a Python script for generating a sales invoice at a shopping mart. It collects product details including name, category, price, and quantity, calculates taxes based on the category, and applies a discount based on the total amount. Finally, it prints a formatted invoice with all the details and the final payment amount.

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)
62 views2 pages

Sales Invoice Generator Script

The document is a Python script for generating a sales invoice at a shopping mart. It collects product details including name, category, price, and quantity, calculates taxes based on the category, and applies a discount based on the total amount. Finally, it prints a formatted invoice with all the details and the final payment amount.

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
[Link](n)
[Link](c)
[Link](p)
[Link](q)
[Link](t)
[Link](sg)
[Link](cg)
[Link](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("[Link]\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