{
	"name": "table/external/moloni/order/order.json",
	"table_name": "order",
	"table_prefix": "ord",
	"record_type": ["sales"],
	"local_table": "order",
	"local_record_type": "sales",
	"default_field": "table/default_field.json",
	"field": [
		{
			"field_name": "json_data.fake_record_id",
			"field_type": "text",
			"local_field": "record_id",
			"writeable": false
		},
		{
			"field_name": "date",
			"field_type": "date",
			"local_field": "order_date"
		},
		{
			"field_name": "customer_id",
			"field_type": "integer",
			"local_field": "company_id"
		},
		{
			"field_name": "maturity_date_id",
			"field_type": "integer",
			"local_field": "terms_of_payment_id"
		},
		{
			"field_name": "document_set_id",
			"field_type": "integer",
			"local_field": "json_data.moloni.document_set_id"
		},
		{
			"field_name": "expiration_date",
			"field_type": "date",
			"local_field": "json_data.moloni.expiration_date"
		},
		{
			"field_name": "our_reference",
			"field_type": "text",
			"local_field": "our_reference"
		},
		{
			"field_name": "your_reference",
			"field_type": "text",
			"local_field": "your_reference"
		},
		{
			"field_name": "number",
			"field_type": "integer",
			"local_field": "json_data.customer_project",
			"writeable": false
		},
		{
			"field_name": "exchange_currency_id",
			"field_type": "integer",
			"local_field": "currency_id"
		},
		{
			"field_name": "entity_number",
			"field_type": "integer",
			"local_field": "company_id"
		},
		{
			"field_name": "status",
			"field_type": "integer",
			"local_field": "order_state",
			"local_field2": "json_data.woocommerce.status"
		},
		{
			"field_name": "lastmodified",
			"field_type": "datetime",
			"local_field": "modify_time"
		},
		{
			"field_name": "gross_value",
			"field_type": "double",
			"local_field": "price_with_vat"
		},
		{
			"field_name": "net_value",
			"field_type": "double",
			"local_field": "price_without_vat"
		},
		{
			"field_name": "taxes_value",
			"field_type": "double",
			"local_field": "vat_price"
		},
		{
			"field_name": "customer_note",
			"field_type": "text",
			"local_field": "note"
		}
	],
	"field_not_in_use": [],
	"example_data": {
		"terminal_id": 0,
		"lastmodified": "2019-08-30T13:46:57+0100",
		"document_id": 259097595,
		"document_type_id": 28,
		"customer_id": 13712052,
		"supplier_id": 0,
		"salesman_id": 0,
		"document_set_id": 144808,
		"document_set_name": "M",
		"number": 1,
		"date": "2019-08-30T00:00:00+0100",
		"expiration_date": "2019-09-29T00:00:00+0100",
		"maturity_date_days": null,
		"maturity_date_id": 507393,
		"maturity_date_name": "30 Dias",
		"your_reference": "19/503829 test",
		"our_reference": "",
		"entity_number": "1057",
		"entity_name": "Brunswick Marine - Emea Operations Lda",
		"entity_vat": "502319224",
		"entity_address": "Zona Industrial\r\nCampos - Vnc",
		"gross_value": 3251.5,
		"comercial_discount_value": 0,
		"financial_discount_value": 0,
		"taxes_value": 747.85,
		"deduction_value": 0,
		"net_value": 3999.35,
		"reconciled_value": 0,
		"status": 1,
		"transport_code": "",
		"transport_code_set_by": 0,
		"global_guide": 0,
		"exchange_currency_id": 0,
		"exchange_total_value": 0,
		"exchange_rate": 0,
		"document_type": {
			"document_type_id": 28,
			"saft_code": "NE"
		},
		"document_set": {
			"document_set_id": 144808,
			"name": "M"
		},
		"associated_documents": [],
		"reverse_associated_documents": []
	}
}
