hi all,
I'm trying to keep track of financial transactions, including customer
account balances in my database. In this database customers can
purchase and return (refund) goods. Purchases/Refunds may take place
using cash,credit cards,pos systems, or using the customers account
(credit/debit).
My proposed solution is this:
The following two tables are not up for discussion, I've simply added
them to give a clearer picture.
Table Booking: this is a table to allow customers to put a hold on
goods,who the goods are for, and the sale price (there is a reason for
the sale price being here but I dont want to get into that). It would
also have the moneytransferId (fk,see below).
Table Refund: Refund details including refunded amount, and
moneytransferId(fk)
The financial tables ...
Table CreditTransfer : A table to allow customers to top up their
accounts
unique id,
moneytransferid (fk),
$amount
Table MoneyTransfer : A Generic table
unique id,
time and date of transfer,
type of transfer (purchase/refund/credit account)
mode of transfer (cash,credit card,pos,account)
accountid(fk)
Table CreditCard : A table holding credit card details.
Table POS : A table holding pos details if required.
The system will encourage the same 'mode of transfer'
(cash/creditcard/pos..) for the refund as was used in the purchase -
so if you buy using your creditcard the system will try to refund the
money onto the same credit card.
And finally
Table Account : Account details
Table AccountBalance: A table that expresses the correct account
balance at that point in time. A row may be created every month.
accountid
timeanddate
amount
Is this design sound? Please post especially if you have financial db
experience.
Thanks,
news
jerry gitomer - 21 Jun 2004 14:09 GMT
> hi all,
> I'm trying to keep track of financial transactions, including customer
[quoted text clipped - 4 lines]
>
> My proposed solution is this:
[ Proposed solution omitted ]
> Is this design sound? Please post especially if you have financial db
> experience.
>
> Thanks,
> news
The technical quality of any solution is moot if it does not
satisfy external requirements, e.g. SEC, IRS, AICPA, etc.
Before you ask us if this is a sound solution you should go to
your accounting department and find out what is required.
HTH
Jerry