> My client just want to see a list of items, stock balance and the total cost of each items. My consideration now is, should I copy all necessary data into another tables inorder to generate closing report, or.. generate report once user press closing stock button and store the report result only nto table? Any comments?
I give my Users the ability to generate "stock balance" reports at any time; they don't have to wait until the period is closed. These reports are usually based on an "as of" date; one retrieves "closing balances" for one given period, adds in the transactions for a given period, and arrives at a "closing balance" for the given period.
This "one report" usually turns out to be "multiple" reports; eg. for a range of items, certain types of items, items with no activity, by dollar cost, etc.
As far as "copying", this is only necessary if it is not possible to extract data for a given data range, which means that there is a serious design flaw in the system. Transactions should have dates, and at the very least, there should be some sort of current "opening balance" somewhere; adding the two together will provide current balances for any period.
Intermediate tables are usually only employed if the reports require mulitple passes of the data or some other special processing; these tables are then deleted when no longer required. There may be some other considerations that only you are aware of; do whatever YOU think is right.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement