# Key Database Table Structures for Contacts Processing

## viamedquotecontact

## `viamedquotecontact`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| CONTACT | varchar(100) | NO |  |  |  |
| COUNTRY | varchar(100) | NO |  |  |  |
| INETADDR | varchar(100) | NO |  |  |  |
| PHONE1 | varchar(100) | NO |  |  |  |
| PHONE2 | varchar(100) | NO |  |  |  |
| FAX | varchar(100) | NO |  |  |  |
| TITLE | varchar(100) | NO |  |  |  |
| UPOSITION | varchar(100) | NO |  |  |  |
| ZIP | varchar(100) | NO |  |  |  |
| DEPARTMENT | varchar(100) | NO |  |  |  |
| FLAG | varchar(100) | NO |  |  |  |
| COMPANY_ID | int | NO |  | 0 |  |
| NOTES | longtext | NO |  |  |  |
| REPID | varchar(100) | NO |  |  |  |
| KEY5 | varchar(100) | NO |  |  |  |
| hideme | varchar(100) | NO |  |  |  |
| updatedon | varchar(100) | NO |  |  |  |
| MAILDEPT | varchar(32) | NO |  |  |  |
| mail | varchar(7) | NO |  |  |  |
| email | varchar(7) | NO |  |  |  |
| phone | varchar(7) | NO |  |  |  |
| hidemereason | varchar(64) | NO |  |  |  |
| addedby | varchar(32) | NO |  |  |  |
| iso | varchar(5) | NO |  |  |  |
| accountstatements | varchar(5) | NO |  |  |  |
| sendpricingupdates | varchar(5) | NO |  |  |  |
| emailinvoice | varchar(5) | NO |  |  |  |
| mobilenumber | varchar(32) | NO |  |  |  |
| addedon | bigint | NO |  | 0 |  |
| altdirectdial | varchar(32) | NO |  |  |  |
| extension | varchar(32) | NO |  |  |  |
| altextension | varchar(32) | NO |  |  |  |
| bleepnum | varchar(32) | NO |  |  |  |
| responsibility | varchar(78) | NO |  |  |  |
| GOLDMINEKEY | varchar(24) | NO |  |  |  |
| polog | varchar(5) | NO |  |  |  |
| remit | varchar(5) | NO |  |  |  |
| emailinvoicegoldmine | varchar(5) | NO |  |  |  |
| emailpricechanges | varchar(5) | NO |  |  |  |
| firstcontact | varchar(32) | NO |  |  |  |
| CleanPosition | varchar(64) | NO |  |  |  |
| xeroimported | tinyint | NO |  |  |  |
| allowso | tinyint | NO |  |  |  |
| hashcode | varchar(32) | YES |  |  |  |
| verifiedby | int | NO |  |  |  |
| verifiedon | bigint | NO |  |  |  |
| verifiedadminby | int | NO |  |  |  |
| verifiedadminon | bigint | NO |  |  |  |
| WILDIXPHONE | varchar(100) | NO |  |  |  |
| unsubscribeby | int | NO |  |  |  |
| unsubscribeon | bigint | NO |  |  |  |
| deliverynotification | tinyint | NO |  |  |  |

## viamedquoteaddress

