{
	"name": "table/external/4d/order/order_row-invoice.json",
	"table_name": "invoice_row",
	"table_prefix": "inr",
	"main_table": "invoice",
	"record_type": ["invoice", "credit_note"],
	"local_table": "order_row",
	"local_record_type": ["invoice", "credit_note"],
	"table_number": 18,
	"default_order": [
		{
			"field": "order_id",
			"order": "<"
		},
		{
			"field": "row_number",
			"order": ">"
		}
	],
	"field": [
		{
			"field_name": "invoice_id",
			"local_field": "invoice_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 1,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "invoice_id",
					"linked_table": "invoice"
				}
			],
			"nullable": true
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 30,
			"constraint": ["index"]
		},
		{
			"field_name": "commission",
			"local_field": "json_data.commission",
			"field_type": "double",
			"field_number": 27
		},
		{
			"field_name": "cost_center",
			"local_field": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 40
		},
		{
			"field_name": "cost_price__unit",
			"local_field": "json_data.cost_price__unit",
			"field_type": "double",
			"field_number": 22
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 44
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 42
		},
		{
			"field_name": "customer_row_number",
			"local_field": "json_data.customer_row_number",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 18
		},
		{
			"field_name": "delivered_quantity",
			"local_field": "delivery_amount",
			"field_type": "double",
			"field_number": 5
		},
		{
			"field_name": "delivery_customer",
			"local_field": "json_data.delivery_customer",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 31,
			"constraint": ["index"]
		},
		{
			"field_name": "delivery_date",
			"local_field": "delivery_date",
			"field_type": "date",
			"field_number": 19,
			"constraint": ["index"]
		},
		{
			"field_name": "dimension",
			"local_field": "json_data.dimension",
			"field_type": "double",
			"field_number": 35
		},
		{
			"field_name": "discount_amount",
			"local_field": "discount_price",
			"field_type": "double",
			"field_number": 16
		},
		{
			"field_name": "discount_percentage",
			"local_field": "discount_percent",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "dispatch_note",
			"local_field": "dispatch_note_id",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 3,
			"constraint": ["index"]
		},
		{
			"field_name": "employee_id",
			"local_field": "json_data.employee_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 21,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "employee_id",
					"linked_table": "employee"
				}
			],
			"nullable": true
		},
		{
			"field_name": "explanation",
			"local_field": "description",
			"field_type": "text",
			"field_number": 9
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 39,
			"constraint": ["index"]
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 10
		},
		{
			"field_name": "marketing_support",
			"local_field": "json_data.marketing_support",
			"field_type": "double",
			"field_number": 28
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 45
		},
		{
			"field_name": "no_printing",
			"local_field": "json_data.no_printing",
			"field_type": "boolean",
			"field_number": 33
		},
		{
			"field_name": "order_amount",
			"local_field": "order_amount",
			"field_type": "double",
			"field_number": 20
		},
		{
			"field_name": "parcel_code",
			"local_field": "json_data.parcel_code",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 34
		},
		{
			"field_name": "position_",
			"local_field": "json_data.position",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 32
		},
		{
			"field_name": "price__unit",
			"local_field": "unit_price",
			"field_type": "double",
			"field_number": 6
		},
		{
			"field_name": "price_total",
			"local_field": "price_without_vat",
			"field_type": "double",
			"field_number": 12
		},
		{
			"field_name": "product_id",
			"local_field": "product_id",
			"field_type": "varchar",
			"field_length": 44,
			"field_number": 11,
			"constraint": ["index"],
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "product_id",
					"linked_table": "product"
				},
				{
					"default_link": false,
					"link_type": "prevent delete",
					"linked_field": "product_id",
					"linked_table": "product",
					"linking_record_type": "credit_note"
				}
			],
			"nullable": true
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 43
		},
		{
			"field_name": "purchase_order",
			"local_field": "json_data.purchase_order",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 23,
			"constraint": ["index"]
		},
		{
			"field_name": "purchase_order_code_id",
			"local_field": "json_data.purchase_order_code_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 37,
			"constraint": ["index"]
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 38,
			"constraint": ["unique"]
		},
		{
			"field_name": "row_number",
			"local_field": "row_number",
			"field_type": "integer",
			"field_number": 13,
			"constraint": ["index"]
		},
		{
			"field_name": "sales_order",
			"local_field": "order_id",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 2,
			"constraint": ["index"]
		},
		{
			"field_name": "sales_order_code_id",
			"local_field": "order_code_id",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 14,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "sales_order_code_id",
					"linked_table": "sales_order_code"
				}
			],
			"nullable": true
		},
		{
			"field_name": "sales_price",
			"local_field": "json_data.sales_price",
			"field_type": "double",
			"field_number": 29
		},
		{
			"field_name": "serial_number",
			"local_field": "json_data.serial_number",
			"field_type": "varchar",
			"field_length": 25,
			"field_number": 25
		},
		{
			"field_name": "tariff_heading",
			"local_field": "json_data.tariff_heading",
			"field_type": "varchar",
			"field_length": 15,
			"field_number": 26,
			"constraint": ["index"]
		},
		{
			"field_name": "total_amount",
			"local_field": "price_with_vat",
			"field_type": "double",
			"field_number": 17
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 41,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 46
		},
		{
			"field_name": "type_",
			"local_field": "json_data.type",
			"field_type": "varchar",
			"field_length": 2,
			"field_number": 24,
			"constraint": ["index"]
		},
		{
			"field_name": "unit",
			"local_field": "unit",
			"field_type": "varchar",
			"field_length": 5,
			"field_number": 4
		},
		{
			"field_name": "unit_total",
			"local_field": "json_data.unit_total",
			"field_type": "double",
			"field_number": 36
		},
		{
			"field_name": "vat_percentage",
			"local_field": "vat_percent",
			"field_type": "double",
			"field_number": 7
		},
		{
			"field_name": "vat_price",
			"local_field": "vat_price",
			"field_type": "double",
			"field_number": 8
		}
	]
}
