diff --git a/docker-compose/postgresql/seed.backup b/docker-compose/postgresql/seed.backup index 263b4f6..0e7c8c8 100644 Binary files a/docker-compose/postgresql/seed.backup and b/docker-compose/postgresql/seed.backup differ diff --git a/docs/adempiere_report_engine.json b/docs/adempiere_report_engine.json index 2c96318..acc0e09 100644 --- a/docs/adempiere_report_engine.json +++ b/docs/adempiere_report_engine.json @@ -43,6 +43,109 @@ }, "response": [] }, + { + "name": "Invoice Detail & Margin", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{token}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{host}}/report-engine/views/1000003", + "host": [ + "{{host}}" + ], + "path": [ + "report-engine", + "views", + "1000003" + ], + "query": [ + { + "key": "filters", + "value": "[{\"name\": \"IsSOTrx\", \"operator\": \"equal\", \"values\": \"Y\"}, {\"name\": \"DocStatus\", \"operator\": \"equal\", \"values\": \"CO\"}]", + "description": "[{\"name\": \"IsSOTrx\", \"operator\": \"equal\", \"values\": \"Y\"}, {\"name\": \"DocStatus\", \"operator\": \"equal\", \"values\": \"CO\"}, {\"name\": \"SalesRep_ID\", \"operator\": \"equal\", \"values\": 1000263}]", + "disabled": true + } + ] + } + }, + "response": [ + { + "name": "Ok", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{host}}/report-engine/views/1000003", + "host": [ + "{{host}}" + ], + "path": [ + "report-engine", + "views", + "1000003" + ], + "query": [ + { + "key": "filters", + "value": "[{\"name\": \"IsSOTrx\", \"operator\": \"equal\", \"values\": \"Y\"}, {\"name\": \"DocStatus\", \"operator\": \"equal\", \"values\": \"CO\"}]", + "description": "[{\"name\": \"IsSOTrx\", \"operator\": \"equal\", \"values\": \"Y\"}, {\"name\": \"DocStatus\", \"operator\": \"equal\", \"values\": \"CO\"}, {\"name\": \"SalesRep_ID\", \"operator\": \"equal\", \"values\": 1000263}]", + "disabled": true + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "content-type", + "value": "application/json" + }, + { + "key": "grpc-encoding", + "value": "identity" + }, + { + "key": "grpc-accept-encoding", + "value": "gzip" + }, + { + "key": "x-envoy-upstream-service-time", + "value": "2161" + }, + { + "key": "grpc-status", + "value": "0" + }, + { + "key": "content-length", + "value": "37929" + }, + { + "key": "date", + "value": "Thu, 18 Jul 2024 22:44:51 GMT" + }, + { + "key": "server", + "value": "envoy" + } + ], + "cookie": [], + "body": "{\n \"id\": 1000003,\n \"name\": \"Invoice Detail & Margin\",\n \"description\": \"\",\n \"print_format_id\": 1000003,\n \"report_view_id\": 0,\n \"record_count\": \"25\",\n \"columns\": [\n {\n \"code\": \"1000181\",\n \"title\": \"Business Partner \",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 30\n },\n {\n \"code\": \"1000177\",\n \"title\": \"Invoice\",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 30\n },\n {\n \"code\": \"1000193\",\n \"title\": \"Doc Type\",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 19\n },\n {\n \"code\": \"1000179\",\n \"title\": \"Product\",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 30\n },\n {\n \"code\": \"1000202\",\n \"title\": \"Margin %\",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 22\n },\n {\n \"code\": \"1000197\",\n \"title\": \"Line Amt\",\n \"color\": \"\",\n \"style\": \"\",\n \"display_type\": 12\n }\n ],\n \"rows\": [\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 117,\n \"display_value\": \"C&W Construction\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"152.00\"\n },\n \"display_value\": \"152.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"152.00\",\n \"display_value\": \"152.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"50.6667\",\n \"display_value\": \"50.6667\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"3\",\n \"display_value\": \"3.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"42.75\",\n \"display_value\": \"42.75\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"61.75\",\n \"display_value\": \"61.75\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"195.5417\",\n \"display_value\": \"195.5417\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"13.9836\",\n \"display_value\": \"13.9836\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 103,\n \"display_value\": \"200002 - 2021-07-01 00:00:00 - 161.12\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 117,\n \"display_value\": \"C&W Construction\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"152.00\"\n },\n \"display_value\": \"152.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"152.00\",\n \"display_value\": \"152.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"50.6667\",\n \"display_value\": \"50.6667\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"3\",\n \"display_value\": \"3.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"42.75\",\n \"display_value\": \"42.75\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"61.75\",\n \"display_value\": \"61.75\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"195.5417\",\n \"display_value\": \"195.5417\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"13.9836\",\n \"display_value\": \"13.9836\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 103,\n \"display_value\": \"200002 - 2021-07-01 00:00:00 - 161.12\"\n },\n \"1000179\": {\n \"value\": 126,\n \"display_value\": \"Planting - Planting Service\"\n },\n \"1000181\": {\n \"value\": 117,\n \"display_value\": \"C&W Construction\"\n },\n \"1000193\": {\n \"value\": 117,\n \"display_value\": \"AR Invoice Indirect\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"42.75\"\n },\n \"display_value\": \"42.75\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 103,\n \"display_value\": \"200002 - 2021-07-01 00:00:00 - 161.12\"\n },\n \"1000179\": {\n \"value\": 123,\n \"display_value\": \"Oak - Oak Tree\"\n },\n \"1000181\": {\n \"value\": 117,\n \"display_value\": \"C&W Construction\"\n },\n \"1000193\": {\n \"value\": 117,\n \"display_value\": \"AR Invoice Indirect\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"61.75\"\n },\n \"display_value\": \"61.75\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 103,\n \"display_value\": \"200002 - 2021-07-01 00:00:00 - 161.12\"\n },\n \"1000179\": {\n \"value\": 130,\n \"display_value\": \"Plum Tree - Plum Tree\"\n },\n \"1000181\": {\n \"value\": 117,\n \"display_value\": \"C&W Construction\"\n },\n \"1000193\": {\n \"value\": 117,\n \"display_value\": \"AR Invoice Indirect\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\"\n },\n \"display_value\": \"47.50\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 113,\n \"display_value\": \"GardenAdmin BP\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\"\n },\n \"display_value\": \"1,000.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.0000\",\n \"display_value\": \"1,000.00\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 50053,\n \"display_value\": \"1000 - 2024-08-10 00:00:00 - 0\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 113,\n \"display_value\": \"GardenAdmin BP\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\"\n },\n \"display_value\": \"1,000.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.0000\",\n \"display_value\": \"1,000.00\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\",\n \"display_value\": \"1,000.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 50053,\n \"display_value\": \"1000 - 2024-08-10 00:00:00 - 0\"\n },\n \"1000179\": {\n \"value\": 0,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 113,\n \"display_value\": \"GardenAdmin BP\"\n },\n \"1000193\": {\n \"value\": 116,\n \"display_value\": \"AR Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"1000.00\"\n },\n \"display_value\": \"1,000.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"0\"\n },\n \"display_value\": \"0.0\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 118,\n \"display_value\": \"Joe Block\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\"\n },\n \"display_value\": \"215.90\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.9000\",\n \"display_value\": \"215.90\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 109,\n \"display_value\": \"100000 - 2022-01-25 00:00:00 - 228.85\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 118,\n \"display_value\": \"Joe Block\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\"\n },\n \"display_value\": \"215.90\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.9000\",\n \"display_value\": \"215.90\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\",\n \"display_value\": \"215.90\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 109,\n \"display_value\": \"100000 - 2022-01-25 00:00:00 - 228.85\"\n },\n \"1000179\": {\n \"value\": 128,\n \"display_value\": \"Azalea Bush - Azalea Bush\"\n },\n \"1000181\": {\n \"value\": 118,\n \"display_value\": \"Joe Block\"\n },\n \"1000193\": {\n \"value\": 116,\n \"display_value\": \"AR Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"215.90\"\n },\n \"display_value\": \"215.90\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.52\"\n },\n \"display_value\": \"5.52\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"2731.50\"\n },\n \"display_value\": \"2,731.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"2731.50\",\n \"display_value\": \"2,731.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"273.1500\",\n \"display_value\": \"273.15\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"10\",\n \"display_value\": \"10.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"76.50\",\n \"display_value\": \"76.50\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"720.00\",\n \"display_value\": \"720.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"424983.1500\",\n \"display_value\": \"424,983.15\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"651.9073\",\n \"display_value\": \"651.9073\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"2731.50\"\n },\n \"display_value\": \"2,731.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"2731.50\",\n \"display_value\": \"2,731.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"273.1500\",\n \"display_value\": \"273.15\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"10\",\n \"display_value\": \"10.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"76.50\",\n \"display_value\": \"76.50\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"720.00\",\n \"display_value\": \"720.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"424983.1500\",\n \"display_value\": \"424,983.15\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"651.9073\",\n \"display_value\": \"651.9073\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 139,\n \"display_value\": \"Rake-Bamboo - Rake Bamboo\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"114.75\"\n },\n \"display_value\": \"114.75\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 137,\n \"display_value\": \"Mulch - Mulch 10#\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"135.00\"\n },\n \"display_value\": \"135.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.88\"\n },\n \"display_value\": \"5.88\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 138,\n \"display_value\": \"Hoe - Hoe 4 ft\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"255.00\"\n },\n \"display_value\": \"255.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 125,\n \"display_value\": \"Grass - Grass Seed Container\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"576.00\"\n },\n \"display_value\": \"576.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"20.00\"\n },\n \"display_value\": \"20.0\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 136,\n \"display_value\": \"Fertilizer#50 - Fertilizer #50\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"720.00\"\n },\n \"display_value\": \"720.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.88\"\n },\n \"display_value\": \"5.88\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 141,\n \"display_value\": \"Weeder - Weeder\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"76.50\"\n },\n \"display_value\": \"76.50\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 140,\n \"display_value\": \"Rake-Metal - Rake Metal\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"204.00\"\n },\n \"display_value\": \"204.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 143,\n \"display_value\": \"Seeder - Grass Seeder\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"204.00\"\n },\n \"display_value\": \"204.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 144,\n \"display_value\": \"Tiller - Lawn Tiller\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"357.00\"\n },\n \"display_value\": \"357.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 105,\n \"display_value\": \"10000002 - 2021-12-22 00:00:00 - 2731.5\"\n },\n \"1000179\": {\n \"value\": 142,\n \"display_value\": \"Transplanter - Transplanter\"\n },\n \"1000181\": {\n \"value\": 120,\n \"display_value\": \"Seed Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"89.25\"\n },\n \"display_value\": \"89.25\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"13.33\"\n },\n \"display_value\": \"13.33\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 112,\n \"display_value\": \"Standard\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"142.50\"\n },\n \"display_value\": \"142.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"142.50\",\n \"display_value\": \"142.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"71.2500\",\n \"display_value\": \"71.25\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"2\",\n \"display_value\": \"2.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\",\n \"display_value\": \"47.50\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\",\n \"display_value\": \"95.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"1128.1250\",\n \"display_value\": \"1,128.125\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"33.5876\",\n \"display_value\": \"33.5876\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 100,\n \"display_value\": \"200000 - 2021-01-22 00:00:00 - 50.35\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 112,\n \"display_value\": \"Standard\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\"\n },\n \"display_value\": \"47.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\",\n \"display_value\": \"47.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"47.5000\",\n \"display_value\": \"47.50\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\",\n \"display_value\": \"47.50\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\",\n \"display_value\": \"47.50\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 100,\n \"display_value\": \"200000 - 2021-01-22 00:00:00 - 50.35\"\n },\n \"1000179\": {\n \"value\": 130,\n \"display_value\": \"Plum Tree - Plum Tree\"\n },\n \"1000181\": {\n \"value\": 112,\n \"display_value\": \"Standard\"\n },\n \"1000193\": {\n \"value\": 117,\n \"display_value\": \"AR Invoice Indirect\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"47.50\"\n },\n \"display_value\": \"47.50\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 101,\n \"display_value\": \"200001 - 2021-01-22 00:00:00 - 100.7\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 112,\n \"display_value\": \"Standard\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\"\n },\n \"display_value\": \"95.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\",\n \"display_value\": \"95.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"95.0000\",\n \"display_value\": \"95.00\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\",\n \"display_value\": \"95.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\",\n \"display_value\": \"95.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 101,\n \"display_value\": \"200001 - 2021-01-22 00:00:00 - 100.7\"\n },\n \"1000179\": {\n \"value\": 130,\n \"display_value\": \"Plum Tree - Plum Tree\"\n },\n \"1000181\": {\n \"value\": 112,\n \"display_value\": \"Standard\"\n },\n \"1000193\": {\n \"value\": 117,\n \"display_value\": \"AR Invoice Indirect\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"95.00\"\n },\n \"display_value\": \"95.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"4217.50\"\n },\n \"display_value\": \"4,217.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"4217.50\",\n \"display_value\": \"4,217.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"527.1875\",\n \"display_value\": \"527.1875\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"8\",\n \"display_value\": \"8.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\",\n \"display_value\": \"200.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"926.25\",\n \"display_value\": \"926.25\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"456264.8437\",\n \"display_value\": \"456,264.8437\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"675.4738\",\n \"display_value\": \"675.4738\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 102,\n \"display_value\": \"10000000 - 2021-01-22 00:00:00 - 200\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\"\n },\n \"display_value\": \"200.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\",\n \"display_value\": \"200.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"200.0000\",\n \"display_value\": \"200.00\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\",\n \"display_value\": \"200.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\",\n \"display_value\": \"200.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 102,\n \"display_value\": \"10000000 - 2021-01-22 00:00:00 - 200\"\n },\n \"1000179\": {\n \"value\": 130,\n \"display_value\": \"Plum Tree - Plum Tree\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"200.00\"\n },\n \"display_value\": \"200.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"-55.56\"\n },\n \"display_value\": \"-55.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 104,\n \"display_value\": \"10000001 - 2021-08-07 00:00:00 - 360\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"360.00\"\n },\n \"display_value\": \"360.00\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"360.00\",\n \"display_value\": \"360.00\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"360.0000\",\n \"display_value\": \"360.00\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"1\",\n \"display_value\": \"1.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"360.00\",\n \"display_value\": \"360.00\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"360.00\",\n \"display_value\": \"360.00\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"0.0000\",\n \"display_value\": \"0.00\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"0\",\n \"display_value\": \"0.00\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 104,\n \"display_value\": \"10000001 - 2021-08-07 00:00:00 - 360\"\n },\n \"1000179\": {\n \"value\": 123,\n \"display_value\": \"Oak - Oak Tree\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"360.00\"\n },\n \"display_value\": \"360.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"50.00\"\n },\n \"display_value\": \"50.0\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": null,\n \"display_value\": \"\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"3657.50\"\n },\n \"display_value\": \"3,657.50\",\n \"sum_value\": {\n \"type\": \"decimal\",\n \"value\": \"3657.50\",\n \"display_value\": \"3,657.50\"\n },\n \"mean_value\": {\n \"type\": \"decimal\",\n \"value\": \"609.5833\",\n \"display_value\": \"609.5833\"\n },\n \"count_value\": {\n \"type\": \"decimal\",\n \"value\": \"6\",\n \"display_value\": \"6.00\"\n },\n \"minimum_value\": {\n \"type\": \"decimal\",\n \"value\": \"356.25\",\n \"display_value\": \"356.25\"\n },\n \"maximum_value\": {\n \"type\": \"decimal\",\n \"value\": \"926.25\",\n \"display_value\": \"926.25\"\n },\n \"variance_value\": {\n \"type\": \"decimal\",\n \"value\": \"280527.0833\",\n \"display_value\": \"280,527.0833\"\n },\n \"deviation_value\": {\n \"type\": \"decimal\",\n \"value\": \"529.6481\",\n \"display_value\": \"529.6481\"\n }\n },\n \"1000202\": {\n \"value\": null,\n \"display_value\": \"\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 123,\n \"display_value\": \"Oak - Oak Tree\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"926.25\"\n },\n \"display_value\": \"926.25\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 124,\n \"display_value\": \"Elm - Elm Tree\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"855.00\"\n },\n \"display_value\": \"855.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 127,\n \"display_value\": \"Rose Bush - Rose Bush\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"570.00\"\n },\n \"display_value\": \"570.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 130,\n \"display_value\": \"Plum Tree - Plum Tree\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"570.00\"\n },\n \"display_value\": \"570.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 128,\n \"display_value\": \"Azalea Bush - Azalea Bush\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"356.25\"\n },\n \"display_value\": \"356.25\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n },\n {\n \"cells\": {\n \"1000177\": {\n \"value\": 106,\n \"display_value\": \"10000003 - 2021-12-22 00:00:00 - 3657.5\"\n },\n \"1000179\": {\n \"value\": 129,\n \"display_value\": \"Holly Bush - Holly Bush\"\n },\n \"1000181\": {\n \"value\": 114,\n \"display_value\": \"Tree Farm Inc.\"\n },\n \"1000193\": {\n \"value\": 123,\n \"display_value\": \"AP Invoice\"\n },\n \"1000197\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"380.00\"\n },\n \"display_value\": \"380.00\"\n },\n \"1000202\": {\n \"value\": {\n \"type\": \"decimal\",\n \"value\": \"5.56\"\n },\n \"display_value\": \"5.56\"\n }\n },\n \"level\": 0,\n \"children\": []\n }\n ],\n \"next_page_token\": \"\",\n \"instance_id\": 0\n}" + } + ] + }, { "name": "Fact Acct", "request": { diff --git a/resources/env.yaml b/resources/env.yaml index 8ea4076..331b0e0 100644 --- a/resources/env.yaml +++ b/resources/env.yaml @@ -4,7 +4,7 @@ server: log_level: WARNING database: host: localhost - port: 5432 + port: 5959 name: "adempiere" user: adempiere password: adempiere diff --git a/src/main/java/org/spin/report_engine/data/Cell.java b/src/main/java/org/spin/report_engine/data/Cell.java index 4af18f9..e275275 100644 --- a/src/main/java/org/spin/report_engine/data/Cell.java +++ b/src/main/java/org/spin/report_engine/data/Cell.java @@ -134,6 +134,111 @@ public Cell withFunction(SummaryFunction function) { return this; } + public Cell withSumDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_SUM, displayValue); + return this; + } + + public Cell withMeanDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_MEAN, displayValue); + return this; + } + + public Cell withCountDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_COUNT, displayValue); + return this; + } + + public Cell withMinimumDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_MIN, displayValue); + return this; + } + + public Cell withMaximumDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_MAX, displayValue); + return this; + } + + public Cell withVarianceDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_VARIANCE, displayValue); + return this; + } + + public Cell withDeviationDisplayValue(String displayValue) { + if(function == null) { + return this; + } + function.setDisplayValue(SummaryFunction.F_DEVIATION, displayValue); + return this; + } + + public String getSumDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_SUM); + } + + public String getMeanDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_MEAN); + } + + public String getCountDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_COUNT); + } + + public String getMinimumDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_MIN); + } + + public String getMaximumDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_MAX); + } + + public String getVarianceDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_VARIANCE); + } + + public String getDeviationDisplayValue() { + if(function == null) { + return null; + } + return function.getDisplayValue(SummaryFunction.F_DEVIATION); + } + public BigDecimal getSum() { if(function == null) { return null; diff --git a/src/main/java/org/spin/report_engine/data/ReportInfo.java b/src/main/java/org/spin/report_engine/data/ReportInfo.java index 4704d4f..fc31c6b 100644 --- a/src/main/java/org/spin/report_engine/data/ReportInfo.java +++ b/src/main/java/org/spin/report_engine/data/ReportInfo.java @@ -26,9 +26,14 @@ import java.util.stream.IntStream; import java.util.stream.Stream; +import org.compiere.util.Language; +import org.compiere.util.Util; import org.spin.report_engine.format.PrintFormat; import org.spin.report_engine.format.PrintFormatItem; import org.spin.report_engine.format.QueryDefinition; +import org.spin.report_engine.mapper.DefaultMapping; +import org.spin.report_engine.mapper.IColumnMapping; +import org.spin.report_engine.util.ClassLoaderMapping; /** @@ -53,8 +58,10 @@ public class ReportInfo { private QueryDefinition queryDefinition; private long recordCount; private int instanceId; + private PrintFormat printFormat; private ReportInfo(PrintFormat printFormat, QueryDefinition queryDefinition) { + this.printFormat = printFormat; name = printFormat.getName(); description = printFormat.getDescription(); columns = printFormat.getPrintedItems().stream().map(item -> ColumnInfo.newInstance(item)).collect(Collectors.toList()); @@ -207,7 +214,26 @@ public ReportInfo completeInfo() { List completeRows = Stream.concat(getRows().stream(), groupedRows.stream()) .sorted(getSortingValue(false)) .collect(Collectors.toList()); - rows = completeRows; + Language language = Language.getLoginLanguage(); + rows = new ArrayList(); + completeRows.forEach(row -> { + Row newRow = Row.newInstance(); + // Items + printFormat.getItems().forEach(printFormatItem -> { + Cell cell = row.getCell(printFormatItem.getPrintFormatItemId()); + // Apply Default Mask + if(!Util.isEmpty(printFormatItem.getMappingClassName())) { + IColumnMapping customMapping = ClassLoaderMapping.loadClass(printFormatItem.getMappingClassName()); + if(customMapping != null) { + customMapping.processValue(printFormatItem, language, cell); + } + } else { + DefaultMapping.newInstance().processValue(printFormatItem, language, cell); + } + newRow.withCell(printFormatItem.getPrintFormatItemId(), cell); + }); + rows.add(newRow); + }); return this; } diff --git a/src/main/java/org/spin/report_engine/data/SummaryFunction.java b/src/main/java/org/spin/report_engine/data/SummaryFunction.java index 224d273..f0dacd0 100644 --- a/src/main/java/org/spin/report_engine/data/SummaryFunction.java +++ b/src/main/java/org/spin/report_engine/data/SummaryFunction.java @@ -16,6 +16,8 @@ import java.math.BigDecimal; import java.math.RoundingMode; +import java.util.HashMap; +import java.util.Map; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -35,6 +37,8 @@ public class SummaryFunction { private BigDecimal maximum; /** Sum of Squares */ private BigDecimal sumSquare; + /** Display values */ + private Map displayValues; /** Sum */ static public final char F_SUM = 'S'; @@ -65,6 +69,7 @@ private SummaryFunction() { sum = Env.ZERO; sumSquare = Env.ZERO; count = 0; + displayValues = new HashMap(); } public static SummaryFunction newInstance() { @@ -152,6 +157,24 @@ public BigDecimal getValue(char function) { return deviation; } // getValue + /** + * Get display value of function + * @param function + * @return + */ + public String getDisplayValue(char function) { + return displayValues.get(String.valueOf(function)); + } + + /** + * Set display value for function + * @param function + * @param displayValue + */ + public void setDisplayValue(char function, String displayValue) { + displayValues.put(String.valueOf(function), displayValue); + } + /*************************************************************************/ /** diff --git a/src/main/java/org/spin/report_engine/mapper/DefaultMapping.java b/src/main/java/org/spin/report_engine/mapper/DefaultMapping.java index 2869c3a..8f1af82 100644 --- a/src/main/java/org/spin/report_engine/mapper/DefaultMapping.java +++ b/src/main/java/org/spin/report_engine/mapper/DefaultMapping.java @@ -40,30 +40,38 @@ public static DefaultMapping newInstance() { return new DefaultMapping(); } + public void processValue(PrintFormatItem printFormatLine, Language language, Cell cell) { + processValue(printFormatLine, null, language, null, cell); + } + public void processValue(PrintFormatItem printFormatLine, PrintFormatColumn column, Language language, ResultSet resultSet, Cell cell) { if(cell == null) { return; } try { - if(DisplayType.isLookup(column.getReferenceId()) && column.getReferenceId() != DisplayType.List || column.getColumnName().equals("Record_ID")) { - int valueId = resultSet.getInt(column.getColumnName()); - cell.withValue(valueId); - if(column.getColumnName().equals("Record_ID")) { - try { - String tableName = resultSet.getString("TableName"); - if(!Util.isEmpty(tableName)) { - cell.withTableName(tableName); - if(valueId > 0) { - MTable table = MTable.get(Env.getCtx(), tableName); - PO entity = table.getPO(valueId, null); - cell.withDisplayValue(entity.getDisplayValue()); + if(resultSet!= null && column != null) { + if(DisplayType.isLookup(column.getReferenceId()) && column.getReferenceId() != DisplayType.List || column.getColumnName().equals("Record_ID")) { + int valueId = resultSet.getInt(column.getColumnName()); + cell.withValue(valueId); + if(column.getColumnName().equals("Record_ID")) { + try { + String tableName = resultSet.getString("TableName"); + if(!Util.isEmpty(tableName)) { + cell.withTableName(tableName); + if(valueId > 0) { + MTable table = MTable.get(Env.getCtx(), tableName); + PO entity = table.getPO(valueId, null); + cell.withDisplayValue(entity.getDisplayValue()); + } } + } catch (Exception e) { + e.printStackTrace(); } - } catch (Exception e) { - e.printStackTrace(); } + return; } - } else if(DisplayType.isDate(printFormatLine.getReferenceId())) { + } + if(DisplayType.isDate(printFormatLine.getReferenceId())) { if(cell.getValue() != null) { Timestamp date = (Timestamp) cell.getValue(); cell.withDisplayValue(DisplayType.getDateFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(date)); @@ -86,6 +94,35 @@ public void processValue(PrintFormatItem printFormatLine, PrintFormatColumn colu } } } + // Set display value to functions + BigDecimal value = cell.getSum(); + if(value != null) { + cell.withSumDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getMean(); + if(value != null) { + cell.withMeanDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getCount(); + if(value != null) { + cell.withCountDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getMinimum(); + if(value != null) { + cell.withMinimumDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getMaximum(); + if(value != null) { + cell.withMaximumDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getVariance(); + if(value != null) { + cell.withVarianceDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } + value = cell.getDeviation(); + if(value != null) { + cell.withDeviationDisplayValue(DisplayType.getNumberFormat(printFormatLine.getReferenceId(), language, printFormatLine.getFormatPattern()).format(value)); + } } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/org/spin/report_engine/mapper/IColumnMapping.java b/src/main/java/org/spin/report_engine/mapper/IColumnMapping.java index 945da8f..9220c97 100644 --- a/src/main/java/org/spin/report_engine/mapper/IColumnMapping.java +++ b/src/main/java/org/spin/report_engine/mapper/IColumnMapping.java @@ -36,4 +36,12 @@ public interface IColumnMapping { * @param cell */ public void processValue(PrintFormatItem printFormatLine, PrintFormatColumn column, Language language, ResultSet resultSet, Cell cell); + + /** + * Process value from complete list + * @param printFormatLine + * @param language + * @param cell + */ + public void processValue(PrintFormatItem printFormatLine, Language language, Cell cell); } diff --git a/src/main/java/org/spin/report_engine/service/ReportBuilder.java b/src/main/java/org/spin/report_engine/service/ReportBuilder.java index 8bb830e..97244ad 100644 --- a/src/main/java/org/spin/report_engine/service/ReportBuilder.java +++ b/src/main/java/org/spin/report_engine/service/ReportBuilder.java @@ -14,7 +14,6 @@ ************************************************************************************/ package org.spin.report_engine.service; -import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -22,7 +21,6 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Level; import org.adempiere.core.domains.models.I_AD_PrintFormat; import org.adempiere.core.domains.models.I_AD_Process; @@ -50,6 +48,7 @@ import org.spin.report_engine.format.QueryDefinition; import org.spin.report_engine.mapper.DefaultMapping; import org.spin.report_engine.mapper.IColumnMapping; +import org.spin.report_engine.util.ClassLoaderMapping; import org.spin.service.grpc.util.db.LimitUtil; import org.spin.service.grpc.util.db.ParameterUtil; import org.spin.service.grpc.util.query.Filter; @@ -193,7 +192,7 @@ private ReportInfo get(String transactionName) { cell.withValue(value); // Apply Default Mask if(!Util.isEmpty(item.getMappingClassName())) { - IColumnMapping customMapping = loadClass(item.getMappingClassName()); + IColumnMapping customMapping = ClassLoaderMapping.loadClass(item.getMappingClassName()); if(customMapping != null) { customMapping.processValue(item, column, language, resulset, cell); } @@ -217,51 +216,6 @@ private ReportInfo get(String transactionName) { return reportInfo.completeInfo(); } - private Class getHandlerClass(String className) { - // Validate null values - if(Util.isEmpty(className)) { - return null; - } - try { - Class clazz = Class.forName(className); - if(IColumnMapping.class.isAssignableFrom(clazz)) { - return clazz; - } - // Make sure that it is a PO class - Class superClazz = clazz.getSuperclass(); - // Validate super class - while (superClazz != null) { - if (superClazz == IColumnMapping.class) { - logger.log(Level.SEVERE, "Error loading class, Use: " + className); - return clazz; - } - // Get Super Class - superClazz = superClazz.getSuperclass(); - } - } catch (Exception e) { - logger.log(Level.SEVERE, "Loading class Error "+ e.getMessage()); - } - // - logger.log(Level.SEVERE,"Not found Class: " + className); - return null; - } // getHandlerClass - - private IColumnMapping loadClass(String className) { - IColumnMapping mapping = null; - try { - Class clazz = getHandlerClass(className); - if (clazz == null) { - logger.log(Level.SEVERE, "Class not found, Using Standard Class"); - } else { - Constructor constructor = clazz.getDeclaredConstructor(); - mapping = (IColumnMapping) constructor.newInstance(); - } - } catch (Exception e) { - logger.warning(e.getLocalizedMessage()); - } - return mapping; - } - public ReportInfo run() { if (getReportId() <= 0 && getPrintFormatId() <= 0) { throw new AdempiereException("@AD_Process_ID@ @NotFound@"); diff --git a/src/main/java/org/spin/report_engine/service/Service.java b/src/main/java/org/spin/report_engine/service/Service.java index a472dbe..d2325e4 100644 --- a/src/main/java/org/spin/report_engine/service/Service.java +++ b/src/main/java/org/spin/report_engine/service/Service.java @@ -209,33 +209,38 @@ private static ReportRow.Builder convertRow(List columns, Row row) { cellValue.putFields(DISPLAY_VALUE_KEY, ValueManager.getValueFromString(cell.getDisplayValue()).build()); // Summary Values if(cell.getSum() != null) { - cellValue.putFields(SUM_KEY, ValueManager.getValueFromObject(cell.getSum()).build()); + cellValue.putFields(SUM_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getSum()), cell.getSumDisplayValue())); } if(cell.getMean() != null) { - cellValue.putFields(MEAN_KEY, ValueManager.getValueFromObject(cell.getMean()).build()); + cellValue.putFields(MEAN_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getMean()), cell.getMeanDisplayValue())); } if(cell.getCount() != null) { - cellValue.putFields(COUNT_KEY, ValueManager.getValueFromObject(cell.getCount()).build()); + cellValue.putFields(COUNT_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getCount()), cell.getCountDisplayValue())); } if(cell.getMinimum() != null) { - cellValue.putFields(MINIMUM_KEY, ValueManager.getValueFromObject(cell.getMinimum()).build()); + cellValue.putFields(MINIMUM_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getMinimum()), cell.getMinimumDisplayValue())); } if(cell.getMaximum() != null) { - cellValue.putFields(MAXIMUM_KEY, ValueManager.getValueFromObject(cell.getMaximum()).build()); + cellValue.putFields(MAXIMUM_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getMaximum()), cell.getMaximumDisplayValue())); } if(cell.getVariance() != null) { - cellValue.putFields(VARIANCE_KEY, ValueManager.getValueFromObject(cell.getVariance()).build()); + cellValue.putFields(VARIANCE_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getVariance()), cell.getVarianceDisplayValue())); } if(cell.getDeviation() != null) { - cellValue.putFields(DEVIATION_KEY, ValueManager.getValueFromObject(cell.getDeviation()).build()); + cellValue.putFields(DEVIATION_KEY, convertFunctionDisplayValue(ValueManager.getValueFromObject(cell.getDeviation()), cell.getDeviationDisplayValue())); } - // Put Cell Value cells.putFields("" + column.getPrintFormatItemId(), Value.newBuilder().setStructValue(cellValue.build()).build()); }); return ReportRow.newBuilder().setCells(cells).setLevel(row.getLevel()); } + private static Value convertFunctionDisplayValue(Value.Builder currentValue, String displayValue) { + Struct.Builder struct = currentValue.getStructValueBuilder(); + struct.putFields(DISPLAY_VALUE_KEY, ValueManager.getValueFromString(displayValue).build()); + return Value.newBuilder().setStructValue(struct).build(); + } + private static ReportRow.Builder processParent(List columns, Row row) { ReportRow.Builder parentRow = convertRow(columns, row); row.getChildren().forEach(child -> processChildren(columns, parentRow, child)); diff --git a/src/main/java/org/spin/report_engine/util/ClassLoaderMapping.java b/src/main/java/org/spin/report_engine/util/ClassLoaderMapping.java new file mode 100644 index 0000000..9d16234 --- /dev/null +++ b/src/main/java/org/spin/report_engine/util/ClassLoaderMapping.java @@ -0,0 +1,66 @@ +/************************************************************************************ + * Copyright (C) 2012-2018 E.R.P. Consultores y Asociados, C.A. * + * Contributor(s): Yamel Senih ysenih@erpya.com * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + ************************************************************************************/ +package org.spin.report_engine.util; + +import java.lang.reflect.Constructor; + +import org.compiere.util.Util; +import org.spin.report_engine.mapper.IColumnMapping; + +/** + * This class is for load a dynamic class + * @author Yamel Senih, ysenih@erpya.com, ERPCyA http://www.erpya.com + */ +public class ClassLoaderMapping { + public static Class getHandlerClass(String className) { + // Validate null values + if(Util.isEmpty(className)) { + return null; + } + try { + Class clazz = Class.forName(className); + if(IColumnMapping.class.isAssignableFrom(clazz)) { + return clazz; + } + // Make sure that it is a PO class + Class superClazz = clazz.getSuperclass(); + // Validate super class + while (superClazz != null) { + if (superClazz == IColumnMapping.class) { + return clazz; + } + // Get Super Class + superClazz = superClazz.getSuperclass(); + } + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } // getHandlerClass + + public static IColumnMapping loadClass(String className) { + IColumnMapping mapping = null; + try { + Class clazz = getHandlerClass(className); + if (clazz != null) { + Constructor constructor = clazz.getDeclaredConstructor(); + mapping = (IColumnMapping) constructor.newInstance(); + } + } catch (Exception e) { + e.printStackTrace(); + } + return mapping; + } +}