{
	"name": "table/external/4d/order/accounts_payable_payment.json",
	"table_name": "accounts_payable_payment",
	"table_prefix": "appa",
	"main_table": "accounts_payable",
	"record_type": ["accounts_payable"],
	"local_table": "payment",
	"local_record_type": "accounts_payable",
	"table_number": 52,
	"field": [
		{
			"field_name": "account_id",
			"local_field": "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": "accounts_payable_id",
			"local_field": "invoice_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 2,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "code_id",
					"linked_table": "accounts_payable"
				}
			],
			"nullable": true
		},
		{
			"field_name": "bank_statement",
			"local_field": "bank_statement",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 20
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 26
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 27
		},
		{
			"field_name": "currency_id",
			"local_field": "currency_id",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 21,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "currency_id",
					"linked_table": "currency"
				}
			],
			"nullable": true
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 24
		},
		{
			"field_name": "discount_sum",
			"local_field": "discount_price",
			"field_type": "double",
			"field_number": 5
		},
		{
			"field_name": "exchange_rate",
			"local_field": "exchange_rate",
			"field_type": "double",
			"field_number": 18
		},
		{
			"field_name": "expence_sum",
			"local_field": "json_data.expence_sum",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 17,
			"constraint": ["index"]
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 8
		},
		{
			"field_name": "is_expence_account",
			"local_field": "json_data.is_expence_account",
			"field_type": "boolean",
			"field_number": 14
		},
		{
			"field_name": "method_of_payment",
			"local_field": "json_data.method_of_payment",
			"field_type": "varchar",
			"field_length": 25,
			"field_number": 6
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 28
		},
		{
			"field_name": "partial_payment_sum",
			"local_field": "json_data.partial_payment_sum",
			"field_type": "double",
			"field_number": 13
		},
		{
			"field_name": "payee_bank_account",
			"local_field": "json_data.payee_bank_account",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 7
		},
		{
			"field_name": "payment_date",
			"local_field": "payment_date",
			"field_type": "date",
			"field_number": 10,
			"constraint": ["index"]
		},
		{
			"field_name": "payment_sum",
			"local_field": "paid_price",
			"field_type": "double",
			"field_number": 11
		},
		{
			"field_name": "progress_payment",
			"local_field": "json_data.progress_payment",
			"field_type": "integer",
			"field_number": 16
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 25
		},
		{
			"field_name": "record_id",
			"local_field": "payment_id",
			"local_field2": ["record_id"],
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 22,
			"constraint": ["unique"]
		},
		{
			"field_name": "row_number",
			"local_field": "json_data.row_number",
			"field_type": "integer",
			"field_number": 3,
			"constraint": ["index"]
		},
		{
			"field_name": "state",
			"local_field": "payment_state",
			"field_type": "varchar",
			"field_length": 2,
			"field_number": 12,
			"constraint": ["index"]
		},
		{
			"field_name": "sum_amount",
			"local_field": "local_paid_price",
			"field_type": "double",
			"field_number": 19
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 23,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 29
		},
		{
			"field_name": "value_date",
			"local_field": "value_date",
			"field_type": "date",
			"field_number": 4,
			"constraint": ["index"]
		},
		{
			"field_name": "voucher_number",
			"local_field": "json_data.voucher_number",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 1
		}
	]
}
