Python Classroom Series – 06/Jul/2021

Implementing Sales in Inventory

  • Implement the sales functionality where the quanity of the items should be reduced and a new files sales.json should be created with fields
{
    "sales": {
        "<id>" : {
            "<productid>" : 1,
            "quanity": 1,
            "datetime": <datetimeof purchase>
        }
    }
}
  • Refer Here for the code updated to reduce the sale quantity in the inventory file.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin