{
	"name": "test/print/print-report-preference.json",
	"main_table": "report",
	"content": {
		"header": [
			[
				{
					"type": "pict",
					"id": "logo",
					"height": 30,
					"left": 0,
					"source": "/Users/pasi/nc/nc-server/preference/report/logo.png",
					"style": {
						"border-width": 3,
						"margin": {
							"bottom": 2,
							"left": 2,
							"right": 2,
							"top": 2
						},
						"object-fit": "contain"
					},
					"top": 0,
					"width": 121
				}
			],
			[
				{
					"type": "text",
					"id": "report_header_text",
					"text": "Lista",
					"height": 30,
					"left": 120.5,
					"top": 0,
					"width": 559
				}
			],
			[
				{
					"type": "text",
					"format": ["Page %d"],
					"id": "pageNumber",
					"height": 30,
					"left": 680,
					"style": {
						"font": "Arial",
						"font-size": 8,
						"margin": {
							"top": 0
						},
						"text-align": "right"
					},
					"subtotal": "",
					"subtotal_operator": "",
					"top": 0,
					"width": 121
				},
				{
					"type": "text",
					"id": "report_header_right_date",
					"formula": ["dt.currentFormat", "Week %W - %d.%m.%Y"],
					"height": 30,
					"left": 680,
					"style": {
						"font": "Arial",
						"font-size": 8,
						"margin": {
							"top": 0
						},
						"text-align": "right"
					},
					"top": 12,
					"width": 121
				},
				{
					"type": "text",
					"id": "report_header_right_time",
					"formula": ["dt.currentFormat", "%H:%M:%S"],
					"height": 30,
					"left": 680,
					"style": {
						"font": "Arial",
						"font-size": 8,
						"margin": {
							"top": 0
						},
						"text-align": "right"
					},
					"top": 24,
					"width": 121
				}
			],
			{
				"type": "line",
				"id": "header_bottom_horizontal_line",
				"height": 0,
				"left": 0,
				"style": {
					"border-color": "black",
					"border-width": 0.25
				},
				"top": 40,
				"width": 801
			}
		],
		"object_order": ["header", "row_header", "row_line", "row_data", "subtotal_data"],
		"page_break": 547,
		"row_data": [
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.order_id",
				"text": "ord.order_id",
				"enterable": 1,
				"field_4d": "po.purchase_order_id",
				"field_type_sql": "varchar",
				"left": 0,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 59.485275288092
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.order_type",
				"text": "ord.order_type",
				"enterable": 1,
				"field_4d": "po.type_",
				"field_type_sql": "varchar",
				"left": 59.485275288092,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 47.177976952625
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.order_state",
				"text": "ord.order_state",
				"enterable": 1,
				"field_4d": "po.state",
				"field_type_sql": "varchar",
				"left": 106.66325224072,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 26.665813060179
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.json_data.project_id",
				"text": "ord.json_data.project_id",
				"enterable": 1,
				"field_4d": "po.project_id",
				"field_type_sql": "varchar",
				"left": 133.3290653009,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 45.12676056338
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.company_id",
				"text": "ord.company_id",
				"enterable": 1,
				"field_4d": "po.supplier_id",
				"field_type_sql": "varchar",
				"left": 178.45582586428,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 107.68886043534
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.json_data.waybill_id",
				"text": "ord.json_data.waybill_id",
				"enterable": 1,
				"field_4d": "po.waybill_id",
				"field_type_sql": "varchar",
				"left": 286.14468629962,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 47.177976952625
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.json_data.first_delivery_date",
				"text": "ord.json_data.first_delivery_date",
				"enterable": 1,
				"field_4d": "po.first_delivery_date",
				"field_type_sql": "date",
				"left": 333.32266325224,
				"style": {
					"format": ["d%d.%m.%Y"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "center"
				},
				"top": 57,
				"width": 72.818181818182
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.order_date",
				"text": "ord.order_date",
				"enterable": 1,
				"field_4d": "po.order_date",
				"field_type_sql": "date",
				"left": 406.14084507042,
				"style": {
					"format": ["d%d.%m.%Y"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "center"
				},
				"top": 57,
				"width": 76.920614596671
			},
			{
				"field_type": "number",
				"type": "text",
				"id": "ord.price_without_vat",
				"text": "ord.price_without_vat",
				"enterable": 1,
				"field_4d": "po.purchase_price",
				"field_type_sql": "double",
				"footerValue": "==Sum",
				"format_number": ["%'.0f"],
				"left": 483.06145966709,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "right"
				},
				"top": 57,
				"width": 91.279129321383
			},
			{
				"field_type": "string",
				"type": "text",
				"id": "ord.currency_id",
				"text": "ord.currency_id",
				"enterable": 1,
				"field_4d": "po.currency_id",
				"field_type_sql": "varchar",
				"left": 574.34058898848,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14
				},
				"top": 57,
				"width": 30.768245838668
			},
			{
				"field_type": "number",
				"type": "text",
				"id": "ord.exchange_rate",
				"text": "ord.exchange_rate",
				"enterable": 1,
				"field_4d": "po.exchange_rate",
				"field_type_sql": "double",
				"footerValue": "==Sum",
				"format_number": ["%'.0f"],
				"left": 605.10883482714,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "right"
				},
				"top": 57,
				"width": 42.049935979513
			},
			{
				"field_type": "number",
				"type": "text",
				"id": "ord.json_data.freight_charges",
				"text": "ord.json_data.freight_charges",
				"enterable": 1,
				"field_4d": "po.freight_charges",
				"field_type_sql": "double",
				"footerValue": "=[7]*[9]===Sum",
				"format_number": ["%'.0f"],
				"left": 647.15877080666,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "right"
				},
				"top": 57,
				"width": 101.53521126761
			},
			{
				"field_type": "number",
				"type": "text",
				"id": "ord.json_data.delivery_to_customer",
				"text": "ord.json_data.delivery_to_customer",
				"enterable": 1,
				"field_4d": "po.delivery_to_customer",
				"field_type_sql": "integer",
				"format_number": ["%'.0f"],
				"left": 748.69398207426,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 14,
					"text-align": "right"
				},
				"top": 57,
				"width": 52.306017925736
			}
		],
		"row_header": [
			{
				"type": "text",
				"id": "ord.order_id_hdr",
				"text": "ID",
				"left": 0,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 59.485275288092
			},
			{
				"type": "text",
				"id": "ord.order_type_hdr",
				"text": "Tyyppi",
				"left": 59.485275288092,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 47.177976952625
			},
			{
				"type": "text",
				"id": "ord.order_state_hdr",
				"text": "Tila",
				"left": 106.66325224072,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 26.665813060179
			},
			{
				"type": "text",
				"id": "ord.json_data.project_id_hdr",
				"text": "Projekti",
				"left": 133.3290653009,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 45.12676056338
			},
			{
				"type": "text",
				"id": "ord.company_id_hdr",
				"text": "Toimittaja",
				"left": 178.45582586428,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 107.68886043534
			},
			{
				"type": "text",
				"id": "ord.json_data.waybill_id_hdr",
				"text": "Rahtikirja",
				"left": 286.14468629962,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 47.177976952625
			},
			{
				"type": "text",
				"id": "ord.json_data.first_delivery_date_hdr",
				"text": "Ens. toim. pv",
				"left": 333.32266325224,
				"style": {
					"format": ["d%d.%m.%Y"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "center"
				},
				"top": 42,
				"width": 72.818181818182
			},
			{
				"type": "text",
				"id": "ord.order_date_hdr",
				"text": "Tilauspäivä",
				"left": 406.14084507042,
				"style": {
					"format": ["d%d.%m.%Y"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "center"
				},
				"top": 42,
				"width": 76.920614596671
			},
			{
				"type": "text",
				"id": "ord.price_without_vat_hdr",
				"text": "Ostohinta yht",
				"left": 483.06145966709,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "right"
				},
				"top": 42,
				"width": 91.279129321383
			},
			{
				"type": "text",
				"id": "ord.currency_id_hdr",
				"text": "Val.",
				"left": 574.34058898848,
				"style": {
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15
				},
				"top": 42,
				"width": 30.768245838668
			},
			{
				"type": "text",
				"id": "ord.exchange_rate_hdr",
				"text": "Kurssi",
				"left": 605.10883482714,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "right"
				},
				"top": 42,
				"width": 42.049935979513
			},
			{
				"type": "text",
				"id": "ord.json_data.freight_charges_hdr",
				"text": "[7]*[9]",
				"left": 647.15877080666,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "right"
				},
				"top": 42,
				"width": 101.53521126761
			},
			{
				"type": "text",
				"id": "ord.json_data.delivery_to_customer_hdr",
				"text": "Asiakkaalle",
				"left": 748.69398207426,
				"style": {
					"format": ["%'.2f"],
					"font": "Arial",
					"font-size": 8,
					"margin": {
						"right": 2,
						"top": 2
					},
					"row-height": 15,
					"text-align": "right"
				},
				"top": 42,
				"width": 52.306017925736
			}
		],
		"row_line": {
			"type": "line",
			"id": "row_line",
			"height": 0,
			"left": 0,
			"style": {
				"border-color": "black",
				"border-width": 0.25
			},
			"top": 55,
			"width": 801
		},
		"subtotal_data": [
			{
				"type": "text",
				"format": ["%'.2f", "calc_price_without_vat", " €"],
				"id": "calc_price_without_vat",
				"height": 16,
				"left": 500,
				"style": {
					"font": "Arial",
					"font-size": 11,
					"text-align": "right"
				},
				"subtotal": "ord.price_without_vat",
				"subtotal_operator": "+",
				"top": 515.26,
				"width": 120,
				"y_offset": 0
			}
		]
	},
	"data": {
		"report": [
			[
				{
					"company_id": "AKU KIINTEIS",
					"currency_id": "EUR",
					"exchange_rate": 1,
					"json_data": {
						"delivery_to_customer": 0,
						"first_delivery_date": "2023-03-19",
						"freight_charges": 0,
						"project_id": "",
						"waybill_id": ""
					},
					"order_date": "2023-03-19",
					"order_id": "110179",
					"order_state": "OT",
					"order_type": "RA",
					"price_without_vat": 187.09
				},
				{
					"company_id": "ERKKI",
					"currency_id": "EUR",
					"exchange_rate": 1,
					"json_data": {
						"delivery_to_customer": 0,
						"first_delivery_date": "2023-02-10",
						"freight_charges": 0,
						"project_id": "M1",
						"waybill_id": ""
					},
					"order_date": "2023-02-10",
					"order_id": "110183",
					"order_state": "TI",
					"order_type": "RA",
					"price_without_vat": 600
				},
				{
					"company_id": "AKATEEMINEN",
					"currency_id": "PLN",
					"exchange_rate": 4.19,
					"json_data": {
						"delivery_to_customer": 0,
						"first_delivery_date": "2023-02-14",
						"freight_charges": 0,
						"project_id": "",
						"waybill_id": ""
					},
					"order_date": "2023-02-14",
					"order_id": "110180",
					"order_state": "TO",
					"order_type": "RA",
					"price_without_vat": 320
				}
			]
		]
	},
	"document_type": "pdf",
	"file_name": "/Users/pasi/nc/nc-server/report/Lista.pdf",
	"language": [],
	"null_allowed": [],
	"paper": {
		"border_bottom": 20,
		"border_left": 20,
		"border_right": 20,
		"border_top": 20,
		"bottom": 575.26,
		"docType": "pdf",
		"dpi": 72,
		"full_height": 595.26,
		"full_width": 841.86,
		"height": 555.26,
		"left": 20,
		"paperType": "A4 landscape",
		"right": 821.86,
		"top": 20,
		"width": 801.86
	},
	"row_table": ["order"],
	"style": {
		"name": "plugin/external/manager/4d/style/default-style.json",
		"bold_text": {
			"font": "Arial",
			"font-size": 8,
			"font-weight": "bold"
		},
		"decimal_separator": ",",
		"default_line": {
			"border-color": "black",
			"border-width": 0.25
		},
		"default-pict": {
			"border-width": 3,
			"margin": {
				"bottom": 2,
				"left": 2,
				"right": 2,
				"top": 2
			},
			"object-fit": "contain"
		},
		"default-rect": {
			"border-color": "black",
			"border-width": 0.5
		},
		"default-text": {
			"font": "Arial",
			"font-size": 8
		},
		"info_header": {
			"font": "Arial",
			"font-size": 12,
			"font-weight": "bold"
		},
		"paper_type": "A4",
		"report_address": {
			"font": "Arial",
			"font-size": 12,
			"font-weight": "bold"
		},
		"report_billing_address": {
			"font": "Arial",
			"font-size": 11,
			"text-align": "right"
		},
		"report_footer": {
			"font": "Arial",
			"font-size": 8
		},
		"report_header_center": {
			"align-self": "center",
			"font": "Arial",
			"font-size": 16,
			"margin": {
				"top": 0
			},
			"text-align": "center"
		},
		"report_subheader_center": {
			"align-self": "center",
			"font": "Arial",
			"font-size": 9,
			"margin": {
				"top": 0
			},
			"text-align": "center"
		},
		"report_header_right": {
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"top": 0
			},
			"text-align": "right"
		},
		"report_info_label": {
			"font": "Arial",
			"font-size": 12,
			"font-weight": "bold"
		},
		"report_order_number": {
			"font": "Arial",
			"font-size": 12,
			"font-weight": "bold"
		},
		"report_subtotal": {
			"font": "Arial",
			"font-size": 11,
			"text-align": "right"
		},
		"report_subtotal_bold": {
			"font": "Arial",
			"font-size": 11,
			"font-weight": "bold",
			"text-align": "right"
		},
		"report_total": {
			"font": "Arial",
			"font-size": 11,
			"text-align": "right"
		},
		"report_total_bold": {
			"font": "Arial",
			"font-size": 11,
			"font-weight": "bold",
			"text-align": "right"
		},
		"row_data": {
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"right": 2,
				"top": 2
			},
			"row-height": 14
		},
		"row_data_date": {
			"format": ["d%d.%m.%Y"],
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"right": 2,
				"top": 2
			},
			"text-align": "center"
		},
		"row_data_number": {
			"format": ["%'.2f"],
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"right": 2,
				"top": 2
			},
			"text-align": "right"
		},
		"row_header": {
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"right": 2,
				"top": 2
			},
			"row-height": 15
		},
		"row_header_right": {
			"font": "Arial",
			"font-size": 8,
			"margin": {
				"right": 4,
				"top": 2
			},
			"row-height": 15,
			"text-align": "right"
		},
		"subtotal_line": {
			"border-color": {
				"a": 0.5,
				"b": 0.5,
				"g": 0.5,
				"r": 0.5
			},
			"border-width": 0.25
		},
		"thousands_separator": " ",
		"total_line": {
			"border-color": "black",
			"border-color_test": {
				"a": 1,
				"b": 0.25,
				"g": 0.25,
				"r": 0.25
			},
			"border-width": 0.25
		}
	},
	"subtotal": {
		"order": [],
		"subtotal": [],
		"total": {
			"calculate": [["ord.price_without_vat", "+"]]
		}
	}
}
