|

Integration
Integrating Accounting for Delphi with custom applications is
probably much easier than you might expect. No modifications to the AFD code are required,
just the creation of transactions in the appropriate batch files. Complete details are
provided in the following topics:
Integrating with the General Ledger
Integrating with Accounts Receivable
Integrating with Order Entry
Integrating your invoicing application with
the AFD General Ledger:
Please note: This process is only necessary if you are not
using AFD's OE module.
Your Order Entry or Point-of-Sale application should be
capable of mapping each invoice line item to your customer's GL revenue and tax liability
accounts. As an example, let's use a VAR that provides hardware, off-the-shelf software,
and custom software to their clients. They collect state sales tax on the first two
categories. This firm would likely have three revenue accounts plus a liability account
for the sales tax. i.e.
00-00-4000 Sales - Hardware
00-00-4000 Sales - Commercial Software
00-00-4002 Sales - Custom Software
00-00-2107 Accrued Ohio Sales Tax
The first step is to roll up all invoice line items by GL account. In the
above case, you'll end up with four totals. (NOTE: If you are also integrating with AFD's
AR module, the above totals should include only non-AR transactions. AR integration is
described elsewhere.)
Step two is to retrieve the value from the
NextBatch field in the SYS table, increment it, and store the new value back to the field.
You can use our NextBatch function to handle the locking if desired.
Step three: Add a record to the BATCHTTL
table. Fill the fields with the following values:
Step four: Add one record to the BATCHDET
table for each revenue/liability account:
| Id |
Leave empty |
| Acct |
The GL revenue or liability account number |
| Invc |
Leave Empty |
| Date |
The current date |
| Debit |
The total from your roll up, if a negative
value |
| Credit |
The total from your roll up, if a positive
value |
| Period |
The value from the GLPERIOD field in the SYS
table |
| Batch |
The value you retrieved from SYS above.
Convert to a string and right justify |
| Desc |
Transaction description. i.e. "To record
Order Entry Sales" |
| Reversing |
False |
Step five: Add one record to the BATCHDET
table for the cash account:
| Id |
Leave empty |
| Acct |
The GL cash account number |
| Invc |
Leave Empty |
| Date |
The current date |
| Debit |
The total from your roll up, if positive (the
norm) |
| Credit |
The total from your roll up, if negative
(almost impossible) |
| Period |
The value from the GLPERIOD field in the SYS
table |
| Batch |
The value you retrieved from SYS above.
Convert to a string and right justify |
| Desc |
Transaction description. i.e. "To record
Order Entry Sales" |
| Reversing |
False |
The bookkeeper will run the General Journal for that batch,
just as is done for the manually-posted ones, and once satisfied will initiate the posting
process. In some systems, virtually all transactions will come from external programs such
as Accounts Receivable, Accounts Payable, and Point of Sale.
Please note: This process is only necessary if you are not
using AFD's OE module.
Your Order Entry or Point-of-Sale application should be
capable of mapping each invoice line item to your customer's GL revenue and tax liability
accounts. As an example, let's use a VAR that provides hardware, off-the-shelf software,
and custom software to their clients. They collect state sales tax on the first two
categories. This firm would likely have three revenue accounts plus a liability account
for the sales tax. i.e.
00-00-4000 Sales - Hardware
00-00-4000 Sales - Commercial Software
00-00-4002 Sales - Custom Software
00-00-2107 Accrued Ohio Sales Tax
Step one is to retrieve the value from the NextBatch field in the SYS
table, increment it, and store the new value back to the field. You can use our NextBatch
function to handle the locking if desired.
Step two: Add one record to the BATCHTTL
table. Fill the fields with the following values:
| Batch |
The value you retrieved from SYS
above. Convert to a string and right justify |
| Total |
The sum of all invoices to be
posted. |
| Debits |
Same as above |
| Credits |
Same as above |
| Date |
The current date |
| Batch Type |
"AR" |
| Period |
The value from the ARPERIOD field
in the SYS table |
| Prn Journal |
False |
| Closing |
False |
Step three: Add one record to the ARBATCH
table for each invoice that gets added to AR. Note that step three and step four get done
concurrently for each invoice. Fill the fields with the following values:
| Batch |
The value you retrieved from SYS above.
Convert to a string and right justify |
| Id |
The customer ID |
| Reference |
Retrieve this from the REFERENCE field in the
SYS table. Increment the number and store it back. Similar to getting the next batch
number. This field is the link between the ARBATCH and ARBTCHDT tables. Use a new
reference number for each record added. |
| InvNo |
Your invoice number |
| Desc |
A description of the transaction. i.e.
"Sales Invoice" |
| Date |
The date of the invoice |
| Bal |
The total amount of the invoice, including
taxes, etc. |
| Amt |
Same as above |
| Type |
"IN" |
| Entity |
The entity/subsidiary that generated the
invoice. Only relevant if the end-user is running multiple companies but must be filled. |
Step four: Add one record to the ARBTCHDT
table for each GL account represented on your invoice. i.e. If your invoice has three line
items that all have the same GL account, roll those up and post as one record in this
table. Fill the fields with the following values:
| Acct |
The GL revenue or liability account number |
| Date |
The current date |
| Amount |
The total from your roll up, may be a positive
or negative value |
| Desc |
Transaction description. i.e. "From
Invoice #nnnnnn" |
| Reference |
From ARBATCH |
| Batch |
The value you retrieved from SYS above.
Convert to a string and right justify. |
There are cases where you may want to feed AFD's OE module
for the purpose of creating invoices, orders, or quotations. These documents can then be
edited by the user and printed en masse, and finally, posted to AR and GL. Note that only
invoices are considered to be accounting documents. Quotes and invoices do not get posted
nor do they have any effect on the financial reports.
Step one: Add one record for each invoice
to the OE table. Fill the fields with the following information:
| ID |
The customer ID |
| Type |
"I" for Invoice, "O" for
order, "Q" for quote |
| Number |
The value from the OEINVOICE field in the SYS
table. Increment it and store back the new value. Use OEORDER or OEQUOTE for orders or
quotations. |
| Entity |
Leave empty |
| Salesman |
Salesperson's name - from the SALESMAN table |
| NumberFrom |
Parent document, if this is being created from
another invoice, order or quote. Leave blank otherwise. |
| NumberTo |
Leave empty |
| Date |
The invoice date |
| Subtotal |
The sum of the PRICE field for all line items
for this invoice from the OEDET table. |
| Cost |
The sum of the COST field for all line items
for this invoice from the OEDET table. |
| TaxAuth |
The applicable tax authority from the TAXAUTH
table |
| SalesTax |
The total sales tax |
| FedTax |
GST total if in Canada |
| ShipTo1 |
Ship To name and address |
| ShipTo2 |
Same as above |
| ShipTo3 |
Same as above |
| ShipTo4 |
Same as above |
| ShipTo5 |
Same as above |
| ShipTo6 |
Same as above |
| OnAccount |
True if this invoice should be posted to AR,
False if a cash sale |
| Printed |
False |
| Posted |
False |
| Comments |
A memo field containing additional comments.
These will be printed at the bottom of the invoice. |
| Closed |
False if a back order is to be created for
items ordered but not shipped, otherwise True |
| PONumber |
Customer's purchase order number if available |
| Terms |
Terms. i.e. "Net 30" - From the CUST
table |
Step two: add one record per line item to
the OEDET table. Fill the fields with the following information:
| Type |
Same as TYPE in the OE table |
| Number |
Same as NUMBER in the OE table. |
| Item |
The item number being sold |
| Location |
The inventory location if multiple inventory
locations are being used, "A" if not. |
| QtyShip |
Quantity actually shipped. |
| QtyOrder |
Quantity Ordered |
| Price |
The selling price per unit. |
| Extend |
Price times quantity shipped. |
| Cost |
Unit cost from the ITEM table |
| Notes |
An extended description. Prints below the line
item. |
ColumbuSoft - Columbus, Ohio
1+(614) 885-7789 Fax:+1 (614) 885-2077
E-mail: mail@columbusoft.com
Last updated: Tuesday, February 03, 2004 05:24:25 PM
|