Invoices
|
![]() |
Table tbl_orders_shippings_heads -- Invoices headers
Field name | Field description | Field type | Field size | key | required | default | Observation |
---|---|---|---|---|---|---|---|
numdoc | Invoice number | VARCHAR | 50 | yes | yes | 0 | |
anno | Year | INT | 4 | yes | yes | 0 | |
serie | Serie | VARCHAR | 50 | yes | yes | * | |
tipork | Invoice type | CHAR | 1 | yes | yes | R | R for web orders |
datdoc | Invoice date | DATE | 10 | yes | 0000-00-00 | ||
conto | User code | VARCHAR | 20 | Linked to u_id/u_externalcode from tbl_users | |||
codpaga | Code payment condition | VARCHAR | 50 | 0 | Linked to code_payment from tbl_payment_condition | ||
courier | Courier | VARCHAR | 255 | yes | 0 | ||
payc_expenses | Expenses (fixed amount) from payment condition | FLOAT | 10 | 0 | |||
payc_discount | Discount from payment condition | FLOAT | 10 | 0 | value between 0 and 100 | ||
payc_percexpenses | Percentage of expenses from payment condition | FLOAT | 10 | 0 | value between 0 and 100 | ||
totalvat | Total document vat | FLOAT | 10 | yes | 0 | ||
totdoc | Total document including vat | FLOAT | 10 | yes | 0 | ||
coddest | Destination code | VARCHAR | 20 | Linked to d_coddest from tbl_destinations |
Table tbl_orders_shippings -- Invoices rows
Field name | Field description | Field type | Field size | key | required | default | Observation |
---|---|---|---|---|---|---|---|
numdoc | Invoice number | INT | 10 | yes | 0 | Linked to numdoc from tbl_orders_shippings_heads | |
rigadoc | Invoice row | INT | 10 | yes | 0 | incremental value for each numdoc | |
anno | Year | INT | 4 | yes | 0 | ||
ordernumber | Order number | VARCHAR | 50 | 0 | Could be a value linked to ordernumber from tbl_orders_heads or 0 for rows that are not related to an order | ||
code | Product code | VARCHAR | 100 | Linked to code from tbl_objects | |||
shipped_quantity | Shipped quantity | DOUBLE | 20 | 0 | |||
orriga | Order row | INT | 3 | yes | the corresponding row from tbl_orders_details | ||
prezzo | Unit price | DOUBLE | 20 | 0 | |||
vat | Vat percentage | FLOAT | 10 | value between 0 and 100 | |||
unit | Unit label | VARCHAR | 20 | ||||
discount1 | Discount 1 from product | FLOAT | 10 | 0 | value between 0 and 100 | ||
discount2 | Discount 2 from product | FLOAT | 10 | 0 | value between 0 and 100 | ||
discount3 | Discount 3 from product | FLOAT | 10 | 0 | value between 0 and 100 | ||
discount4 | Discount 4 from product | FLOAT | 10 | 0 | value between 0 and 100 | ||
discount5 | Discount 5 from product | FLOAT | 10 | 0 | value between 0 and 100 | ||
total | Total row without vat | FLOAT | 10 | yes | 0 |