{
	"name": "table/local/product/product_material.json",
	"table_name": "ComponentsTransfer",
	"table_prefix": "prma",
	"main_table-": "product",
	"record_type": ["estimated"],
	"local_table": "product_material",
	"local_record_type": "estimated",
	"example_data": {
		"Id": 487,
		"Number": "101392",
		"Name": "S2C-H6R APUKOSKETIN",
		"SupplierMaterialCode": "",
		"Quantity": 2.0,
		"Unit": "kpl",
		"UnitPrice": 7.84,
		"WorkOrder": "00144/01",
		"Created": "2019-12-11 13:59:25.4700000 +00:00",
		"CreatedBy": "AJ DATA IMPORT FROM ERP",
		"ErpStatus": 0,
		"MesStatus": 0,
		"State": "",
		"RowNumber": 1
	},
	"default_order": [],
	"save_script": [],
	"calculated_field": {},
	"field": [
		{
			"field_name": "Id",
			"field_type": "bigint",
			"writeable": false,
			"local_field": "json_data.id"
		},
		{
			"field_name": "Number",
			"local_field": "material_id",
			"field_type": "varchar",
			"not_allowed_value": [""]
		},
		{
			"field_name": "Name",
			"field_type": "varchar",
			"local_field": "json_data.product_name"
		},
		{
			"field_name": "SupplierMaterialCode",
			"field_type": "varchar",
			"local_field": "json_data.supplier_product_code"
		},
		{
			"field_name": "Quantity",
			"local_field": "amount",
			"field_type": "double"
		},
		{
			"field_name": "Unit",
			"local_field": "unit",
			"field_type": "varchar"
		},
		{
			"field_name": "WorkOrder",
			"field_type": "varchar",
			"field_length": 450,
			"local_field": "json_data.production_order_number",
			"foreign_key": [
				{
					"link_type": "do nothing",
					"linked_table": "WorkOrdersTransfer",
					"linked_record_type": "",
					"linked_field": "Number"
				}
			]
		},
		{
			"field_name": "RowNumber",
			"field_type": "integer",
			"local_field": "row_number"
		},
		{
			"field_name": "Created",
			"field_type": "timestamp",
			"local_field": "create_time"
		},
		{
			"field_name": "CreatedBy",
			"field_type": "varchar",
			"local_field": "json_data.create_user"
		},
		{
			"field_name": "UnitPrice",
			"local_field": "cost_price",
			"field_type": "double"
		},
		{
			"field_name": "ErpStatus",
			"field_type": "integer",
			"local_field": "json_data.erp_status"
		},
		{
			"field_name": "MesStatus",
			"field_type": "integer",
			"local_field": "json_data.mes_status"
		},
		{
			"field_name": "State",
			"field_type": "varchar",
			"local_field": "json_data.state"
		}
	],
	"field-": [
		{
			"field_name": "description",
			"field_type": "varchar"
		},
		{
			"field_name": "info",
			"field_type": "varchar"
		},
		{
			"field_name": "product_material_state",
			"field_type": "integer"
		},
		{
			"field_name": "profit_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "row_number",
			"field_type": "integer"
		},
		{
			"field_name": "sales_price",
			"field_type": "double"
		},
		{
			"field_name": "stock_event_id",
			"field_type": "varchar",
			"length": 40
		},
		{
			"field_name": "work_phase_number",
			"field_type": "integer"
		}
	]
}
