Have a collection (sells by branches) called "operations" with documents like:
{id: 1, branch: "a", amount: 5, type: "sell"} {id