## `viamedquoteaddress`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| ID | int | NO | PRI |  | auto_increment |
| ADDRESS1 | varchar(255) | YES |  |  |  |
| ADDRESS2 | varchar(255) | YES |  |  |  |
| ADDRESS3 | varchar(255) | YES |  |  |  |
| CITY | varchar(255) | YES |  |  |  |
| COMPANY | varchar(255) | YES |  |  |  |
| CONTACT | varchar(255) | YES |  |  |  |
| COUNTRY | varchar(255) | YES |  |  |  |
| INETADDR | varchar(255) | YES |  |  |  |
| KEY5 | varchar(255) | YES |  |  |  |
| PHONE1 | varchar(255) | YES |  |  |  |
| PHONE2 | varchar(255) | YES |  |  |  |
| FAX | varchar(200) | NO |  |  |  |
| STATE | varchar(255) | YES |  |  |  |
| TITLE | varchar(255) | YES |  |  |  |
| UPOSITION | varchar(255) | YES |  |  |  |
| ZIP | varchar(255) | YES |  |  |  |
| DEPARTMENT | varchar(255) | YES |  |  |  |
| NOTES | longtext | YES |  |  |  |
| FLAG | varchar(10) | NO |  |  |  |
| REGION | varchar(50) | NO |  |  |  |
| STATUS | varchar(100) | NO |  |  |  |
| HNHREP | varchar(50) | NO |  |  |  |
| REORDER | int | NO |  | 0 |  |
| OWNERGROUP | varchar(100) | NO |  |  |  |
| NHSREGION | varchar(100) | NO |  |  |  |
| hideme | varchar(100) | NO |  |  |  |
| contact_special_id | int | NO |  |  |  |
| contact_special_type | varchar(16) | NO |  |  |  |
| visitingnotes | longtext | NO |  |  |  |
| Company_reg_number | varchar(24) | NO |  |  |  |
| Vat_Number | varchar(24) | NO |  |  |  |
| contact_type | varchar(128) | NO |  |  |  |
| lostsalestag | varchar(200) | NO |  |  |  |
| lostsalesnotes | longtext | NO |  |  |  |
| alternativenames | longtext | NO |  |  |  |
| emailinvoices | varchar(5) | NO |  |  |  |
| debtornotes | varchar(250) | NO |  |  |  |
| googleidentifier | varchar(64) | NO |  |  |  |
| rmanotes | longtext | NO |  |  |  |
| website | varchar(200) | NO |  |  |  |
| companyid | int | NO |  |  |  |
| einvoicenotes | longtext | NO |  |  |  |
| checkingnotes | longtext | NO |  |  |  |
| checkingnotesby | int | NO |  |  |  |
| checkingnoteson | bigint | NO |  |  |  |
| orderconf1 | varchar(1) | NO |  |  |  |
| orderconf2 | varchar(1) | NO |  |  |  |
| einvoicesingles | varchar(1) | NO |  |  |  |
| invoice_company_id | int | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| rep_company_id | int | NO |  |  |  |
| rep_contact_id | int | NO |  |  |  |
| mainconotes | longtext | NO |  |  |  |
| mainconotesby | int | NO |  |  |  |
| mainconoteson | bigint | NO |  |  |  |
| otheraccount | varchar(16) | NO |  |  |  |
| vat_exempt | int | NO |  |  |  |
| paymenttermsdefault | int | NO |  |  |  |
| deliverytermsdefault | int | NO |  |  |  |
| credittype | varchar(16) | NO |  |  |  |
| firstcontactcode | varchar(32) | NO |  |  |  |
| stoponaccount | int | NO |  |  |  |
| specialsalesflag | varchar(3) | NO |  |  |  |
| salesrep | int | NO |  |  |  |
| updatedby | int | NO |  |  |  |
| updatedon | bigint | NO |  |  |  |
| DL_TestField | varchar(12) | NO |  |  |  |
| goodinmemo | longtext | NO |  |  |  |
| hidefrompostock | smallint | NO |  |  |  |
| Invoice_Method | int | NO |  |  |  |
| glncode | varchar(24) | NO |  |  |  |
| stocksignedoffon | bigint | NO |  | 0 |  |
| stocksignedoffby | int | NO |  |  |  |
| Opera_Region | varchar(35) | NO |  |  |  |
| Opera_Territory | varchar(35) | NO |  |  |  |
| Opera_Cust_type | varchar(35) | NO |  |  |  |
| Opera_Cust_analy | varchar(6) | NO |  |  |  |
| Opera_Stat_account | varchar(20) | NO |  |  |  |
| Opera_Desp_method | varchar(35) | NO |  |  |  |
| Opera_Pricelist | varchar(12) | NO |  |  |  |
| Opera_Creditlimit | int | NO |  |  |  |
| Xero_contactname | varchar(100) | NO |  |  |  |
| ourpoaccount | varchar(48) | NO |  |  |  |
| incoterms | int | NO |  |  |  |
| incotermslocation | varchar(32) | NO |  |  |  |
| XeroInvoiceCompanyName | varchar(128) | NO |  |  |  |
| XeroInvoiceContactEmail | varchar(128) | NO |  |  |  |
| banksearch | varchar(128) | NO |  |  |  |
| operaclosingbalance | float(10,3) | NO |  |  |  |
| supplierpaymentdays | int | NO |  |  |  |
| ourpocurrency | int | NO |  |  |  |
| peppolid | varchar(48) | NO |  |  |  |
| xeroexportsuppliername | varchar(64) | NO |  |  |  |
| xeroexportcustomername | varchar(200) | NO |  |  |  |
| customereorinumber | varchar(24) | NO |  |  |  |
| issueicon | varchar(5) | NO |  |  |  |
| issueiconcolour | int | NO |  |  |  |
| allgoodslabelid | int | NO |  |  |  |
| restockmonths | int | NO |  |  |  |
| shopifyaddress | longtext | NO |  |  |  |
| delnotification | int | NO |  |  |  |
| deliverytermsdefaultconsign | varchar(128) | NO |  |  |  |
| supplierreviewrating | varchar(1) | NO |  |  |  |
| WILDIXPHONE | varchar(100) | NO |  |  |  |
| blacklist | varchar(64) | NO |  |  |  |
| distpreinsurance | int | NO |  |  |  |
| distformreturned | bigint | NO |  |  |  |
| distagreement | bigint | NO |  |  |  |
| linkedaddress | int | NO |  |  |  |
| feedbacksurvey | tinyint | NO |  |  |  |
| paymentroute | tinyint | NO |  |  |  |
| paymentroutenotes | longtext | NO |  |  |  |
| preferedcid | int | NO |  |  |  |
| transittimedays | int | NO |  |  |  |
| suppliermonthcutoff | int | NO |  |  |  |

