diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index d09b0cc33eb2..e58b10a66880 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -99526,8 +99526,11 @@ totals.$index(0, group).$indexSet(0, column, 0); if (t6) { t6 = cell.currencyId; - t7 = company.settings.currencyId; - t6 = t6 !== (t7 == null ? "1" : t7); + if (t6 != null) { + t7 = company.settings.currencyId; + t6 = t6 !== (t7 == null ? "1" : t7); + } else + t6 = false; } else t6 = false; if (t6) { @@ -99614,12 +99617,12 @@ ReportsScreenVM_fromStore__closure: function ReportsScreenVM_fromStore__closure(t0, t1, t2, t3, t4, t5, t6, t7, t8) { var _ = this; _.state = t0; - _.group = t1; - _.store = t2; - _.report = t3; - _.chart = t4; + _.store = t1; + _.report = t2; + _.group = t3; + _.selectedGroup = t4; _.subgroup = t5; - _.selectedGroup = t6; + _.chart = t6; _.customStartDate = t7; _.customEndDate = t8; }, @@ -418872,7 +418875,7 @@ B.JSArray_methods.addAll$1(t8, chartChildren); t8 = A.FormCard$(_null, t8, _null, 4, false, _null, false, _null); } else - t8 = A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, t12, _null, 4, false, _null, false, _null), _null), new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, t9, _null, 4, false, _null, false, _null), _null), new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, chartChildren, _null, 4, false, _null, false, _null), _null)], t3), B.CrossAxisAlignment_0, B.MainAxisAlignment_0, B.MainAxisSize_1, _null); + t8 = A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, t12, _null, 4, false, _null, false, B.EdgeInsets_12_12_6_0), _null), new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, t9, _null, 4, false, _null, false, B.EdgeInsets_6_12_6_0), _null), new A.Flexible(1, B.FlexFit_1, A.FormCard$(_null, chartChildren, _null, 4, false, _null, false, B.EdgeInsets_6_12_12_0), _null)], t3), B.CrossAxisAlignment_0, B.MainAxisAlignment_0, B.MainAxisSize_1, _null); t8 = A._setArrayType([t8], t3); if (A.getLayout(context) === B.AppLayout_mobile) t8.push(new A.Padding(B.EdgeInsets_16_0_16_0, A.Row$(A._setArrayType([new A.Builder(new A.ReportsScreen_build_closure24(_this, t1, reportResult), _null), new A.SizedBox(16, _null, _null, _null), A.Expanded$(new A.AppButton(_null, _null, t1.get$$export(), new A.ReportsScreen_build_closure25(_this, context), _null, _null), 1)], t3), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), _null)); @@ -419505,7 +419508,7 @@ return A.DataRow$(t2); }, tableRow$3(context, viewModel, index) { - var row, cells, j, cell, groupTotals, group, values, t4, _i, column, columnType, t5, value, _this = this, _null = null, + var row, cells, j, cell, groupTotals, group, values, t4, _i, column, columnType, t5, value, t6, _this = this, _null = null, store = A.StoreProvider_of(context, type$.legacy_AppState), reportState = A._lateReadCheck(store.__Store__state, "_state").uiState.reportsUIState, groupBy = reportState.group, @@ -419530,7 +419533,8 @@ for (t2 = _this.sortedColumns$1(reportState), t3 = t2.length, t4 = type$.JSArray_legacy_String, _i = 0; _i < t2.length; t2.length === t3 || (0, A.throwConcurrentModificationError)(t2), ++_i) { column = t2[_i]; columnType = A.getReportColumnType(column, context); - if (J.$eq$(column, groupBy)) { + t5 = J.getInterceptor$(column); + if (t5.$eq(column, groupBy)) { if (group.length === 0) { t5 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t1.localeCode), "blank"); value = t5 == null ? "" : t5; @@ -419544,9 +419548,10 @@ } else value = group; value = J.$add$ansx(value, " (") + B.JSInt_methods.toString$0(J.floor$0$n(values.$index(0, "count"))) + ")"; - } else if (columnType === B.ReportColumnType_3) - value = A.formatNumber(values.$index(0, column), context, _null, _null, B.FormatNumberType_0, true, _null, false); - else + } else if (columnType === B.ReportColumnType_3) { + t6 = values.$index(0, column); + value = A.formatNumber(t6, context, _null, _null, t5.$eq(column, "quantity") ? B.FormatNumberType_3 : B.FormatNumberType_0, true, _null, false); + } else value = columnType === B.ReportColumnType_6 ? A.formatDuration(new A.Duration(1000000 * J.toInt$0$n(values.$index(0, column))), true) : ""; cells.push(new A.DataCell(new A.Text(value, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null), new A.ReportResult_tableRow_closure0(group, column, groupBy, context, reportState, t1, store))); } @@ -419572,7 +419577,7 @@ return t2; }, totalRows$1(context) { - var settings, reportSettings, totals, allColumns, t3, t4, t5, i, row, countedRow, j, cell, column, t6, currencyId, _i, keys, allFields, _box_0 = {}, + var settings, reportSettings, totals, allColumns, t3, t4, t5, i, row, countedRow, j, cell, column, t6, currencyId, k, cell0, _i, keys, allFields, _box_0 = {}, rows = A._setArrayType([], type$.JSArray_legacy_DataRow), store = A.StoreProvider_of(context, type$.legacy_AppState), state = A._lateReadCheck(store.__Store__state, "_state"), @@ -419621,6 +419626,23 @@ currencyId = ""; } else currencyId = ""; + if (currencyId.length === 0) + for (t6 = row.length, k = 0; k < t6; ++k) { + cell0 = row[k]; + if (cell0 instanceof A.ReportNumberValue) { + currencyId = cell0.currencyId; + if (currencyId == null) + currencyId = ""; + } else if (cell0 instanceof A.ReportAgeValue) { + currencyId = cell0.currencyId; + if (currencyId == null) + currencyId = ""; + } else if (cell0 instanceof A.ReportDurationValue) { + currencyId = cell0.currencyId; + if (currencyId == null) + currencyId = ""; + } + } if (!totals.containsKey$1(0, currencyId)) totals.$indexSet(0, currencyId, A.LinkedHashMap_LinkedHashMap$_literal(["count", 0], t1, t5)); if (!countedRow) { @@ -420223,7 +420245,7 @@ }; A.ReportsScreenVM_fromStore_closure4.prototype = { call$7$chart$customEndDate$customStartDate$group$report$selectedGroup$subgroup(chart, customEndDate, customStartDate, group, report, selectedGroup, subgroup) { - A.Timer_Timer(A.Duration$(0, 0, 0, 100, 0, 0), new A.ReportsScreenVM_fromStore__closure(this.state, group, this.store, report, chart, subgroup, selectedGroup, customStartDate, customEndDate)); + A.Timer_Timer(A.Duration$(0, 0, 0, 100, 0, 0), new A.ReportsScreenVM_fromStore__closure(this.state, this.store, report, group, selectedGroup, subgroup, chart, customStartDate, customEndDate)); }, call$0() { return this.call$7$chart$customEndDate$customStartDate$group$report$selectedGroup$subgroup(null, null, null, null, null, null, null); @@ -420255,21 +420277,12 @@ }; A.ReportsScreenVM_fromStore__closure.prototype = { call$0() { - var _this = this, _null = null, + var _this = this, reportState = _this.state.uiState.reportsUIState, - t1 = _this.group, - t2 = t1 != null && reportState.group !== t1, - t3 = _this.store, - t4 = _this.report; - if (t2) { - t2 = t4 == null ? reportState.report : t4; - t4 = type$.legacy_String; - t4 = A.BuiltMap_BuiltMap(B.Map_empty, t4, t4); - t3.get$_dispatchers()[0].call$1(new A.UpdateReportSettings(t2, t4, t1, "", _this.chart, _this.subgroup, _null, _null, "", "")); - } else { - t2 = t4 == null ? reportState.report : t4; - t3.get$_dispatchers()[0].call$1(new A.UpdateReportSettings(t2, _null, t1, _this.selectedGroup, _this.chart, _this.subgroup, _null, _null, _this.customStartDate, _this.customEndDate)); - } + t1 = _this.report; + if (t1 == null) + t1 = reportState.report; + _this.store.get$_dispatchers()[0].call$1(new A.UpdateReportSettings(t1, null, _this.group, _this.selectedGroup, _this.chart, _this.subgroup, null, null, _this.customStartDate, _this.customEndDate)); }, $signature: 1 };