{
	"name": "table/external/4d/order/accounts_payable.json",
	"table_name": "accounts_payable",
	"table_prefix": "ap",
	"record_type": ["accounts_payable"],
	"local_table": "order",
	"local_record_type": "accounts_payable",
	"table_number": 28,
	"field": [
		{
			"field_name": "accounts_ledger",
			"local_field": "json_data.accounts_ledger",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 26,
			"constraint": ["index"]
		},
		{
			"field_name": "approval_state",
			"local_field": "json_data.approval_state",
			"field_type": "varchar",
			"field_length": 2,
			"field_number": 23,
			"constraint": ["index"]
		},
		{
			"field_name": "cash_discount_due_date",
			"local_field": "json_data.cash_discount_due_date",
			"field_type": "date",
			"field_number": 11,
			"constraint": ["index"]
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 37
		},
		{
			"field_name": "code_id",
			"local_field": "order_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 8,
			"constraint": ["unique"]
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 38
		},
		{
			"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": 35
		},
		{
			"field_name": "debet_total",
			"local_field": "json_data.debet_total",
			"field_type": "double",
			"field_number": 14
		},
		{
			"field_name": "destination_date",
			"local_field": "json_data.destination_date",
			"field_type": "date",
			"field_number": 28,
			"constraint": ["index"]
		},
		{
			"field_name": "due_date",
			"local_field": "due_date",
			"field_type": "date",
			"field_number": 3,
			"constraint": ["index"]
		},
		{
			"field_name": "exchange_rate",
			"local_field": "exchange_rate",
			"field_type": "double",
			"field_number": 22
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 31,
			"constraint": ["index"]
		},
		{
			"field_name": "handler",
			"local_field": "person_id",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 10
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 7
		},
		{
			"field_name": "invoice_date",
			"local_field": "order_date",
			"field_type": "date",
			"field_number": 2,
			"constraint": ["index"]
		},
		{
			"field_name": "invoice_number",
			"local_field": "company_reference_number",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 5,
			"constraint": ["index"]
		},
		{
			"field_name": "kredit_total",
			"local_field": "json_data.kredit_total",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "method_of_payment",
			"local_field": "json_data.method_of_payment",
			"field_type": "varchar",
			"field_length": 25,
			"field_number": 4
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 39
		},
		{
			"field_name": "no_bank_program",
			"local_field": "json_data.no_bank_program",
			"field_type": "boolean",
			"field_number": 27,
			"constraint": ["index"]
		},
		{
			"field_name": "note",
			"local_field": "note",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 18
		},
		{
			"field_name": "note_type",
			"local_field": "json_data.note_type",
			"field_type": "varchar",
			"field_length": 15,
			"field_number": 19
		},
		{
			"field_name": "payable_amount",
			"local_field": "json_data.payable_amount",
			"field_type": "double",
			"field_number": 9
		},
		{
			"field_name": "payment_date",
			"local_field": "json_data.payment_date",
			"field_type": "date",
			"field_number": 12,
			"constraint": ["index"]
		},
		{
			"field_name": "priority",
			"local_field": "json_data.priority",
			"field_type": "integer",
			"field_number": 33
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 36
		},
		{
			"field_name": "purchase_debt_account_id",
			"local_field": "json_data.purchase_debt_account_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 17,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "account_id",
					"linked_table": "account"
				}
			],
			"nullable": true
		},
		{
			"field_name": "purchase_order_id",
			"local_field": "json_data.purchase_order_id",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 1
		},
		{
			"field_name": "receiver_bank_account",
			"local_field": "json_data.bank_account",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 25
		},
		{
			"field_name": "receiver_id",
			"local_field": "invoicing_company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 6,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "supplier_id",
					"linked_table": "supplier"
				}
			],
			"nullable": true
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 32,
			"constraint": ["unique"]
		},
		{
			"field_name": "reference_number",
			"local_field": "json_data.bank_reference_number",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 16
		},
		{
			"field_name": "sum_of_payable",
			"local_field": "price_with_vat",
			"field_type": "double",
			"field_number": 30
		},
		{
			"field_name": "sum_of_payment",
			"local_field": "json_data.paid_price",
			"field_type": "double",
			"field_number": 29
		},
		{
			"field_name": "supplier_id",
			"local_field": "company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 13,
			"constraint": ["index"],
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "supplier_id",
					"linked_table": "supplier"
				}
			],
			"nullable": true
		},
		{
			"field_name": "swift_code",
			"local_field": "json_data.intermediator",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 41
		},
		{
			"field_name": "terms_of_payment_id",
			"local_field": "terms_of_payment_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "terms_of_payment_id",
					"linked_table": "terms_of_payment"
				}
			],
			"nullable": true
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 34,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 40
		},
		{
			"field_name": "voucher_number",
			"local_field": "voucher_id",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 20,
			"constraint": ["index"]
		}
	]
}