## viamedquotestatus

## `viamedquotestatus`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| customer_id | varchar(100) | NO |  |  |  |
| quoteref | varchar(50) | NO |  |  |  |
| rep_id | varchar(100) | NO |  |  |  |
| rasiedby | varchar(50) | NO |  |  |  |
| account | varchar(50) | NO |  |  |  |
| contact | varchar(50) | NO |  |  |  |
| title | varchar(50) | NO |  |  |  |
| position | varchar(50) | NO |  |  |  |
| department | varchar(50) | NO |  |  |  |
| address1 | varchar(50) | NO |  |  |  |
| address2 | varchar(50) | NO |  |  |  |
| address3 | varchar(50) | NO |  |  |  |
| city | varchar(50) | NO |  |  |  |
| county | varchar(50) | NO |  |  |  |
| country | varchar(50) | NO |  |  |  |
| postcode | varchar(50) | NO |  |  |  |
| addresstel | varchar(50) | NO |  |  |  |
| directtel | varchar(50) | NO |  |  |  |
| fax | varchar(50) | NO |  |  |  |
| email | varchar(50) | NO |  |  |  |
| timestampraised | bigint | NO |  | 0 |  |
| status | varchar(24) | NO |  |  |  |
| emailrep | char(1) | NO |  |  |  |
| emailtl | char(1) | NO |  |  |  |
| emailgoldmine | char(1) | NO |  |  |  |
| emailcustomer | char(1) | NO |  |  |  |
| emailfake | char(1) | NO |  |  |  |
| timestampsent | bigint | NO |  | 0 |  |
| timeorderraised | int | NO |  | 0 |  |
| memo | longtext | NO |  |  |  |
| reminderflag | varchar(100) | NO |  |  |  |
| reminder | varchar(100) | NO |  |  |  |
| company | varchar(254) | NO |  |  |  |
| company_id | int | NO |  |  |  |
| updatedate | bigint | NO |  | 0 |  |
| mailid | int | NO |  |  |  |
| marketingindexid | int | NO |  |  |  |
| callid | int | NO |  |  |  |
| marketingindexstageid | int | NO |  |  |  |
| visittag | int | NO |  |  |  |
| irrequest | int | NO |  |  |  |

## viamedquotecontactgroup

## `viamedquotecontactgroup`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| description | varchar(255) | NO |  |  |  |
| createdby | int | NO |  |  |  |
| createdon | bigint | NO |  |  |  |
| active | tinyint | NO |  | 1 |  |

