Mysql – Advice designing a stock management database

database-designMySQL

I am developing a webapp for my business, a mobile phone repair shop. The problem I have is I don't know how exactly to implement a way to manage the parts inventory.

Here what i have now:

{Parts(id, name)} 
{Inventory(id, part_id, initial_qty, current_qty, initial_price, current_price)} 
{Operations(id, name)} 
{Inventory_Operation(id, inventory_id, operation_id, explanation, qty, price)}

I need to have a possibility to add inventory, sell inventory, add inventory to repairs, mark inventory as bad, return inventory.

I am developing using MySQL.

LE

ERD

As i mentioned before, the app will manage all of the shop repairs, i have the rest figured out, but this inventory management part of the database i cannot get a clear image.
When i buy parts from suppliers i need to add them to the inventory (they dont have serial numbers, i only need the quantity), then when i do a repair, and use a part, then the inventory for that part must be decreased, sometimes after a repair the client comes back because the part is not ok, and i need to offer warranty so i need to mark that part as defective in the inventory, other times i do the repair and the client declines to pay so i must return the part to the inventory. The other problem is, i can receive the same part with different price, or different supplier.

LE 2
I have made the whole app db diagram, the diagram is more or less accurate.
enter image description here

Best Answer