Standard Interchange Format (for Invoices)
The CAPITAL EDI Standard Interchange Format is described in the tables below. The standard delimit character is ASCII tab (character 09).
The CAPITAL EDI Standard Interchange Format is output to a standard ASCII text file made up of a series of tab delimited lines. There are three sections to the Standard Interchange Format as follows:
Header
Record
Details
Record
Totals
Record
For example:
"H" <tab> "00001000" <tab> "ABC" <tab> ...
"D" <tab> "00001000" <tab> "J5673ZB/T" <tab> ...
"D" <tab> "00001000" <tab> "MAN2931" <tab> ...
"D" <tab> "00001000" <tab> "H1623-33b" <tab> ...
"T" <tab> "00001000" <tab> 328.23 <tab> 31.55 <tab> ...
"H" <tab> "00001001" <tab> "ACME" <tab> ...
"D" <tab> "00001001" <tab> "3313/C" <tab> ...
"D" <tab> "00001001" <tab> "23864-FLAT" <tab> ...
"D" <tab> "00001001" <tab> "SONIC312B" <tab> ...
"T" <tab> "00001001" <tab> 125.50 <tab> 10.25 <tab> ...
There is one header record for each transaction that is exported. There may be multiple details records, and these are related to the number of line items contained on the transaction. Then there is one Totals record.
This pattern repeats for each transaction that is contained in the exported file until the end of the file is reached.
|
Header Record Format | ||
|
Field |
Description |
Maximum
|
|
InvoiceNo |
Transaction number padded with leading zeros. Alphanumeric transaction numbers are allowed, in which case the alpha portion is displayed to the left of the number and then padded with zeros. For example: 000001000 A00003999 |
9 |
|
Date |
Date is in YYYYMMDD format. |
8 |
|
Account |
Account code. |
8 |
|
Billcode |
Account billing code. This is the same as the account code unless the account is a sub-account, in which case this code will be the head office account code. |
8 |
|
Name |
Name that appears on invoice. |
44 |
|
Address |
First invoice address line. |
44 |
|
Address2 |
Second invoice address line. |
44 |
|
Suburb |
Suburb invoice address line. |
33 |
|
State |
Invoice state. |
3 |
|
Postcode |
Invoice postcode. |
4 |
|
Delivery Name |
Delivery name that appears on invoice. |
44 |
|
Delivery Address |
Delivery address on invoice. |
44 |
|
Delivery Address2 |
Second delivery address line. |
44 |
|
Delivery Suburb |
Delivery suburb line. |
33 |
|
Delivery Postcode |
Delivery address postcode. |
4 |
|
Delivery State |
Delivery address state. |
3 |
|
Reference |
Standard transaction reference field. |
23 |
|
Reference2 |
Second reference field (user definable). |
15 |
|
Reference3 |
Third reference field (user definable). |
15 |
|
Reference4 |
Fourth reference field (user definable). |
15 |
|
Tax Number |
Tax reference field if applicable. |
15 |
|
Taxable |
This field contains a Y if the transaction is taxable, otherwise N if tax does not apply. |
1 |
|
Salesperson |
Salesperson field. |
16 |
|
Transaction Type |
A code between 1 and 8 which indicates the transaction type. Transaction types in CAPITAL are user definable. By default 1 = invoice, 2 = adjustment note. |
1 |
|
Shipped |
The shipment reference code. E.g., the shipping method. |
15 |
|
Details (Body) Record Format | ||
|
Field |
Description |
Maximum Size |
|
InvoiceNo |
Transaction number padded with leading zeros. Alphanumeric transaction numbers are allowed, in which case the alpha portion is displayed to the left of the number and then padded with zeros. For example: 000001000 A00003999 |
9 |
|
Name |
Product code used by company. |
25 |
|
Name2 |
Alternate product code such as the AEAN code. |
25 |
|
Title |
Product description. |
40 |
|
Sell Price |
The unit sell price excluding tax. For example, 12.25 |
17 with up to 4 decimal precision. |
|
Sell Price Inclusive |
The unit sell price inclusive of tax. For example, 13.48 |
17 with up to 4 decimal precision. |
|
Quantity |
The quantity shipped. For example, 25.5 |
14 maximum with up to 5 decimal precision. |
|
Tax Amount |
Total line item taxable amount. For example, 15.53 |
15 with 2 deicmal precision. |
|
Tax |
Tax code. This is a numeric code between 0-9999 that is user definable. For example, 1 = GST or some other applicable tax rate. Zero (0) is always equivalent to tax/GST free. |
4 |
|
Totals (Summary) Record Format | ||
|
Field |
Description |
Maximum Size |
|
InvoiceNo |
Transaction number padded with leading zeros. Alphanumeric transaction numbers are allowed, in which case the alpha portion is displayed to the left of the number and then padded with zeros. For example: 000001000 A00003999 |
9 |
|
Amount |
Invoice total amount. E.g., 100.00 |
15 with up to 2 decimal precision. |
|
Tax Total |
Total tax amount charged. |
15 with up to 2 decimal precision. |
|
Freight |
Total freight and/or handling amount charged. |
15 with up to 2 decimal precision. |
|
Exchange |
Exchange rate factor. For Australian (local currency transactions) this is 1 or 0. |
12 with up to 6 decimal precision. |
|
Rounding |
Rounded adjustment amount, typically for coin rounding. E.g., closest .5c amount. This is the difference between the invoice total amount and the additional of all the items on the transaction. |
8 with up to 2 decimal precision. |
You can change the delimiter character by creating a file called CAPEDI.INI. For the delimit character to use, add and then change, these lines:
[Capital EDI Gateway]
Delimiter=9
Adding User Fields To The Output File
You may include user defined fields in the output file by creating a file called EDISPEC.DAT that resides in the EDICAP.EXE program directory. The EDISPEC.DAT file must have the following structure:
Section, index order, usertable, parent, keyfield, field1, field2, ...
For example:
H,CUAUX0001,1,CUSTREC,CUSCODE,ABN,RETAINED,RATING...
|
Segment |
Explanation |
|
Header Descriptor |
H, D or T depending on where the data should appear in the output file. |
|
Index Order |
Normally the key field to seek/match in the parent record. |
|
User Table |
The user table to retrieve data from. |
|
Parent |
The parent database table from which user information is related. Acceptable parents include REMIND, INVOICE, CONTENTS, STOCK, TAXTABLE and CUSTREC. |
|
Key Field |
This is the field into which the parent database table will match the record into the user table. |
|
Field1 |
The first user field to include in the ouput stream. |
|
Field2 |
Further fields are optional. |
The EDISPEC.DAT file may contain multiple lines specifying different or the same files and relations. If this is the case the software will combine the lines as necessary. For this reason, only one type of relation can be specified for any pair of files, if entered on multiple lines. In other words the same file could have been written like this:
H,CUAUX000,1,CUSTREC,CUSCODE,ABN
H,CUAUX000,1,CUSTREC,CUSCODE,RETAINED,RATING
If a file which is not related to any of the master files is used, the order can be specified as 0 or skipped like this:
,,
Then the relation will not be set and the top record will be used for data retrieval.
This would be useful if identifier data (such as company information which is only entered on one record) needs to be included in the output file.
28/03/02