{
	"field_change": [
		{
			"name": "voucher_state",
			"old_name": [
				"record_state"
			]
		}
	],
	"table_prefix": "bkv",
	"save_script": [],
	"extra_field": [
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.customer_project"
		},
		{
			"type": "double",
			"name": "json_data.debet_price"
		},
		{
			"type": "date",
			"name": "json_data.entry_date"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "double",
			"name": "json_data.kredit_price"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "integer",
			"name": "json_data.month"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.project_id"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "integer",
			"name": "json_data.year"
		}
	],
	"field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "voucher_id",
			"constraint": [
				"primary key",
				"unique"
			]
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "currency_id",
			"foreign_key": {
				"field": "currency_id",
				"link_type": "prevent delete",
				"table": "currency"
			}
		},
		{
			"name": "exchange_rate",
			"type": "double"
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "voucher_type"
		},
		{
			"name": "voucher_state",
			"type": "integer"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "voucher_number"
		},
		{
			"name": "target_date",
			"type": "date"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "bank_statement"
		},
		{
			"name": "reference",
			"type": "text"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"constraint": {
		"save": {
			"allow": [
				{
					"field": "bkv_voucher_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"bkv_voucher_id",
							"<>",
							""
						]
					]
				},
				{
					"field": "bkv_date",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"bkv_date",
							"<>",
							""
						]
					]
				}
			]
		}
	},
	"name": "table/manager/bookkeeping/bookkeeping_voucher.json",
	"table_name": "bookkeeping_voucher"
}