{
	"name": "form/nc/project-material/column/project-material.json",
	"option": {
		"grid_option": {
			"header_height2": 46
		}
	},
	"column": [
		{
			"field": "ordr.product_id",
			"width": 180,
			"name": "Material"
		},
		{
			"field": "ordr.description",
			"width": 240,
			"name": "Name"
		},
		{
			"field": "ordr.waiting_for_delivery",
			"width": 90,
			"name": "Need",
			"name2": "Project need",
			"format": "%'.2f",
			"cell_class_rules-": {
				"grey": "x == 0",
				"blue": "x > 0"
			},
			"cellEditorParamsXX": {
				"values": "popup.product",
				"popup_field": "value",
				"set_popup_show_field": "sor_explanation"
			}
		},
		{
			"field": "ordr.unit",
			"width": 55,
			"name": "Unit"
		},
		{
			"variable": "ordered_amount",
			"width": 80,
			"name": "Ordered",
			"name2": "Ordered to project",
			"format": "%'.2f"
		},
		{
			"variable": "arrived_amount",
			"width": 80,
			"name": "Arrived",
			"name2": "Arrived to project",
			"format": "%'.2f"
		},
		{
			"variable": "coming_amount",
			"width": 80,
			"name": "Coming",
			"name2": "Coming to project",
			"format": "%'.2f"
		},
		{
			"variable": "need_amount",
			"width": 90,
			"name": "Need",
			"name2": "Calculated order need",
			"format": "%'.2f",
			"cell_class_rules": {
				"black": "x > 0",
				"white": "x <= 0"
			},
			"cell_class_rules_function": {
				"blue": "param.node.data.pr.json_data.stock_balance < param.node.data.need_amount"
			}
		},
		{
			"field": "ordr.order_amount",
			"width": 80,
			"name": "Order",
			"format": "%'.2f",
			"editable": true,
			"cell_class_rules": {
				"blue": "x > 0",
				"white": "x <= 0"
			}
		},
		{
			"field": "pr.minimum_order_amount",
			"width": 100,
			"name": "Min. amount",
			"name2": "Min. order amount",
			"format": "%'.2f"
		},
		{
			"field": "ord.company_id",
			"width": 100,
			"name": "Supplier",
			"cell_class": ["blue"],
			"editable": true
		},
		{
			"field": "pr.json_data.stock_balance",
			"width": 120,
			"name": "In stock",
			"format": "%'.2f"
		},
		{
			"field": "pr.json_data.coming_amount",
			"width": 100,
			"name": "Coming total",
			"format": "%'.2f"
		},
		{
			"field": "pr.json_data.going_amount",
			"width": 110,
			"name": "Going total",
			"format": "%'.2f"
		},
		{
			"field": "pr.json_data.free_amount",
			"width": 110,
			"name": "Free total",
			"format": "%'.2f"
		},
		{
			"variable": "stock_balance",
			"width": 100,
			"name": "Sijoiteltu",
			"name2": "Projektin varastossa",
			"format": "%'.2f",
			"cell_class_rules": {
				"black": "x > 0",
				"white": "x <= 0"
			},
			"hide": true
		},
		{
			"field": "pr.product_id",
			"width": 100,
			"name": "Work",
			"hideZ": true
		},
		{
			"field": "pr.stock_type",
			"width": 90,
			"name": "Varastoidaan",
			"hide": true
		},
		{
			"field": "pr.product_type",
			"width": 100,
			"name": "Tuotteen tyyppi",
			"hide": true
		},
		{
			"field": "pr.default_supplier_id",
			"width": 100,
			"name": "Tuotteen toim.",
			"hide": true
		},
		{
			"field": "pr.name",
			"width": 100,
			"name": "Tuotteen nimi",
			"hide": true
		},
		{
			"field": "pr.stock_unit",
			"width": 100,
			"name": "Varastoyks.",
			"hide": true
		},
		{
			"variable": "ord.record_type",
			"width": 90,
			"name": "Record type",
			"hide": true
		},
		{
			"variable": "ordr.record_type",
			"width": 90,
			"name": "Row record type",
			"hide": true
		},
		{
			"field": "ord.json_data.project_id",
			"width": 90,
			"name": "Projekti",
			"hide": true
		}
	],
	"columns_not_in_use": [
		{
			"variable": "checkmark",
			"width": 20,
			"name": "√"
		},
		{
			"field": "prst_original_amount",
			"width": 90,
			"name": "Edell. tarve",
			"name2": "Projektin vanha määrä",
			"format": "%'.2f"
		},
		{
			"field": "prst_project_id",
			"width": 90,
			"name": "Projekti"
		},
		{
			"field": "prst_stock_id",
			"width": 90,
			"name": "Varasto id",
			"hide": true
		},
		{
			"variable": "row_type",
			"width": 100,
			"name": "Rivin tyyppi",
			"hide": true
		},
		{
			"field": "prst_record.id",
			"width": 90,
			"name": "Record id",
			"hide": true
		},
		{
			"field": "pr.unit_multiplier",
			"width": 100,
			"name": "Var./ suun. kerroin",
			"hideZ": true
		}
	]
}
