I am trying to build a system to keep track of all my expenses. It should be fairly robust, but its not like I am building a system for some large grocery chain. Data entry is based off of receipts, so things like “Tax” and “Total” are simply keyed in and not calculated.
So far I have this…
EXPENSE:
- id
- expense_date
- subtotal
- tax
- total
- relates_to
EXPENSE_DETAILS:
- id
- expense_id
- product_id
- quantity
- actual_price
- returned
What is the best way to handle “Returns”?
Originally I was going to add a “Credit” column to the EXPENSE table, but then realized two issues. First, there could be multiple returns. Second, on things like my credit card statement, a return is treated like a different transaction, so it seems better to have the original purchase be the 1st EXPENSE and then the return be the 2nd EXPENSE but showing as a negative value.
Returns are always treated as different transactions in an accounting system. It is always better to have a new entry into the expense table - it can be positive or negative value (up to the you). Also, in case a sale was made for product “A” and quantity “10”, and later “2” of the product items are returned, this scenario cannot be dealt in a single line with additional column. Hope this clarifies.
I guess I could have an ID=6 and show the returned item here with a negative price, but since I am not subtotaling line items off of each receipt and just using the receipt total, I was just going to denote which if any items were returned.
I think this is consistent with what you are recommending?