Card File Invoice Generation ![]()
This operation can be found on the Tools menu after opening a card file.
This utility generates a series of invoices based on the contents of a card file database. The data file may have been derived from:
Operators who have entered information directly into a CAPITAL card file.
A data file generated by an external application that was imported into a card file using the Import External File utility found in INSTALLATION Workshop.

Select either Generate Customer Invoices or Generate Supplier Invoices from the Card File Tools menu to generate a batch of invoice transactions.
From Transaction No.
If you have not specified a pre-defined transaction number sequence in your card file (using the Invoiceno field; see below) then you may specify the starting number sequence here. CAPITAL will automatically suggest the next available transaction number available for use. However, it may not use this sequence if the card file already has a sequence.
For a complete list of available fields consult the topic: Card File Special Purpose Fields
Transactions
are assigned transaction type 1 if the transaction type is not specified on the card file or an illegal
transaction type is specified.
Account Code
Enter the account code to bill or leave blank to bill all accounts on the card file. This option will be disabled unless the special purpose field CCODE for customers or SCODE for suppliers exists on the card file.
From Date
Enter the date of the first card file record whose date matches this entry. Leave this entry blank if you want all card files to be included, regardless of the starting date of the card file.
To Date
Enter the date of the last card file record whose date matches this entry. Leave this entry blank if you want all card files to be included, regardless of the ending date of the card file.
To invoice all card files between, say, the 01/10/01 and 15/10/01 you would enter 01/10/01 in the From Date and 15/10/01 in the To Date.
Date To Invoice
Enter the date to assign to all generated invoices. If this is not specified the card file date is used (if available), otherwise the current log-in date is used.
Card File
The name of the card file to generate the transactions from.
The Card File Structure
A card file database must contain a minimum of these fields:
Amount
Numeric Type. This holds the value/amount of the transaction to generate.
CCode
Character type. This holds the customer account code.
Date or Datetoday
Date type. This holds the transaction date.
The Invoice Transaction Number Sequence
If you have specified a transaction number sequence, CAPITAL will use it to assign invoice numbers to the invoices generated by this utility. If the transaction number specified in the card file matches a number that already exists in the invoicing system, then a new transaction for that card file record will not be generated.
The following rules apply:
It is recommended that your card file always include the field Invoiceno when generating customer invoices. If this field does not exist, new invoices are always generated from the contents of the card file, each time the Generate Invoices utility is executed.
It is recommended that your card file always include the field Tranno when generating supplier invoices. If this field does not exist, new invoices are always generated from the contents of the card file, each time the Generate Invoices utility is executed.
For customers or suppliers, if your card file contains the field Invoiceno and the field is empty, then when an invoice is generated the contents of this field will be updated with the invoice number generated by CAPITAL.
For customers or suppliers, if your card file contains the field Invoiceno and the field is not empty, CAPITAL checks to see if this invoice number already exists as an invoice in the CAPITAL system. If its contents match an existing invoice number, then an invoice is not generated.
In other words, if you have the invoice number "1000" in a card file record, and the invoice number 1000 already exists, the record will be skipped over. CAPITAL checks the contents of the field Invoiceno to determine which transaction number to generate.
On the other hand, if the field Invoiceno does not exist in your card file database, CAPITAL will do no checking. A unique number will be generated for each record, starting from the number specified in the From Transaction No. field. This will occur every time you run this utility.
If the field Invoiceno and Tranno exist on the one card file and you are intending to generate supplier invoices in addition to customer invoices, from the same card file record, then the supplier invoice generation process will attempt to use the number stored in Invoiceno and assign it to the supplier invoice as well. The actual number assigned, is stored in Tranno.
IMPORTANT: This utility has global effects on your customer and supplier transaction files. You should
make a back-up of your data before you use it.
Automated Invoice Generation
If the text file CAPSYS.INI exists in your \CAPITAL data root directory, and it contains these entires:
[Card Files]
AutoBill=Yes
Then CAPITAL will check your card file, and if it has a suitable invoice generation structure (it contains account code, date and amount fields), invoices will be generated automatically upon existing Card Files, provided that any need to be created. If you are setting up an Auto Bill system, ensure that you include the Invoiceno and/or Tranno fields on your card file, otherwise the same invoice transactions will be generated repeatedly, each time you close the card file.
Script Based Invoice Generation
An alternate method for generating invoices from card files is to utilise the function CardFileBill() from a CAPITAL Script. For more information on the syntax of the CardFileBill() function consult the Visual Builder on-line help documentation.
____________________________
Related Topics:
Card File Special Purpose Fields
![]() |