## viamedquotecontactgrouplinks

## `viamedquotecontactgrouplinks`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| groupid | int | NO |  |  |  |
| contactid | int | NO |  |  |  |
| vui | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| addedby | int | NO |  |  |  |

## viamedagenda_events_log

## `viamedagenda_events_log`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| eventtypeid | int | NO |  |  |  |
| eventtime | bigint | NO |  |  |  |
| eventuser | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| addedby | int | NO |  |  |  |
| memo | longtext | NO |  |  |  |
| hostcompanyid | int | NO |  |  |  |
| issueid | int | NO |  |  |  |
| timeis | time | NO |  |  |  |
| marketingindexsubtype | int | NO |  |  |  |
| companyid | int | NO |  |  |  |
| contactid | int | NO |  |  |  |
| completed | bigint | NO |  |  |  |
| defaultaction | varchar(6) | NO |  |  |  |
| completedby | int | NO |  |  |  |

## global_companys_departments

## `global_companys_departments`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| description | varchar(255) | NO |  |  |  |
| active | tinyint | NO |  | 1 |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |

## viamed_marketing_index

## `viamed_marketing_index`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| filtercode | int | NO |  |  |  |
| description | varchar(255) | NO |  |  |  |
| briefnotes | longtext | NO |  |  |  |
| customer_companyid | int | NO |  |  |  |
| customer_contactid | int | NO |  |  |  |
| supplier_companyid | int | NO |  |  |  |
| supplier_contactid | int | NO |  |  |  |
| source_companyid | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| addedby | int | NO |  |  |  |
| completedon | bigint | NO |  |  |  |
| completedby | int | NO |  |  |  |

## viamed_salereturnhead

## `viamed_salereturnhead`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| operaid | varchar(100) | NO |  |  |  |
| createdate | bigint | NO |  | 0 |  |
| contactname | varchar(100) | NO |  |  |  |
| companyname | varchar(100) | NO |  |  |  |
| department | varchar(100) | NO |  |  |  |
| add1 | varchar(100) | NO |  |  |  |
| add2 | varchar(100) | NO |  |  |  |
| add3 | varchar(100) | NO |  |  |  |
| add4 | varchar(100) | NO |  |  |  |
| postcode | varchar(100) | NO |  |  |  |
| sentby | varchar(100) | NO |  |  |  |
| status | varchar(100) | NO |  |  |  |
| shipnotes | longtext | NO |  |  |  |
| addedby | varchar(32) | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| responsibleuser | varchar(64) | NO |  |  |  |
| revieweddate | bigint | NO |  |  |  |
| reviewedby | varchar(64) | NO |  |  |  |
| telephone | varchar(64) | NO |  |  |  |
| email | varchar(128) | NO |  |  |  |
| contactid | int | NO |  |  |  |
| companyid | int | NO |  |  |  |
| statustext | varchar(32) | NO |  |  |  |
| statustextby | int | NO |  |  |  |
| statustexton | bigint | NO |  |  |  |
| valueforcustoms | varchar(16) | NO |  |  |  |
| cancelledby | int | NO |  |  |  |
| cancelledon | bigint | NO |  |  |  |
| issueid | int | NO |  |  |  |
| goodsinflag | varchar(9) | NO |  |  |  |
| expdate | varchar(24) | NO |  |  |  |
| datesent | bigint | NO |  |  |  |
| delivdate | varchar(24) | NO |  |  |  |
| typesor | varchar(64) | NO |  |  |  |
| position1 | varchar(64) | NO |  |  |  |

## viamed_customer_repairs_header

## `viamed_customer_repairs_header`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| companyid | int | NO |  |  |  |
| viamedquotecontactid | int | NO |  |  |  |
| createdby | varchar(64) | NO |  |  |  |
| createddate | bigint | NO |  |  |  |
| status | varchar(64) | NO |  |  |  |
| repair_notes | longtext | NO |  |  |  |
| completedby | varchar(64) | NO |  |  |  |
| completedon | bigint | NO |  |  |  |
| reviewedby | varchar(64) | NO |  |  |  |
| reviewedon | bigint | NO |  |  |  |

## viamedquote_orders

