Invoice Database File Structure

Top  Previous Topic  Next Topic

The following is useful information for more advanced uses of AnyOrder. It describes the structure of the Invoice data file:

 

Fields data for Sales.dbf.  This is the main file which holds invoices.

 

Sales.dbf

Purpose:  Invoice Database - holds data which appears on the invoice.

Related data files:  

Order.dbf (holds the items that appear on the invoice & is related by Invoice_no)

UserDef.dbf (hold user defined fields, address3 if the user needs it, & shipping fields which can be used for creating shipments by UPS, FedEx and USPS.  Also related by Invoice_no.)

 

 

 

                       

 

 

 

 

 

 

Field

Field Name

Type

Length

Dec

Description

1

INVOICE_NO

NUMERIC

6

 

Invoice Number - This field is used when relating to other files

2

CUST_NO

NUMERIC

5

 

Customer Number - Same as the Cust_no field used in Cust_Num.dbf

3

BILL_NO

NUMERIC

5

 

Billing Number - Same as the Bill_No field used in Cust_Num.dbf

4

BILL_NAME

CHARACTER

33

 

Billing Name

5

ADDRESS1

CHARACTER

33

 

Billing Address1

6

ADDRESS2

CHARACTER

33

 

Billing Address2

7

CITY

CHARACTER

16

 

Billing City

8

STATE

CHARACTER

3

 

Billing State

9

ZIP_CODE

CHARACTER

10

 

Billing Zip Code

10

ZIP_EXT

CHARACTER

1

 

Zip_Ext is no longer - Extension is included in Zip Code above

11

COUNTRY

CHARACTER

20

 

Billing Country

12

SHIP_NAME

CHARACTER

33

 

Shipping Name

13

ADD1

CHARACTER

33

 

Shipping Address1

14

ADD2

CHARACTER

33

 

Shipping Address2

15

CIT

CHARACTER

16

 

Shipping City

16

ST

CHARACTER

3

 

Shipping State

17

ZIP

CHARACTER

10

 

Shipping Zip Code

18

SZIP_EXT

CHARACTER

1

 

SZip_Ext is no longer - Extension is included in Zip Code above

19

SCOUNTRY

CHARACTER

20

 

Shipping Country

20

PO_NUMBER

CHARACTER

25

 

Customer's Purchase Order Number

21

PO_DATE

DATE

8

 

Customer's Purchase Order Date

22

INV_DATE

DATE

8

 

Date of Invoice

23

TAXABLE

LOGICAL

1

 

Are the products on this invoice taxable?

24

TAX_RATE

NUMERIC

7

5

Tax Rate  used to calculate tax on this invoice

25

DISCOUNT

NUMERIC

4

1

Percentage that SubTotal1 is discounted 40.1 = 40.1% Discount

26

LESS_DISC

NUMERIC

9

2

Dollar Amount of Discount

27

SUBTOTAL1

NUMERIC

9

2

Subtotal before discount

28

SUBTOTAL

NUMERIC

9

2

Subtotal after discount

29

TAX

NUMERIC

8

2

Dollar amount of tax (if any)

30

SHIPPING

NUMERIC

8

2

Amount of shipping (if any0

31

TOTAL_DUE

NUMERIC

9

2

Total Due on the invoice

32

CONSIGNED

LOGICAL

1

 

Are the Items shown on this invoice consigned items?

33

FEE

LOGICAL

1

 

Is this a fee invoice?  Are these fees paid to a distributor for storage, etc.

34

PAID

LOGICAL

1

 

Has this invoice been paid?

35

PAYMENT1

NUMERIC

9

2

Amount of first payment on this invoice

36

DATE1

DATE

8

 

Date of first payment on this invoice

37

QUARTER1

NUMERIC

1

 

Quarter in which first payment has been made

38

PAYMENT2

NUMERIC

9

2

Amount of second payment on this invoice

39

DATE2

DATE

8

 

Date of second payment on this invoice

40

QUARTER2

NUMERIC

1

 

Quarter in which second payment has been made

41

BALANCE

NUMERIC

9

2

Balance left on this invoice

42

VISA

CHARACTER

19

 

Credit Card Number

43

INVCLOSED

LOGICAL

1

 

Is this invoice closed?  (User decides to close invoice or not)

44

EXP

CHARACTER

5

 

Credit Card Expiration Date

45

NETDAYS

NUMERIC

3

 

Number of days customer has to pay off invoice

46

INV_QUART

NUMERIC

1

 

A number which indicates how to treat a sale when made up of 2 or more component taxes

47

DROP_SHIP

LOGICAL

1

 

Is this a dropped ship order?

48

SHIPVIA

CHARACTER

25

 

Shipping Method: UPS - ground, USPS Priority, etc.

49

CARD_NAME

CHARACTER

25

 

Name on Credit Card

50

CARD_AUTH

CHARACTER

12

 

Credit Card authorization number

51

CARD_REF

CHARACTER

12

 

Credit Card reference number - or Credit Card Verification Code (only saved temporarily)

52

NOTES

MEMO

10

 

Memo Field - Include user's notes concerning invoice.  Any notes enclosed in {{  }} will appear on printed invoice.

53

LOCKRECORD

LOGICAL

1

 

Is this invoice locked for editing?

54

SELECT

LOGICAL

1

 

Select is used internally by the program for temporarily selecting invoices

55

PHONE

CHARACTER

20

 

Customer's phone number

56

INVCODE

CHARACTER

3

 

Invoice Code - This can be used by the user to code their invoices

57

NOROYALTY

LOGICAL

1

 

When true, then none of the items listed on this invoice should be counted for royalty purposes

58

SHIPNC

LOGICAL

1

 

When true, the shipping amount shown on the invoice is not charged to the customer

59

SELECT2

LOGICAL

1

 

Another field used internally by the program for selection purposes

60

EMAILADD

CHARACTER

35

 

Customer's email address

61

PAIDVIA

NUMERIC

1

 

User can set up payment methods.  1=Check 2=Cash 3=Card & the user can defined up to 6 more

62

ISONAME

CHARACTER

3

 

Currency ISO Name

63

TRACKINGNO

CHARACTER

22

 

Shipper's Tracking number

64

SDATE

DATE

8

 

Date of shipment

65

NOTAXITEMS

NUMERIC

9

2

Total Amount of items which should not be taxed on an invoice that includes both taxable and non-taxable items

66

REPCODE

CHARACTER

3

 

Representative Code - used to code invoices when a sales representation should receive a commission on the sale

67

TAXCODE

CHARACTER

3

 

Tax Code - used when a user has to use different tax rates depending upon the area in which the sale takes place

68

ADCODE

CHARACTER

3

 

Advertising Code - used to determine how much was generated from an advertising campaign

-------

-----------------------

--------------

--------

-----

 

** Tota

l **

 

697