{
	"name": "table/local/bookkeeping/bookkeeping_account.json",
	"table_name": "bookkeeping_account",
	"table_prefix": "bka",
	"record_type": [""],
	"table_name_language": {
		"": "Account"
	},
	"default_field": "table/prf/default_field.json",
	"default_order": [
		{
			"field": "account_id",
			"order": ">"
		}
	],
	"save_script": [],
	"calculated_field": [],
	"field": [
		{
			"field_name": "account_id",
			"field_type": "varchar",
			"field_length": 20,
			"constraint": ["primary key"],
			"not_allowed_value": [""]
		},
		{
			"field_name": "account_type",
			"field_type": "text"
		},
		{
			"field_name": "contra_account_id",
			"field_type": "varchar",
			"field_length": 20,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_record_type": "",
					"linked_table": "bookkeeping_account",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "info",
			"field_type": "text"
		},
		{
			"field_name": "name",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "vat_account_id",
			"field_type": "varchar",
			"field_length": 20,
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_record_type": "",
					"linked_table": "bookkeeping_account",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "vat_percent",
			"field_type": "double"
		}
	],
	"extra_field": [
		{
			"field_name": "json_data.account_number",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "json_data.default_kredit",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.send_accounts",
			"field_type": "text"
		},
		{
			"field_name": "json_data.year",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.default_debet",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.receive_accounts",
			"field_type": "text"
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		}
	],
	"field_change": [
		{
			"name": "account_type",
			"info": "trigger field type change",
			"old_name": ["account_type"]
		},
		{
			"name": "name",
			"info": "trigger field length change",
			"old_name": ["name"]
		}
	]
}
