A typical command line inventory management using Python (JSON based)
There are mainly two interfaces:
- For the Worker - ServerSide
- For the customer - CustomerSide
And the JSON files being generated/used are:
- inventory.json - To keep track of all the products (includes those which are out of stock too)
- outOfStock.json - To keep track of the products out of Stock
- sales.json - Details of each bill generated
- productSales.json - Each product sale descripion
Allows the worker to update the stock, as well add new products.
Operates on 'inventory.json' file
Lists out all the Available products to the user, allowing them to buy the products and generates bill.
Operates on all the JSON files mentioned above.
{
"ProductID": {
"name": ,
"price": ,
"quantity":
}
}
{
"ProductID DD/MM/YYYY HH:MM": {
"name": ,
"price":,
"TimeDetail":
}
}
{
" DD/MM/YYYY HH:MM:SS": {
"ProductID1": {
"Qn": ,
"total_price":,
"name":
},
"ProductID2": {
"Qn": ,
"total_price":,
"name":
}
}
}
{
"ProductID DD/MM/YYYY HH:MM": {
"Qn": ,
"total_price": ,
"name":
}
}