This code is for the billing system for 30 pre-recorded items. The record file saves the product ID, product name, cost and total quantity available. The sales.json file saves the number of total purchases made by customers and also saves the total cost. THE IMS.ipynb file contains the code to generate the bill and has the following functions:
- The user can enter the total number of items he wants to buy and the quantity of each item. The total cost is added with each purchase, number of purchases and number of products available updated.
- If the quantity user wants to buy is more than that available, then an error message is generated.
- Before billing, the user is asked to confirm if all purchases are done. If not, then the buying loop (point 1) starts again.
- After the confirmation, the system generates a random purchase suggestion to the user(using random.randrange function)
- According to the total bill cost, certain discount is provided to the costumer.
- The bill has prints the current date, time, total number of items bought, total MRP, discount and total cost(MRP-discount)