{
	"name": "table/external/4d/order/order-sales.json",
	"table_name": "sales_order",
	"table_prefix": "so",
	"record_type": ["sales"],
	"local_table": "order",
	"local_record_type": "sales",
	"table_number": 21,
	"field": [
		{
			"field_name": "add_packing_cost",
			"local_field": "json_data.add_packing_cost",
			"field_type": "integer",
			"field_number": 79
		},
		{
			"field_name": "add_packing_material",
			"local_field": "json_data.add_packing_material",
			"field_type": "integer",
			"field_number": 78
		},
		{
			"field_name": "additional_data",
			"local_field": "json_data.additional_data",
			"field_type": "text",
			"field_number": 75
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 63,
			"length": 90,
			"constraint": ["index"]
		},
		{
			"field_name": "collection_invoice",
			"local_field": "json_data.collection_invoice",
			"field_type": "boolean",
			"field_number": 45
		},
		{
			"field_name": "company_id",
			"local_field": "company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 2,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_table": "company"
				}
			],
			"nullable": true
		},
		{
			"field_name": "confirmation_date",
			"local_field": "confirmation_date",
			"field_type": "date",
			"field_number": 51
		},
		{
			"field_name": "cost_center",
			"local_field": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 59,
			"length": 160
		},
		{
			"field_name": "cost_price",
			"local_field": "json_data.cost_price",
			"field_type": "double",
			"field_number": 32
		},
		{
			"field_name": "country_of_destination",
			"local_field": "json_data.country_of_destination",
			"field_type": "varchar",
			"field_length": 50,
			"field_number": 20,
			"length": 100
		},
		{
			"field_name": "country_of_origin",
			"local_field": "json_data.country_of_origin",
			"field_type": "varchar",
			"field_length": 50,
			"field_number": 19,
			"length": 100
		},
		{
			"field_name": "covenant",
			"local_field": "json_data.covenant",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 66,
			"length": 160
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 64,
			"length": 40
		},
		{
			"field_name": "currency_id",
			"local_field": "currency_id",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 16,
			"length": 12,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "currency_id",
					"linked_table": "currency"
				}
			],
			"nullable": true
		},
		{
			"field_name": "customer_order_number",
			"local_field": "company_reference_number",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 58,
			"length": 160,
			"constraint": ["index"]
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 39,
			"length": 80,
			"constraint": ["index"]
		},
		{
			"field_name": "dealer_address",
			"local_field": "json_data.dealer_address",
			"field_type": "text",
			"field_number": 57
		},
		{
			"field_name": "dealer_company_id",
			"local_field": "json_data.dealer_company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 56,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_name": "dealer_customer",
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_table": "company"
				}
			]
		},
		{
			"field_name": "delivery_address",
			"local_field": "delivery_address",
			"field_type": "text",
			"field_number": 11
		},
		{
			"field_name": "delivery_company_id",
			"local_field": "delivery_company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 10,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_name": "delivery_customer",
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_table": "company"
				}
			],
			"nullable": true
		},
		{
			"field_name": "description_of_the_goods",
			"local_field": "json_data.description_of_the_goods",
			"field_type": "text",
			"field_number": 28
		},
		{
			"field_name": "destination",
			"local_field": "json_data.destination",
			"field_type": "varchar",
			"field_length": 50,
			"field_number": 23,
			"length": 100
		},
		{
			"field_name": "discharge_place",
			"local_field": "json_data.discharge_place",
			"field_type": "varchar",
			"field_length": 50,
			"field_number": 22,
			"length": 100
		},
		{
			"field_name": "employee_id",
			"local_field": "person_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 18,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "employee_id",
					"linked_table": "employee"
				}
			],
			"nullable": true
		},
		{
			"field_name": "eur_number",
			"local_field": "json_data.eur_number",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 40,
			"length": 80
		},
		{
			"field_name": "euro_rate",
			"local_field": "json_data.euro_rate",
			"field_type": "double",
			"field_number": 49
		},
		{
			"field_name": "exchange_rate",
			"local_field": "exchange_rate",
			"field_type": "double",
			"field_number": 42
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 44,
			"constraint": ["index"]
		},
		{
			"field_name": "first_delivery_date",
			"local_field": "json_data.first_delivery_date",
			"field_type": "date",
			"field_number": 38,
			"constraint": ["index"]
		},
		{
			"field_name": "freight_charges_payer",
			"local_field": "json_data.freight_charges_payer",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 52,
			"length": 160
		},
		{
			"field_name": "gross_weight",
			"local_field": "json_data.gross_weight",
			"field_type": "double",
			"field_number": 24
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 4
		},
		{
			"field_name": "invoicing_address",
			"local_field": "invoicing_address",
			"field_type": "text",
			"field_number": 12
		},
		{
			"field_name": "invoicing_company_id",
			"local_field": "invoicing_company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 17,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_name": "invoicing_customer",
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_table": "company"
				}
			],
			"nullable": true
		},
		{
			"field_name": "mark",
			"local_field": "json_data.mark",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 30,
			"length": 160
		},
		{
			"field_name": "material_cost",
			"local_field": "json_data.material_cost",
			"field_type": "double",
			"field_number": 70
		},
		{
			"field_name": "material_margin",
			"local_field": "json_data.material_margin",
			"field_type": "double",
			"field_number": 72
		},
		{
			"field_name": "material_margin_percentage",
			"local_field": "json_data.material_margin_percentage",
			"field_type": "double",
			"field_number": 71
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 65,
			"length": 40
		},
		{
			"field_name": "net_weight",
			"local_field": "json_data.net_weight",
			"field_type": "double",
			"field_number": 25
		},
		{
			"field_name": "notes",
			"local_field": "note",
			"field_type": "text",
			"field_number": 36
		},
		{
			"field_name": "number_of_pallets",
			"local_field": "json_data.number_of_pallets",
			"field_type": "integer",
			"field_number": 62
		},
		{
			"field_name": "offer_number",
			"local_field": "json_data.offer_number",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 48,
			"length": 20
		},
		{
			"field_name": "order_address",
			"local_field": "order_address",
			"field_type": "text",
			"field_number": 50
		},
		{
			"field_name": "order_date",
			"local_field": "order_date",
			"field_type": "date",
			"field_number": 33,
			"constraint": ["index"]
		},
		{
			"field_name": "order_discount",
			"local_field": "json_data.order_discount",
			"field_type": "double",
			"field_number": 35
		},
		{
			"field_name": "order_discount_percentage",
			"local_field": "json_data.order_discount_percentage",
			"field_type": "double",
			"field_number": 34
		},
		{
			"field_name": "our_reference",
			"local_field": "our_reference",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 6,
			"length": 70
		},
		{
			"field_name": "packing_info",
			"local_field": "json_data.packing_info",
			"field_type": "text",
			"field_number": 76
		},
		{
			"field_name": "packing_state",
			"local_field": "json_data.packing_state",
			"field_type": "integer",
			"field_number": 73,
			"constraint": ["index"]
		},
		{
			"field_name": "place_of_departure",
			"local_field": "json_data.place_of_departure",
			"field_type": "varchar",
			"field_length": 50,
			"field_number": 27,
			"length": 100
		},
		{
			"field_name": "postcalc_date",
			"local_field": "json_data.postcalc_date",
			"field_type": "date",
			"field_number": 77
		},
		{
			"field_name": "precarriage",
			"local_field": "json_data.precarriage",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 21,
			"length": 40
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 61,
			"length": 80
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 55,
			"length": 90,
			"constraint": ["unique"]
		},
		{
			"field_name": "row_discount",
			"local_field": "discount_price",
			"field_type": "double",
			"field_number": 14
		},
		{
			"field_name": "row_discount_percentage",
			"local_field": "json_data.row_discount_percentage",
			"field_type": "double",
			"field_number": 13
		},
		{
			"field_name": "sales_margin",
			"local_field": "json_data.sales_margin",
			"field_type": "double",
			"field_number": 69
		},
		{
			"field_name": "sales_margin_percentage",
			"local_field": "json_data.sales_margin_percentage",
			"field_type": "double",
			"field_number": 68
		},
		{
			"field_name": "sales_order_id",
			"local_field": "order_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 1,
			"length": 20,
			"constraint": ["unique"]
		},
		{
			"field_name": "sales_price_total",
			"local_field": "price_without_vat",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "sales_price_wo_discount",
			"local_field": "json_data.sales_price_wo_discount",
			"field_type": "double",
			"field_number": 3
		},
		{
			"field_name": "sales_probability",
			"local_field": "json_data.sales_probability",
			"field_type": "double",
			"field_number": 74
		},
		{
			"field_name": "state",
			"local_field": "order_state",
			"field_type": "varchar",
			"field_length": 2,
			"field_number": 43,
			"length": 4,
			"constraint": ["index"],
			"value_map": "table/external/4d/prf/constant-4d.json/order_state"
		},
		{
			"field_name": "supplier_id",
			"local_field": "json_data.supplier_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 41,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "supplier_id",
					"linked_table": "supplier"
				}
			],
			"nullable": true
		},
		{
			"field_name": "supplier_invoice_date",
			"local_field": "json_data.supplier_invoicing_date",
			"field_type": "date",
			"field_number": 54
		},
		{
			"field_name": "supplier_invoice_number",
			"local_field": "json_data.supplier_invoice_number",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 53,
			"length": 80
		},
		{
			"field_name": "tariff_heading",
			"local_field": "json_data.tariff_heading",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 29,
			"length": 160
		},
		{
			"field_name": "term_of_delivery",
			"local_field": "term_of_delivery",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 31,
			"length": 60
		},
		{
			"field_name": "terms_of_payment_id",
			"local_field": "terms_of_payment_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 9,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "terms_of_payment_id",
					"linked_table": "terms_of_payment"
				}
			],
			"nullable": true
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 60,
			"length": 120,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 67
		},
		{
			"field_name": "type_",
			"local_field": "order_type",
			"field_type": "varchar",
			"field_length": 2,
			"field_number": 8,
			"length": 4,
			"constraint": ["index"],
			"value_map": "table/external/4d/prf/constant-4d.json/order_type"
		},
		{
			"field_name": "vat_total",
			"local_field": "vat_price",
			"field_type": "double",
			"field_number": 37
		},
		{
			"field_name": "volume",
			"local_field": "json_data.volume",
			"field_type": "double",
			"field_number": 26
		},
		{
			"field_name": "way_of_delivery",
			"local_field": "way_of_delivery",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 5,
			"length": 60
		},
		{
			"field_name": "your_reference",
			"local_field": "your_reference",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 7,
			"length": 70
		},
		{
			"field_name": "your_reference_of_delivery",
			"local_field": "json_data.your_reference_of_delivery",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 46,
			"length": 70
		},
		{
			"field_name": "your_reference_of_invoice",
			"local_field": "json_data.your_reference_of_invoice",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 47,
			"length": 70
		}
	],
	"default_value": {
		"static": {
			"order_state": "AV",
			"order_type": "TI"
		}
	}
}
