{
	"name": "table/external/4d/order/sales_order_code.json",
	"table_name": "sales_order_code",
	"table_prefix": "soc",
	"main_table": "account",
	"record_type": ["sales"],
	"local_table": "order_code",
	"local_record_type": "sales",
	"table_number": 24,
	"field": [
		{
			"field_name": "sales_order_code_id",
			"local_field": "order_code_id",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 1,
			"constraint": ["unique"]
		},
		{
			"field_name": "ar_account_id",
			"local_field": "json_data.ar_account_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 8,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_table": "account"
				}
			],
			"nullable": true
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 22,
			"constraint": ["index"]
		},
		{
			"field_name": "commission__unit",
			"local_field": "json_data.commission__unit",
			"field_type": "double",
			"field_number": 14
		},
		{
			"field_name": "commission_percent",
			"local_field": "json_data.commission_percent",
			"field_type": "double",
			"field_number": 13
		},
		{
			"field_name": "cost_center",
			"local_field": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 18
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 23
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 20
		},
		{
			"field_name": "discount_account_id",
			"local_field": "json_data.discount_account_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 9,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_table": "account"
				}
			],
			"nullable": true
		},
		{
			"field_name": "export_code",
			"local_field": "json_data.export_code",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 6
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 12,
			"constraint": ["index"]
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 5
		},
		{
			"field_name": "marketing_support__unit",
			"local_field": "json_data.marketing_support__unit",
			"field_type": "double",
			"field_number": 16
		},
		{
			"field_name": "marketing_support_percent",
			"local_field": "json_data.marketing_support_percent",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 24
		},
		{
			"field_name": "name",
			"local_field": "name",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 2
		},
		{
			"field_name": "new_code_date",
			"local_field": "json_data.new_code_date",
			"field_type": "date",
			"field_number": 27
		},
		{
			"field_name": "new_code_id",
			"local_field": "json_data.new_code_id",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 26,
			"constraint": ["index"]
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 21
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 17,
			"constraint": ["unique"]
		},
		{
			"field_name": "sales_account_id",
			"local_field": "account_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 3,
			"constraint": ["index"],
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_table": "account"
				}
			],
			"nullable": true
		},
		{
			"field_name": "target",
			"local_field": "json_data.target",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 7
		},
		{
			"field_name": "target_group",
			"local_field": "json_data.target_group",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 11
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 19,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 25
		},
		{
			"field_name": "vat_code",
			"local_field": "json_data.vat_code",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 10
		},
		{
			"field_name": "vat_percentage",
			"local_field": "vat_percent",
			"field_type": "double",
			"field_number": 4
		}
	]
}
