Printing Invoices

There are two ways to print out customer invoices:

1. From the Inquire, Update, Add Program where you can print out the invoice for the invoice record displayed on your screen.

Simply make sure you have the record displayed and you are not in the update mode. Press <F> for “Print Form”, then type or select the name of the invoice output format, which is “invoice”.

2. From the Request Output program (option “D” on the main menu) where you can print out several or all the invoices, selected and sorted to your specifications.

Printing invoices from the Request Output program

If you have created all the files, screens, processing tables, and data shown in this tutorial so far, (the “invc” file structure, screen, and processing table have been pro-vided for you), use the file name “invc” when asked for a file name in this lesson. If you have not created everything shown so far, use the file name “fpinvc”.

1. From the main menu, select option “D - Request Output”. For file name, type or select:

fpinvc (or invc)

2. For output format name, type or select:

invoice

Since we have specified our own sort criteria, we want to bypass using any of the automatic indexes when printing the invoice forms. Press <RETURN> to bypass choosing an automatic index.

If you had chosen Index “A”, the invoices would have been sorted in “invoice number” order.

If you had chosen index B, the invoice would be printed in “customer number” order. The sort screen we defined is now displayed. From here you could override this default sorting order by specifying different fields, or by adding additional fields.

For now just press <ESC> to accept the sort criteria shown.

To the “Select All Records?” prompt press <Y>.

After the invoices are sent to your printer you are returned to the main menu.

Adding Processing to an Output Format

The output format that you just ran prints all the invoices on file, even if they have already been printed before. Let’s change it so it prints only those invoices that have never been printed before. To do this we will have to add a new field to the “fpinvc” (or “invc”) file. This new field will be used to contain the date on which each invoice was printed. Next we will have to add processing for the invoice format to post the invoice print date and a selection set so that only those records with a blank invoice print date are selected.

 

1. From the main filePro Plus menu select choice “1- Define Files”.

2. For the file name use “fpinvc” (or “invc”). Don’t change the creation password.

3. When the file structure is displayed press <U> to update the structure. Use the down arrow key to move to the next free field (field 34).

4. For the field heading use “invoice print date”. For the length use 8. For the field edit type use “mdy/”.

5. Press <ESC> to save your changes. Then press <X> to exit the program. Just press <RETURN> to all prompts until you are returned to the main menu. Now we need to create a very simple processing table to be used when running the ‘Invoice output format

6. Take choice “5 - Define Processing”. Use the file name “invc” and the take choice “3- Output Processing”.

7. We want to create a new processing table. Press <RETURN> with the highlight on [NEW]. Use the format name “invoice” (the same as our report).

8.    When filePro Plus runs an output format it looks for a processing table with the same name. If it finds one, it uses it during output. On the “Then:” line of element 1 type: "34 = @td". This tells filePro Plus to place into our new field 34 the contents of the system maintained “today’s date” field.

9. Save the processing table by pressing <ESC>. Press <Y> to the syntax check and <RETURN> to the hardcopy prompts. Return to the main menu by pressing <X>.

Now lets run the invoice format again.

10. Take choice “D - Request Output”. Use file name “fpinvc”(or “invc”) and for-mat name invoice. Do not select by any index, just press <RETURN> to the “Select by Index” prompt.

11. Next, accept the sort parameters by pressing <ESC> to the sort screen.

12. At the “Select All Records” prompt press <N>.

13. You are now presented with the “Extended Selection” screen. This screen allows you to specify up to 12 fields or criteria to be used to select records. Press <U> to update the criteria.

14. Skip over the “group” column by pressing <RETURN>. For the field specify “34” (our invoice print date field) and press <RETURN>. For the Rel (relationship) column enter “eq” (for equal to) and press <RETURN>. Here is a complete list of possible relationships:

 

 

EQ or (blank)

Equal To

 

NE

Not Equal To

 

GT

Greater Than

 

GE

Greater Than or Equal To

 

LT

Less Then

 

LE

Less Than or Equal To

 

 

 

15. Now press <ESC> to exit the update mode. We can rephrase what this selection set says as follows: select all records where field 34 is equal to blanks.

16. Now we want to save this selection set for future use so press <S> for save. Take the choice [NEW]. For the selection set name use “new”. Once the selection set is saved press <RETURN> to select records.

Our invoice format prints all the invoices again but this time it is posting field 34 with today’s date. Later, when we create a menu for this application, we will make two choices for printing invoices. One will use this “new” selection set to print only those invoices that have never been printed before. The other will be used to print all invoices even if they have been printed before. Remember, if you want to reprint a single invoice you can do so at any time by going into “Inquire, Update, Add” on the invoice file, finding the record you want to print, and pressing <F>. The form name is, of course, “invoice”.