Table Data dictionary report - sales_history

Generated: 2018-10-18 8:01:11 AM
Server: PostgreSQL 9.3 (localhost:5432)
Database: datadict_donotremove
Schema: public
Notes:

Table for posted Sales Invoices

Columns

Name Data type Not Null? Primary key? Default Comment
id integer Yes Yes nextval('sales_history_id_seq'::regclass) Unique identifier
invoice_no character varying(10) No No Invoice number
cust_no character varying(20) No No Customer number - links to customers.cust_no
cust_name character varying(60) No No Customer name
cust_po_no character varying(20) No No Customer Purchase Order number
order_date date No No Sales Order date
status character varying(1) No No Invoice status
invoice_date date No No Invoice date, also used for transaction date
required_date date No No Required date from Sales Order
ref_no character varying(20) No No Reference number
territory_code character varying(10) No No Territory code assigned to Invoice - links to territories.code
salesperson_no character varying(10) No No Salesperson code assigned to Invoice - links to salespeople.salesperson_no
discount numeric(5,2) Yes No Discount percentage on entire Invoice
terms_code character varying(10) No No Payment terms code on Invoice - links to payment_terms.terms_code
terms_description character varying(60) No No Payment terms description
terms_days_before_due smallint No No Number of days from then Invoice date that the payment is due
terms_days_allowed smallint No No Number of days from the Invoice date for which a discount is allowed
terms_discount_rate numeric(5,2) Yes No Rate of the discount
ship_id character varying(20) Yes No Customers Shipto ID selected for this Invoice - links to addresses.ship_id
currency character varying(3) No No Customer currency; blank = base currency - links to currencies.code
currency_rate_method character varying(1) No No Currency rate conversion method used; / = direct * = indirect
currency_rate numeric(13,7) Yes No Currency rate used
ship_code character varying(10) No No Ship via code - links to shipping_methods.code
pack_date date No No Date Ship was last clicked on the Sales Order
pack_init character varying(3) No No Users initials that last clicked Ship onthe Sales Order
fob character varying(20) No No Free on board location
was_quote_no character varying(10) No No Original Sales Quote number
subtotal numeric(15,2) Yes No Subtotal before taxes, discount and freight
total_discount numeric(15,2) Yes No Invoice discount amount given on total, does not include line discounts
freight numeric(15,2) Yes No Total freight
sales_tax numeric(15,2) Yes No Total of all sales taxes on Invoice
gross_profit numeric(15,2) Yes No Gross profit on Invoice
total_current_cost numeric(15,2) Yes No Total current cost of all items on the Invoice
total_average_cost numeric(15,2) Yes No Total average cost of all items on the Invoice
total numeric(15,2) Yes No Invoice total
last_inv_no character varying(10) No No Not used
last_inv_date date No No Not used
division character varying(3) No No Division assigned to Invoice
order_no character varying(10) No No The Sales Order number that this Invoice originated from
trans_no character varying(10) No No General Ledger transaction number of this Invoice - links to gl_transactions.trans_no
_dbversion integer No No Program version that last modified this record
_created timestamp without time zone No No UTC Date and time record was created
_created_by character varying(3) No No User initials that created this record
_modified timestamp without time zone No No UTC Date and time this record was last modified
_modified_by character varying(3) No No User initials that last modified this record
processed_user character varying(3) No No Initials of user that clicked Process on the Sales Order
invoiced_user character varying(3) No No Initials of user that clicked Invoice on the Sales Order
ship_date date No No Ship date from the Sales Order
ship_carrier character varying(20) No No Ship carrier from the Sales Order
ship_track_id character varying(50) No No Carrier tracking number from the Sales Order
location character varying(24) No No General Ledger Location segment for companies using Location accounting
profit_center character varying(24) No No General Ledger Profit Center segment for companies using Profit Center accounting
job_no character varying(10) No No Job cost number - links to jobs.job_no
job_acct_no character varying(10) No No Job cost account number - links to jobs.account
contact_name character varying(60) No No Contact name from Sales Order
contact_phone character varying(30) No No Contact phone number from Sales Order
contact_fax character varying(30) No No Contact fax/cell number from Sales Order
contact_phone_type smallint No No Contact phone format type; 1 - Formatted number 2 - Unformatted number
contact_fax_type smallint No No The type of fax number; 1 - Formatted number 2 - Unformatted number 3 - Fax number 4 - Cell number
contact_email character varying(254) No No Contact email address from Sales Order
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[] Tax 1 - 4 rates used on the Invoice
sales_tax_applicable numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] Tax 1 - 4 applicable amounts on the Invoice
sales_tax_total numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] Tax 1 - 4 totals for each tax
processed_date timestamp without time zone No No Date Process was last clicked on the Sales Order
invoiced_date timestamp without time zone No No Date that Invoice was clicked on the Sales Order
udf_data hstore No No ''::hstore User defined data for this record
partial_tax_rate numeric(7,4) No No 0 Partial tax rate used on the Invoice
partial_tax_total numeric(15,2) No No 0 Partial tax total on the Invoice
phase_id character varying(20) No No Phase ID of the Sales Order when it was Invoiced - links to phases.phase_id
total_surcharge numeric(15,2) Yes No 0 Total surcharges on the Invoice
user_freight boolean Yes No false Flag to indicate that the user did a freight override; FALSE = No TRUE = Yes
user_surcharge boolean No No Flag to indicate that the user did a surcharge override; FALSE = No TRUE = Yes
was_standing_no character varying(10) No No Standing Sales Order number if this Invoice came from a Standing Order
total_standard_cost numeric(15,2) Yes No Total standard cost of all items on the Invoice

Constraints

Name Type Definition Comment
sales_history_header_pkey Primary key (id)

Report generated by pgAdmin3 LTS by BigSQL