## `viamedquote_orders`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| company_id | int | NO |  |  |  |
| contact_id | int | NO |  |  |  |
| order_stage | int | NO |  |  |  |
| createdon | bigint | NO |  |  |  |
| createdby | int | NO |  |  |  |
| hostcompany | int | NO |  |  |  |
| host_order_id | varchar(64) | NO |  |  |  |
| confirmedby | int | NO |  |  |  |
| confirmedon | bigint | NO |  |  |  |
| customer_ref | varchar(128) | NO |  |  |  |
| priority | int | NO |  |  |  |
| due | bigint | NO |  | 0 |  |
| modifiedby | int | NO |  |  |  |
| modifiedon | bigint | NO |  |  |  |
| delivery_company_id | int | NO |  |  |  |
| po_docid | int | NO |  |  |  |
| del_docid | int | NO |  |  |  |
| sentclickedon | bigint | NO |  |  |  |
| sentclickedby | int | NO |  |  |  |
| invoice_company_id | int | NO |  |  |  |
| quote_proforma | int | NO |  |  |  |
| delayedinvoice | bigint | NO |  | 0 |  |
| iscreditnote | int | NO |  |  |  |
| notes | longtext | NO |  |  |  |
| vatexempt | int | NO |  |  |  |
| deletedby | int | NO |  | 0 |  |
| deletedon | bigint | NO |  | 0 |  |
| originalhost | int | NO |  | 0 |  |
| incoterms | int | NO |  |  |  |
| incotermslocation | varchar(32) | NO |  |  |  |
| contact_id_tel | varchar(24) | NO |  |  |  |
| quotevaliduntil | bigint | NO |  |  |  |
| cancelleddate | bigint | NO |  |  |  |
| cancelledby | int | NO |  |  |  |
| cancelledreason | longtext | NO |  |  |  |
| wasaquoteproforma | int | NO |  |  |  |
| wasaquoteproformaby | int | NO |  |  |  |
| wasaquoteproformaon | bigint | NO |  |  |  |
| prepaid | tinyint | NO |  |  |  |
| paperworkmemo | longtext | NO |  |  |  |
| signofascompleteby | int | NO |  |  |  |
| signofascompleteon | bigint | NO |  |  |  |
| reviewedby | int | NO |  |  |  |
| reviewedon | bigint | NO |  |  |  |
| paperworkname | int | NO |  |  |  |
| enduser_contact_id | int | NO |  |  |  |
| pndocid | int | NO |  |  |  |
| proformapaidon | bigint | NO |  |  |  |
| proformapaidby | int | NO |  |  |  |
| multipledeliveryids | int | NO |  |  |  |
| customer_ref_extra | varchar(128) | NO |  |  |  |
| countasreal | int | NO |  |  |  |
| partship | int | NO |  |  |  |
| shipready | int | NO |  |  |  |
| checkingstartedon | bigint | NO |  |  |  |
| checkingstartedby | int | NO |  |  |  |
| holdinvoices | tinyint | NO |  |  |  |
| autocredit | bigint | NO |  | 0 |  |
| visapayment | tinyint | NO |  |  |  |
| mailingscalculated | bigint | NO |  | 0 |  |
| holdpicking | tinyint | NO |  |  |  |
| quoteagreedby | int | NO |  |  |  |
| quoteagreedon | bigint | NO |  |  |  |
| ccpaidby | int | NO |  |  |  |
| ccpaidon | bigint | NO |  |  |  |
| preweights | longtext | NO |  |  |  |
| partpaid | tinyint | NO |  |  |  |
| insuranceagreed | int | NO |  |  |  |
| marketingindexid | int | NO |  |  |  |
| ordersource | varchar(32) | NO |  |  |  |
| deletedchasedby | int | NO |  |  |  |
| deletedchasedon | bigint | NO |  |  |  |
| clonedorderid | int | NO |  |  |  |
| clonedby | int | NO |  |  |  |
| clonedon | bigint | NO |  |  |  |
| customerconfirmationsenton | bigint | NO |  |  |  |
| customerconfirmationsentby | int | NO |  |  |  |
| quotesenton | bigint | NO |  |  |  |
| quotesentby | int | NO |  |  |  |
| proformasenton | bigint | NO |  |  |  |
| proformasentby | int | NO |  |  |  |

