{
	"name": "table/external/procountor/order/order-invoice.json",
	"table_name": "order",
	"table_prefix": "ord",
	"record_type": ["invoice"],
	"local_table": "order",
	"local_record_type": "invoice",

	"format": {
		"date": "%Y-%m-%dT%H:%M:%S%z"
	},
	"default_field": "table/prf/default_field.json",
	"field": [
		{
			"field_name": "order_id",
			"local_field": "order_id",
			"field_type": "text",
			"constraint": ["primary key"]
		},
		{
			"field_name": "company_id",
			"local_field": "company_id",
			"field_type": "text"
		},
		{
			"field_name": "company_reference_number",
			"local_field": "company_reference_number",
			"field_type": "text"
		},
		{
			"field_name": "confirmation_date",
			"local_field": "confirmation_date",
			"field_type": "date"
		},
		{
			"field_name": "currency_id",
			"local_field": "currency_id",
			"field_type": "text"
		},
		{
			"field_name": "delivery_address",
			"local_field": "delivery_address",
			"field_type": "text"
		},
		{
			"field_name": "delivery_company_id",
			"local_field": "delivery_company_id",
			"field_type": "text"
		},
		{
			"field_name": "discount_price",
			"local_field": "discount_price",
			"field_type": "double"
		},
		{
			"field_name": "due_date",
			"local_field": "due_date",
			"field_type": "date"
		},
		{
			"field_name": "exchange_rate",
			"local_field": "exchange_rate",
			"field_type": "double"
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text"
		},
		{
			"field_name": "invoicing_address",
			"local_field": "invoicing_address",
			"field_type": "text"
		},
		{
			"field_name": "invoicing_company_id",
			"local_field": "invoicing_company_id",
			"field_type": "text"
		},
		{
			"field_name": "local_price_without_vat",
			"local_field": "local_price_without_vat",
			"field_type": "double"
		},
		{
			"field_name": "note",
			"local_field": "note",
			"field_type": "text"
		},
		{
			"field_name": "order_address",
			"local_field": "order_address",
			"field_type": "text"
		},
		{
			"field_name": "order_date",
			"local_field": "order_date",
			"field_type": "date"
		},
		{
			"field_name": "order_state",
			"local_field": "order_state",
			"field_type": "text",
			"value_array": "order_state"
		},
		{
			"field_name": "order_type",
			"local_field": "order_type",
			"field_type": "text",
			"value_array": "order_type"
		},
		{
			"field_name": "our_reference",
			"local_field": "our_reference",
			"field_type": "text"
		},
		{
			"field_name": "person_id",
			"local_field": "person_id",
			"field_type": "text"
		},
		{
			"field_name": "price_with_vat",
			"local_field": "price_with_vat",
			"field_type": "double"
		},
		{
			"field_name": "price_without_vat",
			"local_field": "price_without_vat",
			"field_type": "double"
		},
		{
			"field_name": "term_of_delivery",
			"local_field": "term_of_delivery",
			"field_type": "text"
		},
		{
			"field_name": "terms_of_payment_id",
			"local_field": "terms_of_payment_id",
			"field_type": "text"
		},
		{
			"field_name": "vat_price",
			"local_field": "vat_price",
			"field_type": "double"
		},
		{
			"field_name": "voucher_id",
			"local_field": "voucher_id",
			"field_type": "text"
		},
		{
			"field_name": "way_of_delivery",
			"local_field": "way_of_delivery",
			"field_type": "text"
		},
		{
			"field_name": "your_reference",
			"local_field": "your_reference",
			"field_type": "text"
		}
	],
	"extra_field": [
		{
			"field_name": "json_data.bank_reference_number",
			"local_field": "json_data.bank_reference_number",
			"field_type": "text"
		},
		{
			"field_name": "json_data.bank_account",
			"local_field": "json_data.bank_account",
			"field_type": "text"
		},
		{
			"field_name": "json_data.discount_percentage",
			"local_field": "json_data.discount_percentage",
			"field_type": "double"
		},
		{
			"field_name": "json_data.destination_date",
			"local_field": "json_data.destination_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.electronic_invoice_address",
			"local_field": "json_data.electronic_invoice_address",
			"field_type": "text"
		},
		{
			"field_name": "json_data.intermediator",
			"local_field": "json_data.intermediator",
			"field_type": "text"
		},
		{
			"field_name": "json_data.trade_registry_number",
			"local_field": "json_data.trade_registry_number",
			"field_type": "text"
		}
	]
}
