software best practices


C

Cydrome Leader

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?
 
Ad

Advertisements

J

Joe Canuck

Cydrome said:
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?
You are the programmer, you tell us. :-D
 
M

Mark H

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.
 
M

Mark H

Cydrome Leader said:
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?
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.
 
C

Cydrome Leader

Mark H said:
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
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.
 
D

David Jensen

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.
Use the data format that your accounting software uses for imports.
 
Ad

Advertisements

C

Cydrome Leader

David Jensen said:
Use the data format that your accounting software uses for imports.
It really doesn't support anything close to what's being done in this
case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top