Orders and offers
|
![]() |
Table tbl_orders_heads -- Contains the headers of orders and offers
Field name | Field description | Field type | Field size | key | required | default | Observation |
---|---|---|---|---|---|---|---|
ordernumber | Order number | VARCHAR | 50 | yes | yes | 0 | |
tipork | Type of the record | CHAR | 1 | yes | yes | R | R means Web Orders and Q - offers |
anno | Year of the order | INT | 10 | yes | yes | 0 | |
serie | Serie | VARCHAR | 50 | yes | yes | * | |
numord | Order number from your local database – used for synchronise with other programs(Business) | VARCHAR | 50 | yes | 0 | ||
cust_code | Customer code | VARCHAR | 20 | yes | 0 | Linked to u_id/u_externalcode from tbl_users | |
agent_code | Agent code | VARCHAR | 20 | Linked to u_id/u_externalcode from tbl_users | |||
order_datetime | Order datetime | DATE | yes | 0000-00-00 | |||
price_list | Code price list | VARCHAR | 100 | yes | 0 | Linked to code_pricelist from tbl_pricelist | |
note | Order note | TEXT | |||||
completed | Flag if the order is completed or not(1 if the order is completed) | CHAR | 1 | yes | 0 | An order is completed if all the products from order have been sent to customer (e.g. by an invoice) | |
closed | Flag if the order is closed or not(1 if the order is closed) | CHAR | 1 | yes | 0 | An order is closed if it was paid with an online payment system(credit card) | |
code_payment | Payment code | VARCHAR | 100 | 0 | Linked to code_payment from tbl_payment_condition | ||
validate | if 1 then the order is validated | CHAR | 1 | yes | 0 | ||
payc_discount | Discount from payment condition | FLOAT | 0 | value between 0 and 100 | |||
payc_expenses | Fixed amount expenses from payment condition | FLOAT | 0 | ||||
payc_expensescurrency5.1 | Value of Expenses from payment condition expressed in currency | FLOAT | |||||
payc_percexpenses | Percentage of expenses from payment condition | FLOAT | 0 | value between 0 and 100 | |||
payc_vatexpenses5.0 | VAT expenses from payment condition | FLOAT | 0 | value between 0 and 100 | |||
coddest | Destination code | VARCHAR | 20 | Linked to d_coddest from tbl_usersdest | |||
data_cons | Shipping date requested | DATE | |||||
cc_method | Method of payment(credit card) | INT | 3 | ||||
cc_name | Name of method of payment | VARCHAR | 255 | ||||
order_url | Url set by the administrator site for the user to see in the public area at this order | VARCHAR | 255 | ||||
order_file | Same as order_url, but the file must be uploaded on the server | VARCHAR | 255 | ||||
shipping_address5.0 | A detailed information about the customer: name, company, email, fiscale code, VAT no, shipping address, phone, fax | TEXT | |||||
order_emailaddress5.0 | The address where the order email was sent | VARCHAR | 255 | It has only an internal use | |||
totalvat | Total VAT sum | FLOAT | |||||
total | Total sum of order | FLOAT | |||||
flag1_int | -unused field; reserved for future implementations - | INT | 10 | ||||
flag2_int | -unused field; reserved for future implementations - | INT | 10 | ||||
flag3 | -unused field; reserved for future implementations - | VARCHAR | 255 | ||||
flag4 | -unused field; reserved for future implementations - | VARCHAR | 255 | ||||
order_codecurrency5.1 | Currency code | VARCHAR | 20 | ||||
order_mutdivcurrency5.1 | Flag for operation used for calculating the currency conversion: Devide or Multiply | CHAR | 1 | Admited values D for Devide and M for Multiply | |||
order_exchangerate5.1 | Currency exchange rate | FLOAT | |||||
order_symbolcurrency5.1 | Currency symbol | VARCHAR | 10 |
Table tbl_orders_details -- Contains rows with ordered products for each order or offer
Field name | Field description | Field type | Field size | key | required | default | Observation |
---|---|---|---|---|---|---|---|
ordernumber | Order number | VARCHAR | 50 | yes | yes | 0 | Linked to ordernumber from tbl_orders_heads |
tipork | Type of record | CHAR | 1 | yes | yes | R | R means Web Orders and Q - offers |
anno | Year | INT | 10 | yes | yes | 0 | |
serie | Order series | VARCHAR | 50 | yes | yes | * | |
riga | Row number | INT | 4 | yes | 0 | incremental value for each ordernumber | |
numord | Order identifier from other database (used for synchronisation with other programs ) | INT | 10 | yes | 0 | ||
code | Product code | VARCHAR | 100 | linked to code_obj from tbl_objects | |||
price | Product price per unit | DOUBLE | yes | 0 | |||
price_currency5.1 | Product price per unit calculated by currency | DOUBLE | |||||
quantity | Requested quantity | DOUBLE | yes | 0 | |||
quantity_25.3 | Requested quantity calculated for the secondary measure unit | DOUBLE | |||||
qty_approved | Approved quantity | DOUBLE | |||||
completed | If the row order is completed or not | CHAR | 1 | ||||
flag_appr | If the approved quantity is used | CHAR | 1 | ||||
flag2_int | VAT | INT | 10 | value between 0 and 100 | |||
vat_categcode5.2 | VAT category code | CHAR | 10 | linked to from vatc_code from tbl_vatcateg | |||
qty_evasa | Sent quantity | DOUBLE | |||||
unit | Measure unit | VARCHAR | 20 | ||||
unit_25.3 | Secondary Measure Unit | VARCAR | 20 | ||||
discount1 | Discount 1 per product | DOUBLE | |||||
discount2 | Discount2 per product | DOUBLE | |||||
discount3 | Discount 3 per product | DOUBLE | |||||
discount4 | Discount 4 per product | DOUBLE | |||||
discount5 | Discount 5 per product | DOUBLE | |||||
prod_title | Product name | VARCHAR | 255 | ||||
total | Total row | FLOAT | |||||
data_cons | Shipping preview date – feature not implemented | DATETIME | |||||
flag1_int | -unused field; reserved for future implementations - | INT | 10 | ||||
flag3 | -unused field; reserved for future implementations - | VARCHAR | 255 | ||||
flag4 | -unused field; reserved for future implementations - | VARCHAR | 255 |