software best practices

I'm working on a project that has to have accounting-like features. It will generate statements and record payments and charges against each account.

It will store all information in a database.

Is there a preferred way to store a charge or a credit? The easy way is charges are simply a + dollar value applied to the account, and a payment is a negative amount. A sum of all charges/payments is the customer balance.

Another possibility is charges are payments are stored with no + or - value but with a flag indicating what has happened, and another way that would resemble more of a ledger book woud be to store charges and payments in separate fields. It was also suggested that a computed value of the customer balance be externall calculated and reinserted into a field in the database to allow for error checking, in the case a row or transaction is somehow lost or deleted.

What are some methods used for doing this?

Reply to
Cydrome Leader
Loading thread data ...

You are the programmer, you tell us. :-D

Reply to
Joe Canuck

It sounds like you're building a general ledger application. If that's correct, it is most likely for a smaller company. If this is also correct, I would recommend buying an off-the-shelf application that provides the basic g/l capabilities you're looking for. There are a number of them at reasonable prices commercially availalble. The cost will be far less than building from scratch as would appear to be currently contemplated given your question. Your energies would be much more valuable spent doing something else (e.g., learning & implementing the new software, building the business, etc.) rather than building a product for which there are cost-effective, commercially available alternatives.

Reply to
Mark H

Having provided an opinion in my prior response, I'll answer the question you pose in this one....

One of the 'best' ways of storing the information you're working with is to

1) store information about each account as to it's "natural" balance (i.e., assets & expenses have natural debit balances, liabilities, income & equity have natural credit balances); 2) store all debits (regardless of which account they affect) as positive numbers, store all credits as negative numbers.

With this approach, you can easily summarize and develop robust reporting capabilities from your application. Validation & error checking will be easily done at any level (e.g., at input, at summarization of data, etc.). For example, the sum of all accounts should always be zero if everything is in balance.

Reply to
Mark H

It's a bit more complicated than this, there is no off the shelf product that will gather the information to create bills for customers. It really has to be done from scratch in this case.

All this program has to do is automatically generate charges for customers based on extranal data it will gather. Any other transactions related to the company are handled by off the shelf products.

Reply to
Cydrome Leader

Use the data format that your accounting software uses for imports.

Reply to
David Jensen

It really doesn't support anything close to what's being done in this case.

Reply to
Cydrome Leader

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.