Table Data dictionary report - sales_orders

Generated: 9/23/2016 3:06:21 PM
Server: PostgreSQL 9.3 (localhost:5432)
Database: datadict
Schema: public

Columns

Name Data type Not Null? Primary key? Default Comment
id integer Yes Yes nextval('sales_orders_id_seq'::regclass)
order_no character varying(10) No No A sequencial order number assigned from Company Settings/Sequence numbers. However any alpha numeric number can be written
cust_no character varying(20) No No The customer number (cust_no) from the table customers
cust_name character varying(60) No No Customers name from the table customers
status character varying(1) No No The order's status O - Open P - Processed L - Deposit S - Shipped
order_date date No No The order date.
division character varying(3) No No The division of the order. It is added when the order is created and puts the division in that the user is set to.
location character varying(24) No No The location code for the user. This is only used if the company is setup for Spire location accounting using segments.
profit_centre character varying(24) No No The profit center code as edited by the user on the header of the sales order. This is only used if the company is setup for Spire profit center accounting using segments.
territory_code character varying(10) No No The territory code of the sales order. Comes from the customer or is added/edited manually
salesperson_no character varying(10) No No The salesperon code of the sales order. Comes from the customer or is added/edited manually
cust_po_no character varying(20) No No The customers purchase order number as added by the user. Customer can be set as mandatory
ship_code character varying(10) No No The ship via code from shipping_methods table. Popluated automatically from the customer but can be added/edited by the user.
required_date date No No Date that the order is required to be completed.
ship_carrier character varying(20) No No The carrier code for the order. Always manualy entered as text and does not have an accociated table.
ship_track_id character varying(50) No No The carrier way bill number for the order. Always manualy entered.
terms_code character varying(10) No No The terms code from payment_terms table. Populated from the customer table but can be added/edited.
terms_description character varying(60) No No The terms description from payment_terms table
terms_days_before_due smallint No No Number of days the payment is due for this order. It is calculated based on the terms
terms_days_allowed smallint No No Number of days the payment is to be paid to be eligible for the discount
terms_discount_rate numeric(5,2) Yes No The percentage rate of the discount based on the terms
hold boolean No No TRUE= Held FALSE - Not Held
fob character varying(20) No No FOB - Free On Board. Not used for any purpose except to print on a sales order header is required.
ref_no character varying(20) No No Reference number added by the user
invoice_no character varying(10) No No The invoice number for this order that can be entered by the user if Company Settings/Sales Orders/Pocess Invoicing/User Selectable Invoice Numbers is checked on.
invoice_date date No No The date for the invoice
inv_date_rrule character varying(120) No No The repeat rule for a standing order.
batch_no bigint No No The batch number for the order. Only used when Company Settings/Sales Order/process Invoicing/Batch Posting is set to batch invoicing. Added by Spire whe a batch is created.
was_quote boolean No No TRUE - Order started as a Quote FALSE - Order did not start as a quote
orig_quote_no character varying(10) No No The order number that was used when it was a quote. Usually starts with a Q depending on Company Settings/Sequence numbers.
ship_id character varying(20) No No The customers shipto ID that was added to the order by defaul or by a user.
currency character varying(3) No No The currency code for the order
currency_rate_method character varying(1) No No The curreny method used. Comes from table 'currencies'
currency_rate numeric(13,7) Yes No The currency rate used for this order
has_serialized_items boolean No No Indicator if the oder has serialized items on it. TRUE - Yes FALSE - No
discount numeric(5,2) Yes No The discount percentage that will be applied to the complete sales order after line discounts.
subtotal numeric(15,2) Yes No The subtotal of the order before taxes and frieght based on the shipped quantity
total_discount numeric(15,2) Yes No The total of the footer discount applied to the order. Does not include detail line discounts - Based on shipped items
freight numeric(15,2) Yes No Amount of freight on the sales order based on the shipped quantity
sales_tax numeric(15,2) Yes No Total of all sales taxes on this order based on the shipped quantity
gross_profit numeric(15,2) Yes No Total gross profit for this sales order based on the shipped quantity
total_current_cost numeric(15,2) Yes No Total current cost on this sales order based on the shipped quantity
total_average_cost numeric(15,2) Yes No Total average cost on this sales order based on the shipped quantity
total numeric(15,2) Yes No Grand total of thei sales order
total_payments numeric(15,2) Yes No Total payments made on this sales order including deposits
backordered boolean No No
total_surcharge numeric(15,2) Yes No The total surcharge added to the order. Based on a percentage of configured product code. If user edits this amount it is no longer re-calculated.
user_surcharge boolean No No Flag that indicates if the user edited the total surcharge amount. FALSE - Surcharge was not edited and will continue to be automatically calculated TRUE - Surcharge was edited and will no longer be automatically calculated.
pack_date date No No The date the order was processed
pack_init character varying(3) No No The users initials that processed the order
processebyuser character varying(3) No No User initials that processed the order
invoicedbyuser character varying(3) No No Initials of the user that invoiced the order. Used when set to batch based invoicing
subtotal_ordered numeric(15,2) Yes No Sub Total of the order based on the order quantity
total_discount_ordered numeric(15,2) Yes No Total order discount based on the ordered quantity
freight_ordered numeric(15,2) Yes No Freight amount based on the ordered quantity
sales_tax_ordered numeric(15,2) Yes No Total of alll sales taxes based on the order quantity
gross_profit_ordered numeric(15,2) Yes No The total gross profit based on the order quantity
current_cost_ordered numeric(15,2) Yes No Total current cost based on the ordered quantity
average_cost_ordered numeric(15,2) Yes No Total average cost based on the order quantity
total_ordered numeric(15,2) Yes No Grand Ttoal of the order based on the order quantity
backorder_created boolean No No Order has at least one item back ordered on it. TRUE - No FALSE - Yes
skip_validation boolean No No
cr_approve_amt numeric(15,2) No No Amount that the order has been credit approved for.
cr_approve_date date No No The date that the order was credit approved
cr_approve_user character varying(3) No No The initials of the user that approved the credit amount
user_type character varying(10) No No
job_no character varying(10) No No The jobcost code that this sales order will be posted to. Is overridden bu sales order detail lines.
job_acct_no character varying(10) No No The jobcost account that this sales order will be posted to. Is overridden bu sales order detail lines.
phase_id character varying(20) No No The ID of the pahase this order is currently in. Comes from table 'phases'
contact_name character varying(60) No No The contact name for this order
contact_phone character varying(30) No No The contact phone number for this order
contact_fax character varying(30) No No The contact fax or cell number for this order
last_inv_no character varying(10) No No
last_inv_date date No No
contact_phone_type smallint No No The type of phone number for this order. 1 - Formatted Phone Number 2 - Un Formatted Phone Number
contact_fax_type smallint No No The type of fax number for this order. 1 - FormattedNumber 2 - Un Formatted Number 3 - Fax Number 4 - Cell Number
contact_email character varying(254) No No The contacts email for this order
total_weight numeric(15,2) No No The total weight on this order.
order_type character varying(1) No No The order type O - Sales Order S - Standing Q - Quote W - Word Order R - RMA
ship_date date No No Datre the order was shipped.
standard_cost_ordered numeric(15,5) Yes No Total cost based on standard cost
_dbversion integer No No Version of software that created this order
_created timestamp without time zone No No Date this order was created
_created_by character varying(3) No No User initials that created this order
_modified timestamp without time zone No No Date that this order was last edited
_modified_by character varying(3) No No User initials that last edited this order
sales_tax_rate numeric(7,4)[] Yes No '{0,0,0,0}'::numeric[] The percentage charged for each tax. Saved as an array
sales_tax_applicable numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] The amount that each sales tax will be applied on. Saved as an array.
sales_tax_total numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] The amount of each tax charged. Saved as an array.
sales_tax_applicable_ordered numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] The amount that each sales tax will be applied on. Saved as an array. Based on the ordered quantity
sales_tax_total_ordered numeric(15,2)[] Yes No '{0,0,0,0}'::numeric[] The amount of each tax charged. Saved as an array. Based on the ordered quantity.
processed_date timestamp without time zone No No Date the order was processed
invoiced_date timestamp without time zone No No Date the order was invoiced
user_freight boolean Yes No false Flag for if the user set the freight amoiny manually
udf_data hstore No No ''::hstore An hstore field for the user defined fields data
partial_tax_rate numeric(7,4) No No 0 Rate used for the partial tax as defined in sales_taxes
partial_tax_total numeric(15,2) No No 0 Amount for the partial tax as defined in sales_taxes

Constraints

Name Type Definition Comment
bve_order_pkey Primary key (id)

Report generated by pgAdmin III