{
	"delete_field": [
		"invoice_payment_id"
	],
	"table_prefix": "bkvr",
	"save_script": [],
	"extra_field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.account_number"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.accounts_payable_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.accounts_payable_paym_id"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.cost_center"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.customer_project"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.invoice_payment_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.project_id"
		},
		{
			"type": "integer",
			"name": "json_data.state"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.voucher_row_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.account_id"
		},
		{
			"type": "double",
			"name": "json_data.debet_price"
		},
		{
			"type": "double",
			"name": "json_data.kredit_price"
		}
	],
	"field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "voucher_id",
			"foreign_key": {
				"field": "voucher_id",
				"link_type": "prevent delete",
				"table": "bookkeeping_voucher"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "account_id",
			"foreign_key": {
				"field": "account_id",
				"link_type": "prevent delete",
				"table": "bookkeeping_account"
			}
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "invoice_id",
			"foreign_key": {
				"field": "order_id",
				"link_type": "prevent delete",
				"table": "order"
			}
		},
		{
			"name": "row_number",
			"type": "integer"
		},
		{
			"name": "debet_price",
			"type": "double"
		},
		{
			"name": "kredit_price",
			"type": "double"
		},
		{
			"name": "description",
			"type": "text"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"constraint": {
		"save": {
			"allow": [
				{
					"field": "bkvr_voucher_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"bkvr_voucher_id",
							"<>",
							""
						]
					]
				},
				{
					"field": "bkvr_account_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"bkvr_account_id",
							"<>",
							""
						]
					]
				}
			]
		}
	},
	"name": "structure_ma/bookkeeping_voucher_row.json",
	"table_name": "bookkeeping_voucher_row"
}