nagy-nabil / POS

POINT OF SALE
https://pos-git-demo-zagy.vercel.app/en/signin
1 stars 0 forks source link

[FEATURE REQUEST] spendings/ losses tracking #40

Open nagy-nabil opened 1 year ago

nagy-nabil commented 1 year ago
nagy-nabil commented 1 year ago

COPY PASTE FROM MY NOTION

what the outcome should be?

You can think of expense_store and expenses as products and orders, where you store products and later add them to order to gain profit, but expenses are the opposite you add them to expenses table to indicate losses

Losses are not periodic thing so won't try to store them before hand

any notes?

nagy-nabil commented 1 year ago

COPY PASTE FROM MY NOTION

Losses

unlike expenses/spendings i think losses are more related to products

in other words my mental model is the following

so the user should use spendings/losses system like this:

image



id cuid
name text
additionalAmount float
// losses are just like order
// you can loss more than product at a time 
// need to take snapshot of the product while the time of 
// loss to correctly calc the loss amount
// need quntity of each item
many to many relation between loss and products in the loss

DON’T FORGET TO DECREASE THE INVENTORY AFTER ADDING THE LOSS.