{
	"name": "form/nc/erp-sync/lantek/column/production_order.json",
	"option": {
		"grid_option": {
			"cell_class_rules": {
				"nc-grid-cell-changed": "data.link_rec && colDef.change_compare !== false && recDataDifferent(data.link_rec, colDef, x)"
			},
			"row_class_rules": {
				"brown-": "!data.work_phase || typeof data.drawing_path !== 'string' && !data.error",
				"brown": "!data.work_phase && !data.error",
				"red": "data.error",
				"darkred": "data.error && data.error.search('match') > -1",
				"nc-grid-row-changed": "data.change_status == 'changed'",
				"nc-grid-row-deleted": "data.change_status == 'deleted'",
				"nc-grid-row-equal": "data.change_status == 'equal'",
				"nc-grid-row-new": "data.change_status == 'new'"
			}
		}
	},
	"column": [
		{
			"change_compare": false,
			"lantek_field": "PrdRef",
			"link_field": "pro.production_order_id",
			"name": "Row",
			"record_type": "",
			"variable": "idx"
		},
		{
			"export": false,
			"name": "Status",
			"variable": "change_status",
			"editable": false,
			"width": 65
		},
		{
			"export": false,
			"name": "Change field",
			"variable": "change_field",
			"editable": false,
			"width": 110
		},
		{
			"change_compare": false,
			"field": "pro.production_order_state",
			"name": "State",
			"width": 80,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"lantek_field": "NstRef",
			"variable": "drawing_number",
			"name": "Drawing / Nesting",
			"width": 150,
			"organization_id": { "lantek": { "field": "pro.drawing_number" } }
		},
		{
			"lantek_field": "PrdRef",
			"field": "pro.production_order_id",
			"name": "Prod. ord.",
			"width": 110
		},
		{
			"field": "pr.product_id",
			"name": "Product id",
			"width": 130,
			"organization_id": { "lantek": { "field": "pro.product_id" } }
		},
		{
			"lantek_field": "MatRef",
			"variable": "material",
			"name": "Material",
			"width": 160,
			"organization_id": { "lantek": { "field": "pro.json_data.material_id" } }
		},
		{
			"lantek_field": "PrdName",
			"field": "pr.name",
			"name": "Product name",
			"width": 250,
			"organization_id": { "lantek": { "field": "pro.json_data.product_name" } }
		},
		{
			"lantek_field": "WorkCenter",
			"variable": "work_phase",
			"name": "Phase",
			"width": 60,
			"organization_id": { "lantek": { "field": "pro.json_data.work_phase" } }
		},
		{
			"change_compare": false,
			"variable": "start_date",
			"name": "Need date",
			"width": 90,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "error",
			"name": "Error",
			"width": 180,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"lantek_field": "Thickness",
			"variable": "thickness",
			"name": "Thickness",
			"width": 85,
			"organization_id": { "lantek": { "field": "pro.json_data.thickness" } }
		},
		{
			"lantek_field": "Udata1",
			"variable": "work_phase_list",
			"name": "Work phases",
			"width": 300,
			"organization_id": { "lantek": { "field": "pro.json_data.work_phase_list" } }
		},
		{
			"lantek_field": "Quantity",
			"field": "pro.amount_to_produce",
			"name": "To produce",
			"width": 70
		},
		{
			"lantek_field": "DeliveryDate",
			"field": "pro.json_data.critical_start_date",
			"name": "Critical date",
			"width": 100
		},
		{
			"lantek_field": "Customer",
			"field": "pro.company_id",
			"name": "Customer",
			"width": 95
		},
		{
			"lantek_field": "SaleOrder",
			"field": "pro.sales_order_id",
			"name": "Sales order",
			"width": 95
		},
		{
			"field": "pro.sales_order_row",
			"name": "Row",
			"width": 60,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"field": "co.name",
			"name": "Name",
			"width": 120,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "quality",
			"name": "Quality",
			"width": 95,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"field": "pro.json_data.delivery_date",
			"name": "Delivery",
			"width": 85,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "subgroup",
			"name": "Subgroup",
			"width": 150,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "drawing_path",
			"name": "Drawing",
			"width": 450,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "warning",
			"name": "Warning",
			"width": 90,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "width",
			"name": "Width",
			"width": 95,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"variable": "length",
			"name": "Length",
			"width": 95,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"change_compare": false,
			"field": "pro.modify_user",
			"name": "Modifier",
			"width": 90,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"change_compare": false,
			"field": "pro.record_id",
			"name": "Record id",
			"width": 350,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"change_compare": false,
			"field": "pr.record_id-work",
			"name": "Work id",
			"width": 350,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"change_compare": false,
			"field": "pr.record_id",
			"name": "Product id",
			"width": 350,
			"organization_id": { "lantek": { "load": false } }
		}
	],
	"column-": [
		{
			"change_compare": false,
			"field": "pro.modify_time",
			"name": "Modified",
			"width": 150,
			"organization_id": { "lantek": { "load": false } }
		},
		{
			"change_compare": false,
			"field": "pro.json_data.production_order_number",
			"name": "Work order",
			"width": 50
		}
	]
}
