{
	"name": "plugin/nc-calc-server/constant.json",
	"local_db_id": "C",
	"calculated_db_id": "c",
	"db_id_show": { "4d": "4D" },
	"load_local_table": ["product", "product-all", "resource-load_group", "production_order", "product_work-actual"],
	"default_phase_color": "black",
	"schema": { "4d": "table/external/4d/prf/constant-4d.json" },
	"virtual_production_order_prefix": "V-",
	"row_number_delimiter": ".",
	"phase_number_delimiter": "#",
	"hide_web_warning": true,
	"load_only_changed": true,
	"production_follows_sales": true,
	"fix_production_order_remaining_amount": true,
	"phase_state_color": {
		"delivery": "red",
		"production": "black",
		"work": "grey",
		"sales": "green",
		"EK": "grey",
		"KU": "dimgrey",
		"AL": "steelblue",
		"PY": "red",
		"LT": "brown"
	},
	"default_round_decimals": 15,
	"need_round_decimals": 5,
	"day_name_short": {
		"1": "ma",
		"2": "ti",
		"3": "ke",
		"4": "to",
		"5": "pe",
		"6": "la",
		"7": "su"
	},
	"resource_state_active": -1,
	"min_resource_name_length": 3,
	"resource_name_separator": " ",
	"resource_name_view": {
		"- All -": "- All -"
	},
	"skip_lower_product_material_state": [-1, 3, 4, 5, 6, 7],
	"product_type_material": [3, 4, "3", "4"],
	"minimum_date": "2012-01-01",
	"maximum_date": "2025-12-31",
	"avg_need_days": 78,
	"production_lot_separator": "/",
	"work_phase_separator": ".",
	"default_delivery_time": "12:00:00",
	"default_avg_need_time": "12:00:00",
	"order_type_estimate": "VM",
	"order_type_order": ["", "TI", "RA", "VM", "TT", "MU", "RE"],
	"order_state_open": ["", "AV", "EV", "VA", "TI", "AL", "OT", "NCO", "CO"],
	"order_state_need": ["EV", "VA", "TI", "AL", "OT", "NCO", "CO"],
	"order_state_need-": ["AV"],
	"order_type_order_purchase-": ["", "TI", "RA", "AH", "TP", "MU", "SI"],
	"order_type_order_purchase": ["", "TI", "RA", "MU"],
	"order_state_open_purchase": ["EV", "VA", "TI", "AL", "OT", "NCO", "CO"],
	"order_state_need_purchase": ["VA", "TI", "AL", "OT", "CO"],
	"order_row_state_delivered": ["OT", "LT"],
	"packing_material_type": [6, "6"],
	"packing_cost_type": [7, "7"],
	"purchase_order_state": {
		"confirmed": "VA",
		"delivered": "TO",
		"partially delivered": "OT",
		"ordered": "TI",
		"aborted": "PE",
		"checked": "TA",
		"open": "AV"
	},
	"unproductive_work_change_state": "work change",
	"product_work_serie": { "person": "person", "machine": "machine" },
	"machine_stoppable_state": { "running": true },
	"unproductive_id": "unproductive",
	"unproductive_default_record": [
		{
			"table": "product_work",
			"field": {
				"serie": "person",
				"person_id": "unproductive",
				"product_id": "unproductive",
				"production_order_id": "unproductive",
				"resource_id": "unproductive",
				"subcontractor_id": "",
				"work_phase_state": "",
				"work_phase_type": "",
				"record_type": ""
			},
			"id_field": "product_id"
		},
		{
			"table": "product",
			"id_field": "product_id",
			"field": {
				"product_id": "unproductive",
				"work_number_id": "unproductive",
				"product_state": "0",
				"product_type": "0",
				"default_supplier_id": "",
				"purchase_order_code_id": "",
				"sales_order_code_id": "",
				"name": "Unproductive",
				"info": "Automatically generated product, this is needed for work center.",
				"record_type": ""
			}
		},
		{
			"table": "resource",
			"id_field": "resource_id",
			"field": {
				"resource_id": "unproductive",
				"cell_resource_id": "",
				"resource_name": "Unproductive",
				"default_foreman_id": "",
				"subcontractor_id": "",
				"info": "Automatically generated resource, this is needed for work center.",
				"record_type": ""
			}
		},
		{
			"table": "production_order",
			"id_field": "production_order_id",
			"field": {
				"production_order_id": "unproductive",
				"company_id": "",
				"product_id": "unproductive",
				"row_number": 1,
				"sales_order_id": "",
				"production_order_state": "confirmed",
				"info": "Automatically generated production order, this is needed for work center.",
				"record_type": ""
			}
		}
	],
	"production_order_state": {
		"": "",
		"draft": "draft",
		"confirmed": "confirmed",
		"progress": "progress",
		"done": "done",
		"cancelled": "cancelled",
		"halted": "halted"
	},
	"production_order_state_view": {
		"": "",
		"draft": "draft",
		"confirmed": "confirmed",
		"progress": "progress",
		"done": "done",
		"cancelled": "cancelled",
		"halted": "halted"
	},
	"production_order_state_can_start": { "confirmed": true, "progress": true },
	"production_order_state_not_started": ["", "draft", "confirmed"],
	"production_order_state_closed": ["done", "cancelled"],
	"work_center_actual_previous_days": 5,
	"work_center_phase_not_open_state": ["done", "done2", "cancelled"],
	"phase_open_state": ["", "EK", "KU", "AL", "TA", "PY", "confirmed"],
	"phase_finished_state": ["LT", "PE"],
	"phase_started_state": ["AL"],
	"phase_stopped_started_state": ["AL", "PY"],
	"phase_state_view": {
		"": "",
		"edit": "edit",
		"material": "material",
		"setup": "setup",
		"running": "running",
		"stopping": "stopping",
		"stopped": "stopped",
		"done": "done",
		"cancelled": "cancelled",
		"halted": "halted"
	},
	"active_state": {
		"empty": "",
		"on_break": "on break",
		"break_over": "break over"
	},
	"active_state_allowed_value": ["", "on break", "break over"],
	"phase_state": {
		"empty": "",
		"edit": "edit",
		"close": "close",
		"stop": "stop",
		"end": "end",
		"material": "material",
		"setup": "setup",
		"working": "working",
		"running": "running",
		"stopping": "stopping",
		"stopped": "stopped",
		"done": "done",
		"cancelled": "cancelled",
		"off": "off",
		"error": "error",
		"halted": "halted"
	},
	"delivery_state": {
		"partial": "OT",
		"delivered": "LT",
		"open": ""
	},
	"locking_state": {
		"lock": 1,
		"unlock": -1
	},
	"area_multiplier": {
		"m2": {
			"multiplier": 0.001,
			"dimension_unit": "mm"
		},
		"mm2": {
			"multiplier": 1,
			"dimension_unit": "mm"
		},
		"dm2": {
			"multiplier": 0.01,
			"dimension_unit": "mm"
		},
		"cm2": {
			"multiplier": 0.1,
			"dimension_unit": "mm"
		}
	},
	"sales_order_state": {
		"confirmed": "VA",
		"done": "LO",
		"aborted": "PE",
		"not_confirmed": "EV",
		"open": "AV"
	},
	"invoice_type": {
		"normal": "NO",
		"financing": "RA",
		"interest_invoice": "KO",
		"gift": "LA",
		"credit_note": "HY"
	},
	"pallet_type": "LAVA",
	"purchase_order_type": {
		"material": "RA",
		"subcontract": "AH"
	},
	"work_order_open_state": ["EK", "KU", "AL", "TA", "PY"],
	"work_phase_serie": ["person", "machine", "timecard"],
	"phase_type": {
		"setup": "-2",
		"done": "LO",
		"work": "AL",
		"unproductive": "ET",
		"lock": "LU",
		"track_time": "OA"
	},
	"stock_event_type": {
		"correct": "KO",
		"add": "LI",
		"remove": "PO",
		"inventory": { "IN": true },
		"virtual": "VI",
		"value_add": { "LI": true, "VI": true },
		"value_show": { "LI": true, "VI": true, "IN": true, "KO": true }
	},
	"product_type": {
		"set": 1,
		"work_type": [0, 1, 2, "0", "1", "2"],
		"packing_cost": 7,
		"packing_material": 6,
		"work": 0
	},
	"work_extra_phase": [
		{
			"work_hour": 0.1,
			"phase_number": 10,
			"load_group_id": "PAKKAUS",
			"setup_hour": 0
		}
	],
	"table_code": {
		"undefined_person_id": "X",
		"calculate_setup_hour": false,
		"social_cost_multiplier": 1.7,
		"default_currency": "EUR",
		"unit_price_decimal": 7,
		"discount_percent_decimal": 7,
		"delivery_address_type": "Toimitusosoite",
		"invoicing_address_type": "Laskutusosoite",
		"order_address_type": "Tilausosoite",
		"invoice_penalty_interest_days_in_year": 365,
		"order": {
			"financing_invoice_send_type": "RAY",
			"electronic_invoice_send_type": "FV",
			"financing_invoice_type": "RA",
			"default_note": "Tavarat ovat toimittajan omaisuutta kunnes lasku on kokonaan maksettu.",
			"default_financing_note": "",
			"financing_contract_number": "",
			"financing_application_constant": "001",
			"penalty_interest_invoice_note": "Viivästyneistä suorituksistanne on kertynyt korkoa seuraavan laskelman mukaisesti."
		},
		"order_row": {
			"set_confirmed_delivery_date": false,
			"product_quality_to_serial_number": false,
			"discount_customer": "",
			"discount_customer_info-": "(0 in 4d), delivery' (1 in 4d), 'invoicing' (2 in 4d)",
			"allow_partial_delivery_change": false,
			"allow_partial_zero_delivery": false,
			"discount_to_unit_price": false
		}
	}
}
