{ "billing_type": { "name": "billing_type", "fields": { "billing_type_id": { "name": "billing_type_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_type_number_format": { "name": "billing_type_number_format", "type": "VARCHAR(254)", "null": false }, "billing_type_template": { "name": "billing_type_template", "type": "INT", "null": false, "foreignTable": "media", "foreignKey": "media_id" }, "billing_type_transfer_type": { "description": "What kind of bill is it?", "name": "billing_type_transfer_type", "type": "TINYINT", "null": false }, "billing_type_transfer_stock": { "description": "Does this bill type move stock?", "name": "billing_type_transfer_stock", "type": "TINYINT(1)", "null": false } } }, "billing_type_l11n": { "name": "billing_type_l11n", "fields": { "billing_type_l11n_id": { "name": "billing_type_l11n_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_type_l11n_name": { "name": "billing_type_l11n_name", "type": "VARCHAR(255)", "null": false }, "billing_type_l11n_type": { "name": "billing_type_l11n_type", "type": "INT", "null": false, "foreignTable": "billing_type", "foreignKey": "billing_type_id" }, "billing_type_l11n_language": { "name": "billing_type_l11n_language", "type": "VARCHAR(2)", "default": null, "null": true, "foreignTable": "language", "foreignKey": "language_639_1" } } }, "billing_bill": { "name": "billing_bill", "fields": { "billing_bill_id": { "name": "billing_bill_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_bill_number": { "name": "billing_bill_number", "type": "VARCHAR(255)", "null": false }, "billing_bill_numberformat": { "name": "billing_bill_numberformat", "type": "VARCHAR(255)", "null": false }, "billing_bill_info": { "name": "billing_bill_info", "type": "TEXT", "default": null, "null": true }, "billing_bill_status": { "name": "billing_bill_status", "type": "TINYINT", "null": false }, "billing_bill_type": { "name": "billing_bill_type", "type": "INT", "null": false, "foreignTable": "billing_type", "foreignKey": "billing_type_id" }, "billing_bill_supplier": { "name": "billing_bill_supplier", "type": "INT", "null": true, "default": null, "foreignTable": "suppliermgmt_supplier", "foreignKey": "suppliermgmt_supplier_id" }, "billing_bill_client": { "name": "billing_bill_client", "type": "INT", "null": true, "default": null, "foreignTable": "clientmgmt_client", "foreignKey": "clientmgmt_client_id" }, "billing_bill_stock_from": { "name": "billing_bill_stock_from", "type": "INT", "null": true, "default": null }, "billing_bill_stock_to": { "name": "billing_bill_stock_to", "type": "INT", "null": true, "default": null }, "billing_bill_shipTo": { "name": "billing_bill_shipTo", "type": "VARCHAR(255)", "null": false }, "billing_bill_shipFAO": { "name": "billing_bill_shipFAO", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_shipAddr": { "name": "billing_bill_shipAddr", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_shipCity": { "name": "billing_bill_shipCity", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_shipZip": { "name": "billing_bill_shipZip", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_shipCountry": { "name": "billing_bill_shipCountry", "type": "VARCHAR(3)", "default": null, "null": true }, "billing_bill_billTo": { "name": "billing_bill_billTo", "type": "VARCHAR(255)", "null": false }, "billing_bill_billFAO": { "name": "billing_bill_billFAO", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_billAddr": { "name": "billing_bill_billAddr", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_billCity": { "name": "billing_bill_billCity", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_billZip": { "name": "billing_bill_billZip", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_billCountry": { "name": "billing_bill_billCountry", "type": "VARCHAR(3)", "default": null, "null": true }, "billing_bill_created_at": { "name": "billing_bill_created_at", "type": "DATETIME", "null": false }, "billing_bill_performance_date": { "name": "billing_bill_performance_date", "type": "DATETIME", "null": false }, "billing_bill_created_by": { "name": "billing_bill_created_by", "type": "INT", "null": false, "foreignTable": "account", "foreignKey": "account_id" }, "billing_bill_netprofit": { "name": "billing_bill_netprofit", "type": "BIGINT", "null": false }, "billing_bill_grossprofit": { "name": "billing_bill_grossprofit", "type": "BIGINT", "null": false }, "billing_bill_netcosts": { "name": "billing_bill_netcosts", "type": "BIGINT", "null": false }, "billing_bill_grosscosts": { "name": "billing_bill_grosscosts", "type": "BIGINT", "null": false }, "billing_bill_netsales": { "name": "billing_bill_netsales", "type": "BIGINT", "null": false }, "billing_bill_grosssales": { "name": "billing_bill_grosssales", "type": "BIGINT", "null": false }, "billing_bill_netdiscount": { "name": "billing_bill_netdiscount", "type": "BIGINT", "null": false }, "billing_bill_grossdiscount": { "name": "billing_bill_grossdiscount", "type": "BIGINT", "null": false }, "billing_bill_currency": { "name": "billing_bill_currency", "type": "VARCHAR(3)", "null": false }, "billing_bill_referral": { "name": "billing_bill_referral", "type": "INT", "null": true, "default": null, "foreignTable": "account", "foreignKey": "account_id" }, "billing_bill_referral_name": { "name": "billing_bill_referral_name", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_reference": { "name": "billing_bill_reference", "type": "INT", "null": false }, "billing_bill_payment": { "name": "billing_bill_payment", "type": "INT", "null": false }, "billing_bill_payment_text": { "name": "billing_bill_payment_text", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_paymentterms": { "name": "billing_bill_paymentterms", "type": "INT", "null": false }, "billing_bill_paymentterms_text": { "name": "billing_bill_paymentterms_text", "type": "VARCHAR(255)", "default": null, "null": true }, "billing_bill_ship_type": { "name": "billing_bill_ship_type", "type": "INT", "null": false }, "billing_bill_ship_text": { "name": "billing_bill_ship_text", "type": "VARCHAR(255)", "default": null, "null": true } } }, "billing_bill_element": { "name": "billing_bill_element", "fields": { "billing_bill_element_id": { "name": "billing_bill_element_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_bill_element_order": { "name": "billing_bill_element_order", "type": "INT", "null": false }, "billing_bill_element_item": { "name": "billing_bill_element_item", "type": "INT", "null": true, "default": null }, "billing_bill_element_item_segment": { "name": "billing_bill_element_item_segment", "type": "INT", "default": null, "null": true }, "billing_bill_element_item_number": { "name": "billing_bill_element_item_number", "type": "VARCHAR(255)", "null": false }, "billing_bill_element_item_name": { "name": "billing_bill_element_item_name", "type": "VARCHAR(255)", "null": false }, "billing_bill_element_item_desc": { "name": "billing_bill_element_item_desc", "type": "VARCHAR(255)", "null": false }, "billing_bill_element_quantity": { "name": "billing_bill_element_quantity", "type": "INT", "null": false }, "billing_bill_element_single_netlistprice": { "name": "billing_bill_element_single_netlistprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_grosslistprice": { "name": "billing_bill_element_single_grosslistprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_netlistprice": { "name": "billing_bill_element_total_netlistprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_grosslistprice": { "name": "billing_bill_element_total_grosslistprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_netsalesprice": { "name": "billing_bill_element_single_netsalesprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_grosssalesprice": { "name": "billing_bill_element_single_grosssalesprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_netsalesprice": { "name": "billing_bill_element_total_netsalesprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_grosssalesprice": { "name": "billing_bill_element_total_grosssalesprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_netpurchaseprice": { "name": "billing_bill_element_single_netpurchaseprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_grosspurchaseprice": { "name": "billing_bill_element_single_grosspurchaseprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_netpurchaseprice": { "name": "billing_bill_element_total_netpurchaseprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_grosspurchaseprice": { "name": "billing_bill_element_total_grosspurchaseprice", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_netprofit": { "name": "billing_bill_element_single_netprofit", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_single_grossprofit": { "name": "billing_bill_element_single_grossprofit", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_netprofit": { "name": "billing_bill_element_total_netprofit", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_total_grossprofit": { "name": "billing_bill_element_total_grossprofit", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_price_discount_single": { "name": "billing_bill_element_price_discount_single", "type": "INT", "null": true, "default": null }, "billing_bill_element_price_discount_total": { "name": "billing_bill_element_price_discount_total", "type": "INT", "null": true, "default": null }, "billing_bill_element_percentage_discount_single": { "name": "billing_bill_element_percentage_discount_single", "type": "INT", "null": true, "default": null }, "billing_bill_element_percentage_discount_total": { "name": "billing_bill_element_percentage_discount_total", "type": "INT", "null": true, "default": null }, "billing_bill_element_quantity_discount": { "name": "billing_bill_element_quantity_discount", "type": "INT", "null": true, "default": null }, "billing_bill_element_price_single_net": { "name": "billing_bill_element_price_single_net", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_price_total_net": { "name": "billing_bill_element_price_total_net", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_tax_price": { "name": "billing_bill_element_tax_price", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_tax_type": { "name": "billing_bill_element_tax_type", "type": "INT", "null": true, "default": null }, "billing_bill_element_tax_percentage": { "name": "billing_bill_element_tax_percentage", "type": "INT", "null": true, "default": null }, "billing_bill_element_price_single_gross": { "name": "billing_bill_element_price_single_gross", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_price_total_gross": { "name": "billing_bill_element_price_total_gross", "type": "BIGINT", "null": true, "default": null }, "billing_bill_element_bill": { "name": "billing_bill_element_bill", "type": "INT", "null": false, "foreignTable": "billing_bill", "foreignKey": "billing_bill_id" }, "billing_bill_element_promotion": { "name": "billing_bill_element_promotion", "type": "INT", "default": null, "null": true }, "billing_bill_element_event": { "name": "billing_bill_element_event", "type": "INT", "default": null, "null": true } } }, "billing_bill_media": { "name": "billing_bill_media", "fields": { "billing_bill_media_id": { "name": "billing_bill_media_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_bill_media_src": { "name": "billing_bill_media_src", "type": "INT", "null": false, "foreignTable": "billing_bill", "foreignKey": "billing_bill_id" }, "billing_bill_media_dst": { "name": "billing_bill_media_dst", "type": "INT", "null": false, "foreignTable": "media", "foreignKey": "media_id" } } }, "billing_bill_note": { "name": "billing_bill_note", "fields": { "billing_bill_note_id": { "name": "billing_bill_note_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_bill_note_bill": { "name": "billing_bill_note_bill", "type": "INT", "null": false, "foreignTable": "billing_bill", "foreignKey": "billing_bill_id" }, "billing_bill_note_doc": { "name": "billing_bill_note_doc", "type": "INT", "null": false, "foreignTable": "editor_doc", "foreignKey": "editor_doc_id" } } }, "billing_bill_responsible": { "name": "billing_bill_responsible", "fields": { "billing_bill_responsible_id": { "name": "billing_bill_responsible_id", "type": "INT", "null": false, "primary": true, "autoincrement": true }, "billing_bill_responsible_bill": { "name": "billing_bill_responsible_bill", "type": "INT", "null": false, "foreignTable": "billing_bill", "foreignKey": "billing_bill_id" }, "billing_bill_responsible_group": { "name": "billing_bill_responsible_group", "type": "INT", "null": false, "foreignTable": "group", "foreignKey": "group_id" }, "billing_bill_responsible_account": { "name": "billing_bill_responsible_account", "type": "INT", "null": false, "foreignTable": "account", "foreignKey": "account_id" }, "billing_bill_responsible_forwarded_by": { "name": "billing_bill_responsible_forwarded_by", "type": "INT", "null": false, "foreignTable": "account", "foreignKey": "account_id" }, "billing_bill_responsible_forwarded_at": { "name": "billing_bill_responsible_forwarded_at", "type": "DATETIME", "null": false } } } }