id |
integer |
Yes |
Yes |
nextval('sales_history_id_seq'::regclass) |
|
invoice_no |
character varying(10) |
No |
No |
|
Invoice number |
cust_no |
character varying(20) |
No |
No |
|
Customer number |
cust_name |
character varying(60) |
No |
No |
|
Customer Name |
cust_po_no |
character varying(20) |
No |
No |
|
Customer PO number |
order_date |
date |
No |
No |
|
Order date |
status |
character varying(1) |
No |
No |
|
Always O |
invoice_date |
date |
No |
No |
|
Invoice Date |
required_date |
date |
No |
No |
|
Date required for the order |
po_no |
character varying(20) |
No |
No |
|
Reference number |
territory_code |
character varying(10) |
No |
No |
|
Territory code |
salesperson_no |
character varying(10) |
No |
No |
|
Salesperson code |
discount |
numeric(5,2) |
No |
No |
|
Discount percentage |
terms_code |
character varying(10) |
No |
No |
|
Terms code |
terms_description |
character varying(60) |
No |
No |
|
Terms description |
terms_days_before_due |
smallint |
No |
No |
|
Number of days from invoice date before payment due |
terms_days_allowed |
smallint |
No |
No |
|
Number of days from invoice date that are allowed for the terms discount |
terms_discount_rate |
numeric(5,2) |
No |
No |
|
The terms discount percentage |
ship_id |
character varying(20) |
No |
No |
|
Customers ship to ID selected for this invoice |
currency |
character varying(3) |
No |
No |
|
Currency for this invoice. Blank = Base |
currency_rate_method |
character varying(1) |
No |
No |
|
Currenct conversion method used / = Direct' * = Indirect |
currency_rate |
numeric(13,7) |
No |
No |
|
Currency rate used |
ship_via_code |
character varying(10) |
No |
No |
|
Ship via code |
print_pack |
boolean |
No |
No |
|
Date that the order was processed |
pack_date |
date |
No |
No |
|
Date that the order was processed |
pack_init |
character varying(3) |
No |
No |
|
Users initials that lasted proccessed the order |
print_ship_labels |
boolean |
No |
No |
|
Not used |
ship_labels_date |
date |
No |
No |
|
Not used |
ship_labels_init |
character varying(3) |
No |
No |
|
Not used |
fob |
character varying(20) |
No |
No |
|
Free On Board assigned to the invoice |
last_deposit_date |
date |
No |
No |
|
Date of last deposit made. Blank if it was not a deposit order |
last_deposit_amount |
numeric(15,2) |
No |
No |
|
Last deposit amount. Blank if it was not a deposit order |
total_deposit |
numeric(15,2) |
No |
No |
|
Total deposits made. Blank if not a deposit order |
deposit_flag |
boolean |
No |
No |
|
Was deposit order True = Yes FALSE = No |
was_quote |
boolean |
No |
No |
|
Was quote True = Yes FALSE = No |
orig_quote_no |
character varying(10) |
No |
No |
|
Original quote number. |
notepad |
boolean |
No |
No |
|
Had note |
serialized_items |
boolean |
No |
No |
|
Has serialized items on invoice |
subtotal |
numeric(15,2) |
No |
No |
|
Sub total before taxes, discount and freight. |
total_discount |
numeric(15,2) |
No |
No |
|
Total discount amount. Does not include line discounts |
freight |
numeric(15,2) |
No |
No |
|
Total freight |
sales_tax |
numeric(15,2) |
No |
No |
|
Total of all sales taxes |
gross_profit |
numeric(15,2) |
No |
No |
|
Total gross profit |
total_current_cost |
numeric(15,2) |
No |
No |
|
Total current cost |
total_average_cost |
numeric(15,2) |
No |
No |
|
Total average cost |
total |
numeric(15,2) |
No |
No |
|
Grand total of invoice |
e_download_date |
date |
No |
No |
|
Not used by Spire |
ex_date |
date |
No |
No |
|
Not used by Spire |
last_inv_no |
character varying(10) |
No |
No |
|
Not used |
last_inv_date |
date |
No |
No |
|
Not used |
payment_method |
smallint |
No |
No |
|
Payment method |
payment_division |
character varying(3) |
No |
No |
|
Division usd for invoice |
payment_gl_account |
character varying(24) |
No |
No |
|
GL account used for payment |
pos_user_id |
character varying(12) |
No |
No |
|
Initials of user that posted this invoice. |
order_no |
character varying(10) |
No |
No |
|
The sales order that this invoice came from |
trans_no |
character varying(10) |
No |
No |
|
GL transaction number from when this invoice was posted. |
_dbversion |
integer |
No |
No |
|
Program version that posted this invoice |
_created |
timestamp without time zone |
No |
No |
|
Date/Time this invoice was posted |
_created_by |
character varying(3) |
No |
No |
|
User that created the sales order from where this invoice was posted |
_modified |
timestamp without time zone |
No |
No |
|
Date/Time order was last edited |
_modified_by |
character varying(3) |
No |
No |
|
Initials of user that last edite order before invoicing. |
processed_user |
character varying(3) |
No |
No |
|
Initials of user that processed the order. |
invoiced_user |
character varying(3) |
No |
No |
|
Initials of user that invoiced the order. |
ship_date |
date |
No |
No |
|
Ship date from the sales order |
ship_carrier |
character varying(20) |
No |
No |
|
Carrier from the order |
ship_track_id |
character varying(50) |
No |
No |
|
Carrier way bill number from the order |
location |
character varying(24) |
No |
No |
|
Location code used for the invoice. |
profit_centre |
character varying(24) |
No |
No |
|
Profit center used for the invoice |
job_no |
character varying(10) |
No |
No |
|
Job code |
job_acct_no |
character varying(10) |
No |
No |
|
Job account number |
contact_name |
character varying(60) |
No |
No |
|
Conact name |
contact_phone |
character varying(30) |
No |
No |
|
Contact phone |
contact_fax |
character varying(30) |
No |
No |
|
Contact fax number |
contact_phone_type |
smallint |
No |
No |
|
Contact phone type |
contact_fax_type |
smallint |
No |
No |
|
Contact fax type |
contact_email |
character varying(254) |
No |
No |
|
Contact email address |
total_weight |
numeric(15,2) |
No |
No |
|
Total weight of the items on the invoice. |
sales_tax_rate |
numeric(7,4)[] |
Yes |
No |
'{0,0,0,0}'::numeric[] |
Array field containing 4 tax rates |
sales_tax_applicable |
numeric(15,2)[] |
Yes |
No |
'{0,0,0,0}'::numeric[] |
Array field containing the amounts that taxes were charged on. |
sales_tax_total |
numeric(15,2)[] |
Yes |
No |
'{0,0,0,0}'::numeric[] |
Array field containing 4 tax amounts |
processed_date |
timestamp without time zone |
No |
No |
|
Date order was processed |
invoiced_date |
timestamp without time zone |
No |
No |
|
Date the order was invoiced |
udf_data |
hstore |
No |
No |
''::hstore |
hstore field containing the user defined data |
partial_tax_rate |
numeric(7,4) |
No |
No |
0 |
Partial tax rate |
partial_tax_total |
numeric(15,2) |
No |
No |
0 |
Partial tax total |
phase_id |
character varying(20) |
No |
No |
|
Phase ID that the order was in as it was invoiced. |