{
	"save_script": [],
	"field": [
		{
			"type": "varchar",
			"length": 20,
			"name": "waybill_id",
			"constraint": [
				"primary key",
				"unique"
			]
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "receiver_id",
			"foreign_key": {
				"field": "company_id",
				"link_type": "prevent delete",
				"table": "company"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "currency_id",
			"foreign_key": {
				"field": "currency_id",
				"link_type": "prevent delete",
				"table": "currency"
			}
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "waybill_number"
		},
		{
			"name": "date",
			"type": "date"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "waybill_type"
		},
		{
			"name": "waybill_state",
			"type": "integer"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"table_prefix": "wbl",
	"row_table": [
		{
			"row_table_name": "waybill_row",
			"save_field": "wbl_json_data",
			"field": [
				{
					"type": "varchar",
					"length": 80,
					"name": "mark"
				},
				{
					"name": "number_of_pallets",
					"type": "integer"
				},
				{
					"type": "varchar",
					"length": 80,
					"name": "type_of_pallet"
				},
				{
					"name": "content",
					"type": "text"
				},
				{
					"type": "varchar",
					"length": 80,
					"name": "pallet_code"
				},
				{
					"name": "weight",
					"type": "double"
				},
				{
					"name": "volume",
					"type": "double"
				},
				{
					"name": "info",
					"type": "text"
				}
			]
		}
	],
	"extra_field": [
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.cash_on_deliv_account"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.cash_on_deliv_reference"
		},
		{
			"type": "double",
			"name": "json_data.cash_on_delivery"
		},
		{
			"type": "varchar",
			"length": 510,
			"name": "json_data.customer_order_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.customer_project"
		},
		{
			"type": "text",
			"name": "json_data.delivery_address"
		},
		{
			"type": "double",
			"name": "json_data.extra_cost"
		},
		{
			"type": "text",
			"name": "json_data.extra_instruction"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "text",
			"name": "json_data.freight_charger_payer"
		},
		{
			"type": "double",
			"name": "json_data.freight_cost"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.freight_customer_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.freight_deal_number"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "integer",
			"name": "json_data.number_of_pallets"
		},
		{
			"type": "double",
			"name": "json_data.pallet_length"
		},
		{
			"type": "text",
			"name": "json_data.place_of_departure"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.project_id"
		},
		{
			"type": "text",
			"name": "json_data.receiver_address"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.receiver_customer_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.receiver_deal_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.receiver_phone"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.receiver_reference"
		},
		{
			"type": "text",
			"name": "json_data.reservation"
		},
		{
			"type": "text",
			"name": "json_data.sender_address"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.sender_customer_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.sender_deal_number"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.sender_reference"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.sender_trade_number"
		},
		{
			"type": "text",
			"name": "json_data.term_of_delivery"
		},
		{
			"type": "double",
			"name": "json_data.total_price"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "text",
			"name": "json_data.transport_company"
		},
		{
			"type": "text",
			"name": "json_data.transport_notes"
		},
		{
			"type": "double",
			"name": "json_data.vat"
		},
		{
			"type": "double",
			"name": "json_data.vat_percent"
		},
		{
			"type": "double",
			"name": "json_data.volume"
		},
		{
			"type": "double",
			"name": "json_data.weight"
		}
	],
	"calculated_field": [],
	"field_change": [
		{
			"name": "waybill_state",
			"old_name": [
				"record_state"
			]
		},
		{
			"name": "waybill_type",
			"old_name": [
				"type"
			]
		}
	],
	"name": "table/manager/order/waybill.json",
	"table_name": "waybill"
}