## viamedquotestocklink

## `viamedquotestocklink`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| companyid | int | NO |  |  |  |
| visitid | int | NO |  |  |  |
| stockref | varchar(26) | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| addedby | int | NO |  |  |  |

## viamedquotestatus_tags

## `viamedquotestatus_tags`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| tagtype | int | NO |  |  |  |
| description | varchar(255) | NO |  |  |  |
| active | tinyint | NO |  | 1 |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |

## viamedquote_information_requests

## `viamedquote_information_requests`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| subject | varchar(255) | NO |  |  |  |
| companyid | int | NO |  |  |  |
| supplierid | int | NO |  |  |  |
| contactid | int | NO |  |  |  |
| status | int | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| completedby | int | NO |  |  |  |
| completedon | bigint | NO |  |  |  |

## viamedquote_global_watchlist

## `viamedquote_global_watchlist`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| watchkey1 | int | NO |  |  |  |
| watchtype | varchar(32) | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| status | int | NO |  |  |  |

## tellog

## `tellog`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| callid | varchar(32) | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| marketingindexid | int | NO |  |  |  |

## tellognotes

## `tellognotes`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| callid | varchar(32) | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |
| notes | longtext | NO |  |  |  |

## viamedquote_orders_credits

## `viamedquote_orders_credits`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| creditreference | varchar(32) | NO |  |  |  |
| company_id | int | NO |  |  |  |
| committedon | bigint | NO |  |  |  |
| addedby | int | NO |  |  |  |
| addedon | bigint | NO |  |  |  |

## viamed_sale_return

## `viamed_sale_return`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| headerid | int | NO |  |  |  |
| serialid | varchar(100) | NO |  |  |  |
| serialnumber | varchar(100) | NO |  |  |  |
| stock_ref | varchar(100) | NO |  |  |  |
| operaid | varchar(100) | NO |  |  |  |
| datesent | varchar(100) | NO |  |  |  |
| datereturned | bigint | NO |  | 0 |  |
| status | varchar(100) | NO |  |  |  |
| type | varchar(100) | NO |  |  |  |
| functio | varchar(100) | NO |  |  |  |
| purpose | varchar(100) | NO |  |  |  |
| sentby | varchar(100) | NO |  |  |  |
| responsibleuser | varchar(64) | NO |  |  |  |
| revieweddate | bigint | NO |  |  |  |
| reviewedby | varchar(64) | NO |  |  |  |
| contactid | int | NO |  |  |  |
| companyid | int | NO |  |  |  |
| givenstockallocated | int | NO |  |  |  |
| chasedby | int | NO |  |  |  |
| chasedon | bigint | NO |  |  |  |
| expiredate | bigint | NO |  |  |  |
| typesor | varchar(64) | NO |  |  |  |
| success | varchar(64) | NO |  |  |  |
| notes | longtext | NO |  |  |  |

## viamed_marketing_filtercodes

## `viamed_marketing_filtercodes`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| description | varchar(255) | NO |  |  |  |
| active | tinyint | NO |  | 1 |  |

## viamedagenda_events_types

## `viamedagenda_events_types`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| description | varchar(250) | NO |  |  |  |
| hostcompanyid | int | NO |  |  |  |
| securitylevel | int | NO |  |  |  |
| archived | int | NO |  |  |  |
| code | varchar(32) | NO |  |  |  |

## viamedquoteaddress_hostcompany

## `viamedquoteaddress_hostcompany`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| company_id | int | NO |  |  |  |
| hostcompany | int | NO |  |  |  |

## viamed_memos_history

## `viamed_memos_history`

| Field | Type | Null | Key | Default | Extra |
|-------|------|------|-----|---------|-------|
| id | int | NO | PRI |  | auto_increment |
| addedon | bigint | NO |  | 0 |  |
| addedby | int | NO |  |  |  |
| memotype | int | NO |  |  |  |
| memo | longtext | NO |  |  |  |
| opera | varchar(12) | NO |  |  |  |
| companyid | int | NO |  |  |  |
| contactid | int | NO |  |  |  |