{
	"name": "table/external/4d/order/order_row-sales.json",
	"table_name": "sales_order_row",
	"table_prefix": "sor",
	"table_number": 23,
	"record_type": ["sales"],
	"main_table": "sales_order",
	"field": [
		{
			"field_name": "additional_data",
			"field_number": 92,
			"field_type": "text",
			"local_field": "json_data.additional_data"
		},
		{
			"field_length": 20,
			"field_name": "amount_to_collect",
			"field_number": 65,
			"field_type": "varchar",
			"local_field": "json_data.amount_to_collect"
		},
		{
			"field_name": "calc_sales_price_total",
			"field_number": 22,
			"field_type": "double",
			"local_field": "json_data.calc_sales_price_total"
		},
		{
			"constraint": ["index"],
			"field_length": 45,
			"field_name": "change_id",
			"field_number": 83,
			"field_type": "varchar",
			"local_field": "modify_id"
		},
		{
			"field_length": 20,
			"field_name": "collected_amount",
			"field_number": 66,
			"field_type": "varchar",
			"local_field": "collected_amount"
		},
		{
			"field_name": "commission",
			"field_number": 48,
			"field_type": "double",
			"local_field": "json_data.commission"
		},
		{
			"field_name": "commission__unit",
			"field_number": 44,
			"field_type": "double",
			"local_field": "json_data.commission__unit"
		},
		{
			"field_name": "commission_percent",
			"field_number": 46,
			"field_type": "double",
			"local_field": "json_data.commission_percent"
		},
		{
			"constraint": ["index"],
			"field_name": "confirmed_delivery_date",
			"field_number": 35,
			"field_type": "date",
			"local_field": "confirmed_delivery_date"
		},
		{
			"field_length": 80,
			"field_name": "cost_center",
			"field_number": 71,
			"field_type": "varchar",
			"local_field": "json_data.cost_center"
		},
		{
			"field_name": "cost_price_total",
			"field_number": 8,
			"field_type": "double",
			"local_field": "json_data.cost_price_total"
		},
		{
			"field_length": 20,
			"field_name": "creator_id",
			"field_number": 84,
			"field_type": "varchar",
			"local_field": "json_data.create_user"
		},
		{
			"constraint": ["index"],
			"field_name": "critical_start_date",
			"field_number": 75,
			"field_type": "date",
			"local_field": "json_data.critical_start_date"
		},
		{
			"field_name": "critical_start_difference",
			"field_number": 80,
			"field_type": "double",
			"local_field": "json_data.critical_start_difference"
		},
		{
			"field_name": "critical_start_time",
			"field_number": 76,
			"field_type": "time",
			"local_field": "json_data.critical_start_time"
		},
		{
			"field_length": 40,
			"field_name": "customer_project",
			"field_number": 77,
			"field_type": "varchar",
			"local_field": "json_data.customer_project"
		},
		{
			"constraint": ["index"],
			"field_length": 10,
			"field_name": "customer_row_number",
			"field_number": 19,
			"field_type": "varchar",
			"local_field": "json_data.customer_row_number"
		},
		{
			"field_name": "delivered_before",
			"field_number": 26,
			"field_type": "double",
			"local_field": "delivered_before"
		},
		{
			"constraint": ["index"],
			"field_name": "delivered_date",
			"field_number": 6,
			"field_type": "date",
			"local_field": "delivery_date"
		},
		{
			"constraint": ["index"],
			"field_name": "delivered_quantity",
			"field_number": 10,
			"field_type": "double",
			"local_field": "delivery_amount"
		},
		{
			"constraint": ["index"],
			"field_name": "delivery_date",
			"field_number": 36,
			"field_type": "date",
			"local_field": "actual_delivery_date"
		},
		{
			"constraint": ["index"],
			"field_length": 2,
			"field_name": "delivery_state",
			"field_number": 21,
			"field_type": "varchar",
			"local_field": "delivery_state"
		},
		{
			"field_length": 50,
			"field_name": "delivery_time",
			"field_number": 51,
			"field_type": "varchar",
			"local_field": "json_data.delivery_time"
		},
		{
			"field_name": "discount_amount",
			"field_number": 5,
			"field_type": "double",
			"local_field": "discount_price"
		},
		{
			"field_name": "discount_percentage",
			"field_number": 4,
			"field_type": "double",
			"local_field": "discount_percent"
		},
		{
			"constraint": ["index"],
			"field_length": 10,
			"field_name": "dispatch_note_id",
			"field_number": 12,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "dispatch_note_id",
					"linked_table": "dispatch_note"
				}
			],
			"local_field": "dispatch_note_id",
			"nullable": true
		},
		{
			"field_name": "est_finish_difference",
			"field_number": 81,
			"field_type": "double",
			"local_field": "json_data.est_finish_difference"
		},
		{
			"field_name": "est_manufacture_date",
			"field_number": 73,
			"field_type": "date",
			"local_field": "json_data.est_manufacture_date"
		},
		{
			"field_name": "est_manufacture_time",
			"field_number": 74,
			"field_type": "time",
			"local_field": "json_data.est_manufacture_time"
		},
		{
			"field_name": "explanation",
			"field_number": 24,
			"field_type": "text",
			"local_field": "description"
		},
		{
			"constraint": ["index"],
			"field_name": "firm_id",
			"field_number": 69,
			"field_type": "integer",
			"local_field": "json_data.firm_id"
		},
		{
			"field_name": "first_conf_delivery_date",
			"field_number": 55,
			"field_type": "date",
			"local_field": "json_data.first_confirmed_delivery_date"
		},
		{
			"field_name": "in_dispatch_note",
			"field_number": 29,
			"field_type": "boolean",
			"local_field": "json_data.in_dispatch_note"
		},
		{
			"field_name": "in_enclosure",
			"field_number": 52,
			"field_type": "boolean",
			"local_field": "json_data.in_enclosure"
		},
		{
			"field_name": "info",
			"field_number": 20,
			"field_type": "text",
			"local_field": "info"
		},
		{
			"constraint": ["index"],
			"field_length": 10,
			"field_name": "invoice_id",
			"field_number": 14,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "invoice_id",
					"linked_table": "invoice"
				}
			],
			"local_field": "invoice_id"
		},
		{
			"field_name": "make_invoice",
			"field_number": 34,
			"field_type": "boolean",
			"local_field": "json_data.make_invoice"
		},
		{
			"field_name": "marketing_support",
			"field_number": 49,
			"field_type": "double",
			"local_field": "json_data.marketing_support"
		},
		{
			"field_name": "marketing_support__unit",
			"field_number": 45,
			"field_type": "double",
			"local_field": "json_data.marketing_support__unit"
		},
		{
			"field_name": "marketing_support_percent",
			"field_number": 47,
			"field_type": "double",
			"local_field": "json_data.marketing_support_percent"
		},
		{
			"field_name": "material_act_arrival_date",
			"field_number": 50,
			"field_type": "date",
			"local_field": "json_data.material_act_arrival_date"
		},
		{
			"field_name": "material_cost",
			"field_number": 89,
			"field_type": "double",
			"local_field": "json_data.material_cost"
		},
		{
			"field_name": "material_est_arrival_date",
			"field_number": 43,
			"field_type": "date",
			"local_field": "json_data.material_est_arrival_date"
		},
		{
			"field_name": "material_margin",
			"field_number": 91,
			"field_type": "double",
			"local_field": "json_data.material_margin"
		},
		{
			"field_name": "material_margin_percentage",
			"field_number": 90,
			"field_type": "double",
			"local_field": "json_data.material_margin_percentage"
		},
		{
			"field_length": 20,
			"field_name": "modifier_id",
			"field_number": 85,
			"field_type": "varchar",
			"local_field": "modify_user"
		},
		{
			"constraint": ["index"],
			"field_name": "need_calculation_type",
			"field_number": 82,
			"field_type": "integer"
		},
		{
			"field_name": "no_printing",
			"field_number": 32,
			"field_type": "boolean",
			"local_field": "json_data.no_printing"
		},
		{
			"field_name": "number_of_packets",
			"field_number": 30,
			"field_type": "double",
			"local_field": "json_data.number_of_packets"
		},
		{
			"field_name": "order_amount_2",
			"field_number": 60,
			"field_type": "double",
			"local_field": "json_data.order_amount_2"
		},
		{
			"constraint": ["index"],
			"field_length": 2,
			"field_name": "order_state",
			"local_field": "json_data.order_state",
			"field_number": 39,
			"field_type": "varchar"
		},
		{
			"field_name": "ordered_amount",
			"field_number": 7,
			"field_type": "double",
			"local_field": "order_amount"
		},
		{
			"field_name": "packet__length",
			"field_number": 53,
			"field_type": "double",
			"local_field": "json_data.packet__length"
		},
		{
			"field_length": 50,
			"field_name": "pallet_number",
			"field_number": 38,
			"field_type": "varchar",
			"local_field": "json_data.pallet_number"
		},
		{
			"field_length": 30,
			"field_name": "parcel_code",
			"field_number": 33,
			"field_type": "varchar",
			"local_field": "json_data.parcel_code"
		},
		{
			"field_name": "partial_delivery_number",
			"field_number": 16,
			"field_type": "integer",
			"local_field": "json_data.partial_delivery_number"
		},
		{
			"field_length": 20,
			"field_name": "position_",
			"field_number": 41,
			"field_type": "varchar",
			"local_field": "json_data.position"
		},
		{
			"field_name": "postcalc_date",
			"field_number": 94,
			"field_type": "date",
			"local_field": "json_data.postcalc_date"
		},
		{
			"field_name": "price__unit",
			"field_number": 9,
			"field_type": "double",
			"local_field": "unit_price"
		},
		{
			"field_name": "price__unit_2",
			"field_number": 62,
			"field_type": "double",
			"local_field": "json_data.price__unit_2"
		},
		{
			"field_length": 20,
			"field_name": "price_group",
			"field_number": 67,
			"field_type": "varchar",
			"local_field": "json_data.price_group"
		},
		{
			"field_name": "price_with_vat__unit",
			"field_number": 64,
			"field_type": "double",
			"local_field": "json_data.price_with_vat__unit"
		},
		{
			"field_name": "pricing_state",
			"field_number": 93,
			"field_type": "integer",
			"local_field": "json_data.pricing_state"
		},
		{
			"constraint": ["index"],
			"field_length": 44,
			"field_name": "product_id",
			"field_number": 2,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "product_id",
					"linked_table": "product"
				}
			],
			"local_field": "product_id",
			"nullable": true
		},
		{
			"constraint": ["index"],
			"field_length": 35,
			"field_name": "production_lot",
			"field_number": 42,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "production_lot",
					"linked_table": "work_order"
				}
			],
			"local_field": "production_order_id",
			"nullable": true
		},
		{
			"field_length": 2,
			"field_name": "production_state",
			"field_number": 56,
			"field_type": "varchar",
			"local_field": "json_data.production_state"
		},
		{
			"constraint": ["index"],
			"field_length": 40,
			"field_name": "project_id",
			"field_number": 78,
			"field_type": "varchar",
			"local_field": "json_data.project_id"
		},
		{
			"field_length": 20,
			"field_name": "purchase_order__row",
			"field_number": 70,
			"field_type": "varchar",
			"local_field": "json_data.purchase_order__row"
		},
		{
			"constraint": ["unique"],
			"field_length": 45,
			"field_name": "record_id",
			"field_number": 68,
			"field_type": "varchar",
			"local_field": "record_id"
		},
		{
			"field_name": "remove_from_stock",
			"field_number": 31,
			"field_type": "boolean",
			"local_field": "json_data.remove_from_stock"
		},
		{
			"constraint": ["index"],
			"field_name": "row_number",
			"field_number": 15,
			"field_type": "integer",
			"local_field": "row_number"
		},
		{
			"field_name": "sales_margin",
			"field_number": 88,
			"field_type": "double",
			"local_field": "json_data.sales_margin"
		},
		{
			"field_name": "sales_margin_percentage",
			"field_number": 87,
			"field_type": "double",
			"local_field": "json_data.sales_margin_percentage"
		},
		{
			"constraint": ["index"],
			"field_length": 6,
			"field_name": "sales_order_code_id",
			"field_number": 3,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "sales_order_code_id",
					"linked_table": "sales_order_code"
				}
			],
			"local_field": "order_code_id",
			"nullable": true
		},
		{
			"constraint": ["index"],
			"field_length": 10,
			"field_name": "sales_order_id",
			"field_number": 1,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "sales_order_id",
					"linked_table": "sales_order"
				}
			],
			"local_field": "order_id",
			"nullable": true
		},
		{
			"field_name": "sales_price_total",
			"field_number": 17,
			"field_type": "double",
			"local_field": "price_without_vat"
		},
		{
			"field_name": "sales_probability",
			"field_number": 95,
			"field_type": "double",
			"local_field": "json_data.sales_probability"
		},
		{
			"field_length": 25,
			"field_name": "serial_number",
			"field_number": 28,
			"field_type": "varchar",
			"local_field": "json_data.serial_number"
		},
		{
			"constraint": ["index"],
			"field_length": 10,
			"field_name": "stock_event",
			"field_number": 13,
			"field_type": "varchar",
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "stock_event_id",
					"linked_table": "stock_event"
				}
			],
			"local_field": "stock_event_id"
		},
		{
			"constraint": ["index"],
			"field_length": 15,
			"field_name": "tariff_heading",
			"field_number": 37,
			"field_type": "varchar",
			"local_field": "json_data.tariff_heading"
		},
		{
			"constraint": ["index"],
			"field_length": 60,
			"field_name": "transfer_id",
			"field_number": 72,
			"field_type": "varchar",
			"local_field": "json_data.transfer_id"
		},
		{
			"field_name": "transfer_state",
			"field_number": 86,
			"field_type": "integer",
			"local_field": "json_data.transfer_state"
		},
		{
			"constraint": ["index"],
			"field_length": 2,
			"field_name": "type_",
			"local_field": "json_data.type",
			"field_number": 27,
			"field_type": "varchar"
		},
		{
			"field_length": 5,
			"field_name": "unit",
			"field_number": 18,
			"field_type": "varchar",
			"local_field": "unit"
		},
		{
			"field_length": 5,
			"field_name": "unit_2",
			"field_number": 61,
			"field_type": "varchar",
			"local_field": "json_data.unit_2"
		},
		{
			"field_name": "unit_price__volume",
			"field_number": 63,
			"field_type": "double",
			"local_field": "json_data.unit_price__volume"
		},
		{
			"field_name": "units__packet",
			"field_number": 54,
			"field_type": "double",
			"local_field": "json_data.units__packet"
		},
		{
			"field_name": "units__x_packet",
			"field_number": 57,
			"field_type": "double",
			"local_field": "json_data.units__x_packet"
		},
		{
			"field_name": "units__y_packet",
			"field_number": 58,
			"field_type": "double",
			"local_field": "json_data.units__y_packet"
		},
		{
			"field_name": "vat_percentage",
			"field_number": 23,
			"field_type": "double",
			"local_field": "vat_percent"
		},
		{
			"field_name": "vat_price",
			"field_number": 25,
			"field_type": "double",
			"local_field": "vat_price"
		},
		{
			"field_name": "volume",
			"field_number": 59,
			"field_type": "double",
			"local_field": "json_data.volume"
		},
		{
			"field_name": "waiting_for_delivery",
			"field_number": 11,
			"field_type": "double",
			"local_field": "waiting_for_delivery"
		},
		{
			"constraint": ["index"],
			"field_length": 20,
			"field_name": "waybill_id",
			"field_number": 79,
			"field_type": "varchar",
			"local_field": "json_data.waybill_id"
		},
		{
			"field_name": "work_phase_number",
			"field_number": 40,
			"field_type": "integer",
			"local_field": "json_data.work_phase_number"
		}
	],
	"local_record_type": "sales",
	"local_record_type-": ["sales", "dispatch_note"],
	"local_table": "order_row"
}
