{
	"name": "table/local/order/payment.json",
	"table_name": "payment",
	"table_prefix": "pay",
	"main_table": "order",
	"record_type": ["accounts_payable", "invoice"],
	"table_name_language": {
		"accounts_payable": "Accounts payable payment",
		"invoice": "Invoice payment"
	},
	"default_field": "table/prf/default_field.json",
	"default_order": [
		{
			"field": "invoice_id",
			"order": ">"
		}
	],
	"save_script": [],
	"calculated_field": [],
	"field": [
		{
			"field_name": "payment_id",
			"field_type": "varchar",
			"field_length": 40,
			"constraint": ["primary key"],
			"not_allowed_value-": [""]
		},
		{
			"field_name": "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": ""
				}
			],
			"not_allowed_value": [""]
		},
		{
			"field_name": "bank_statement",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "currency_id",
			"field_type": "varchar",
			"field_length": 20,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "currency_id",
					"linked_record_type": "",
					"linked_table": "currency",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "days_late",
			"field_type": "integer"
		},
		{
			"field_name": "discount_price",
			"field_type": "double"
		},
		{
			"field_name": "discount_type",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "exchange_rate",
			"field_type": "double"
		},
		{
			"field_name": "info",
			"field_type": "text"
		},
		{
			"field_name": "invoice_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "order_id",
					"linked_record_type": "",
					"linked_table": "order",
					"linking_record_type": ""
				}
			],
			"not_allowed_value": [""]
		},
		{
			"field_name": "local_discount_price",
			"field_type": "double"
		},
		{
			"field_name": "local_paid_price",
			"field_type": "double"
		},
		{
			"field_name": "paid_price",
			"field_type": "double"
		},
		{
			"field_name": "payment_date",
			"field_type": "date",
			"not_allowed_value": [""]
		},
		{
			"field_name": "payment_state",
			"field_type": "varchar",
			"field_length": 20
		},
		{
			"field_name": "penalty_interest_price",
			"field_type": "double"
		},
		{
			"field_name": "value_date",
			"field_type": "date",
			"not_allowed_value": [""]
		},
		{
			"field_name": "voucher_id",
			"field_type": "varchar",
			"field_length": 20,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "voucher_id",
					"linked_record_type": "",
					"linked_table": "bookkeeping_voucher",
					"linking_record_type": ""
				}
			]
		}
	],
	"extra_field": [
		{
			"field_name": "json_data.is_partial_payment",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.partial_payment_sum",
			"field_type": "double"
		},
		{
			"field_name": "json_data.expence_sum",
			"field_type": "double"
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.payment_number",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.voucher_number",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.method_of_payment",
			"field_type": "varchar",
			"field_length": 50
		},
		{
			"field_name": "json_data.saved_currency",
			"field_type": "varchar",
			"field_length": 12
		},
		{
			"field_name": "json_data.row_number",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.handler_id",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.payee_bank_account",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.interest_invoice",
			"field_type": "varchar",
			"field_length": 20
		},
		{
			"field_name": "json_data.progress_payment",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.customer",
			"field_type": "varchar",
			"field_length": 24
		},
		{
			"field_name": "json_data.bank_reference_number",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.is_expence_account",
			"field_type": "boolean"
		}
	]
}
