Admin Portal - Profile

This commit is contained in:
hillelcoren 2025-05-25 12:44:15 +00:00
parent 8b8d6d739c
commit d969fe714b
1 changed files with 159 additions and 159 deletions

View File

@ -110022,7 +110022,7 @@
EntityPresenter_isFieldNumeric(field) {
if (B.JSString_methods.startsWith$1(field, "converted_"))
return true;
return B.JSArray_methods.contains$1(A._setArrayType(["balance", "paid_to_date", "amount", "quantity", "price", "cost", "line_total", "discount", "profit", "total", "payment", "expense", "invoice_amount", "invoice_net_amount", "invoice_balance", "client_balance", "credit_balance", "payment_balance", "tax_rate", "tax_amount", "tax_amount1", "tax_amount2", "tax_amount3", "tax_paid", "payment_amount", "net_balance", "rate", "calculated_rate", "duration", "net_amount", "net_total", "age_group_0", "age_group_30", "age_group_60", "age_group_90", "age_group_120", "stock_quantity", "notification_threshold", "partial", "withdrawal", "deposit", "documents", "applied", "refunded"], type$.JSArray_String), field);
return B.JSArray_methods.contains$1(A._setArrayType(["balance", "paid_to_date", "amount", "quantity", "price", "cost", "line_total", "discount", "profit", "total", "payment", "expense", "invoice_amount", "invoice_net_amount", "invoice_balance", "client_balance", "credit_balance", "payment_balance", "tax_rate", "tax_amount", "tax_amount1", "tax_amount2", "tax_amount3", "tax_paid", "payment_amount", "net_balance", "rate", "calculated_rate", "duration", "net_amount", "net_total", "age_group_0", "age_group_30", "age_group_60", "age_group_90", "age_group_120", "stock_quantity", "notification_threshold", "partial", "withdrawal", "deposit", "documents", "applied", "refunded", "profit", "markup"], type$.JSArray_String), field);
},
EntityPresenter: function EntityPresenter() {
this.__EntityPresenter_context_A = this.__EntityPresenter_entity_A = $;
@ -123923,7 +123923,7 @@
contactReport_closure3: function contactReport_closure3() {
},
lineItemReport1(userCompany, reportsUIState, productMap, creditMap, clientMap, staticState) {
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, credit, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, value1, value2, value3, value4, t23, t24, row, t25, value5, value6, value7, value8, value9, value10, value11, cost, t26, value12, value13, skip, t27, productId, value14, cost0, t28, scope, t29, selectedColumns, _null = null,
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, credit, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, t23, value1, value2, value3, value4, t24, t25, row, t26, value5, value6, value7, value8, value9, value10, value11, cost, t27, value12, value13, skip, t28, productId, value14, cost0, t29, scope, t30, selectedColumns, _null = null,
_s11_ = "credit_item",
data = A._setArrayType([], type$.JSArray_List_ReportElement),
t1 = userCompany.settings.reportSettings._map$_map;
@ -123968,17 +123968,17 @@
continue;
if (t13 && credit.statusId === "1")
continue;
for (t18 = credit.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = credit.id, t21 = credit.entityType, t22 = credit.archivedAt > 0, value = client.idNumber, value0 = client.number, value1 = credit.dueDate, value2 = client.displayName, value3 = credit.date, value4 = credit.number, t23 = credit.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t24 = t18.__interceptors$_current;
if (t24 == null)
t24 = t19._as(t24);
for (t18 = credit.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = credit.id, t21 = credit.entityType, t22 = credit.archivedAt > 0, value = client.idNumber, value0 = client.number, t23 = credit.usesInclusiveTaxes, value1 = credit.dueDate, value2 = client.displayName, value3 = credit.date, value4 = credit.number, t24 = credit.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t25 = t18.__interceptors$_current;
if (t25 == null)
t25 = t19._as(t25);
row = A._setArrayType([], t12);
for (t25 = new J.ArrayIterator(t3, t3.length, t5), value5 = t24.productKey, value6 = t24.discount, value7 = t24.notes, value8 = t24.customValue4, value9 = t24.customValue3, value10 = t24.customValue2, value11 = t24.customValue1, cost = t24.productCost, t26 = cost !== 0, value12 = t24.quantity, value13 = t24.cost, skip = false; t25.moveNext$0();) {
t27 = t25.__interceptors$_current;
if (t27 == null)
t27 = t6._as(t27);
for (t26 = new J.ArrayIterator(t3, t3.length, t5), value5 = t25.productKey, value6 = t25.discount, value7 = t25.notes, value8 = t25.customValue4, value9 = t25.customValue3, value10 = t25.customValue2, value11 = t25.customValue1, cost = t25.productCost, t27 = cost !== 0, value12 = t25.quantity, value13 = t25.cost, skip = false; t26.moveNext$0();) {
t28 = t26.__interceptors$_current;
if (t28 == null)
t28 = t6._as(t28);
productId = productKeyMap.$index(0, value5);
switch (t27.index) {
switch (t28.index) {
case 2:
value14 = value13;
break;
@ -123986,19 +123986,19 @@
value14 = value12;
break;
case 3:
if (t26)
if (t27)
value14 = cost;
else
value14 = productId == null ? 0 : t1.$index(0, productId).cost;
break;
case 5:
case 6:
if (t26)
if (t27)
cost0 = cost;
else
cost0 = productId == null ? 0 : t1.$index(0, productId).cost;
value14 = (t24.total$2(0, credit, precision) - t24.taxAmount$2(credit, precision)) / t23 - cost0;
if (t27 === B.CreditItemReportFields_6 && cost0 !== 0)
value14 = (t25.total$2(0, credit, precision) - t25.taxAmount$2(credit, precision)) / t24 - cost0;
if (t28 === B.CreditItemReportFields_6 && cost0 !== 0)
value14 = A.S(A.round(value14 / cost0 * 100, 2)) + "%";
break;
case 9:
@ -124017,7 +124017,7 @@
value14 = value7;
break;
case 7:
value14 = t24.total$2(0, credit, precision);
value14 = t23 ? t25.total$2(0, credit, precision) : t25.total$2(0, credit, precision) + t25.taxAmount$2(credit, precision);
break;
case 0:
value14 = value5;
@ -124041,23 +124041,23 @@
value14 = value1;
break;
case 20:
value14 = t24.get$hasTaxes();
value14 = t25.get$hasTaxes();
break;
case 21:
value14 = t24.get$taxRates();
value14 = t25.get$taxRates();
break;
case 22:
value14 = t24.get$taxNames();
value14 = t25.get$taxNames();
break;
case 23:
value14 = t24.taxAmount$2(credit, precision);
value14 = t25.taxAmount$2(credit, precision);
break;
case 24:
value14 = t24.total$2(0, credit, precision) - t24.taxAmount$2(credit, precision);
value14 = t23 ? t25.total$2(0, credit, precision) - t25.taxAmount$2(credit, precision) : t25.total$2(0, credit, precision);
break;
case 25:
t28 = t9.$index(0, t16);
value14 = t28 == null ? _null : t28.name;
t29 = t9.$index(0, t16);
value14 = t29 == null ? _null : t29.name;
if (value14 == null)
value14 = "";
break;
@ -124068,32 +124068,32 @@
value14 = value;
break;
case 26:
t28 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t28).dependOnInheritedWidgetOfExactType$1$0(t8);
t28 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t28.toString;
t29 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t29).dependOnInheritedWidgetOfExactType$1$0(t8);
t29 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t29.toString;
if (credit.get$isActive())
t29 = "active";
t30 = "active";
else
t29 = t22 && t17 ? "archived" : "deleted";
value14 = t28.lookup$1(t29);
t30 = t22 && t17 ? "archived" : "deleted";
value14 = t29.lookup$1(t30);
break;
default:
value14 = "";
}
if (!A.ReportResult_matchField(A.EnumUtils_parse(t27), _null, reportsUIState, userCompany, value14))
if (!A.ReportResult_matchField(A.EnumUtils_parse(t28), _null, reportsUIState, userCompany, value14))
skip = true;
t28 = J.getInterceptor$(value14);
if (t28.get$runtimeType(value14) === B.Type_bool_lhE)
t29 = J.getInterceptor$(value14);
if (t29.get$runtimeType(value14) === B.Type_bool_lhE)
row.push(new A.ReportBoolValue(value14, t21, t20));
else if (t28.get$runtimeType(value14) === B.Type_double_K1J || t28.get$runtimeType(value14) === B.Type_int_tHn) {
if (t27 === B.CreditItemReportFields_4)
t27 = _null;
else if (t27 === B.CreditItemReportFields_5 || t27 === B.CreditItemReportFields_3)
t27 = t15 ? "1" : t11;
else if (t29.get$runtimeType(value14) === B.Type_double_K1J || t29.get$runtimeType(value14) === B.Type_int_tHn) {
if (t28 === B.CreditItemReportFields_4)
t28 = _null;
else if (t28 === B.CreditItemReportFields_5 || t28 === B.CreditItemReportFields_3)
t28 = t15 ? "1" : t11;
else
t27 = t16;
row.push(new A.ReportNumberValue(value14, _null, t27, t21, t20));
t28 = t16;
row.push(new A.ReportNumberValue(value14, _null, t28, t21, t20));
} else
row.push(new A.ReportStringValue(value14, t21, t20));
}
@ -124794,7 +124794,7 @@
expenseReport_closure3: function expenseReport_closure3() {
},
lineItemReport2(userCompany, reportsUIState, productMap, invoiceMap, clientMap, staticState) {
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, invoice, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, value1, value2, value3, value4, t23, t24, row, t25, value5, value6, value7, value8, value9, value10, value11, cost, t26, value12, value13, skip, t27, productId, value14, cost0, t28, scope, t29, selectedColumns, _null = null,
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, invoice, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, t23, value1, value2, value3, value4, t24, t25, row, t26, value5, value6, value7, value8, value9, value10, value11, cost, t27, value12, value13, skip, t28, productId, value14, cost0, t29, scope, t30, selectedColumns, _null = null,
_s12_ = "invoice_item",
data = A._setArrayType([], type$.JSArray_List_ReportElement),
t1 = userCompany.settings.reportSettings._map$_map;
@ -124839,17 +124839,17 @@
continue;
if (t13 && invoice.statusId === "1")
continue;
for (t18 = invoice.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = invoice.id, t21 = invoice.entityType, t22 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, value1 = invoice.dueDate, value2 = client.displayName, value3 = invoice.date, value4 = invoice.number, t23 = invoice.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t24 = t18.__interceptors$_current;
if (t24 == null)
t24 = t19._as(t24);
for (t18 = invoice.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = invoice.id, t21 = invoice.entityType, t22 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, t23 = invoice.usesInclusiveTaxes, value1 = invoice.dueDate, value2 = client.displayName, value3 = invoice.date, value4 = invoice.number, t24 = invoice.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t25 = t18.__interceptors$_current;
if (t25 == null)
t25 = t19._as(t25);
row = A._setArrayType([], t12);
for (t25 = new J.ArrayIterator(t3, t3.length, t5), value5 = t24.productKey, value6 = t24.discount, value7 = t24.notes, value8 = t24.customValue4, value9 = t24.customValue3, value10 = t24.customValue2, value11 = t24.customValue1, cost = t24.productCost, t26 = cost !== 0, value12 = t24.quantity, value13 = t24.cost, skip = false; t25.moveNext$0();) {
t27 = t25.__interceptors$_current;
if (t27 == null)
t27 = t6._as(t27);
for (t26 = new J.ArrayIterator(t3, t3.length, t5), value5 = t25.productKey, value6 = t25.discount, value7 = t25.notes, value8 = t25.customValue4, value9 = t25.customValue3, value10 = t25.customValue2, value11 = t25.customValue1, cost = t25.productCost, t27 = cost !== 0, value12 = t25.quantity, value13 = t25.cost, skip = false; t26.moveNext$0();) {
t28 = t26.__interceptors$_current;
if (t28 == null)
t28 = t6._as(t28);
productId = productKeyMap.$index(0, value5);
switch (t27.index) {
switch (t28.index) {
case 2:
value14 = value13;
break;
@ -124857,19 +124857,19 @@
value14 = value12;
break;
case 3:
if (t26)
if (t27)
value14 = cost;
else
value14 = productId == null ? 0 : t1.$index(0, productId).cost;
break;
case 5:
case 6:
if (t26)
if (t27)
cost0 = cost;
else
cost0 = productId == null ? 0 : t1.$index(0, productId).cost;
value14 = (t24.total$2(0, invoice, precision) - t24.taxAmount$2(invoice, precision)) / t23 - cost0;
if (t27 === B.InvoiceItemReportFields_6 && cost0 !== 0)
value14 = (t25.total$2(0, invoice, precision) - t25.taxAmount$2(invoice, precision)) / t24 - cost0;
if (t28 === B.InvoiceItemReportFields_6 && cost0 !== 0)
value14 = A.S(A.round(value14 / cost0 * 100, 2)) + "%";
break;
case 9:
@ -124888,7 +124888,7 @@
value14 = value7;
break;
case 7:
value14 = t24.total$2(0, invoice, precision);
value14 = t23 ? t25.total$2(0, invoice, precision) : t25.total$2(0, invoice, precision) + t25.taxAmount$2(invoice, precision);
break;
case 0:
value14 = value5;
@ -124912,23 +124912,23 @@
value14 = value1;
break;
case 20:
value14 = t24.get$hasTaxes();
value14 = t25.get$hasTaxes();
break;
case 21:
value14 = t24.get$taxRates();
value14 = t25.get$taxRates();
break;
case 22:
value14 = t24.get$taxNames();
value14 = t25.get$taxNames();
break;
case 23:
value14 = t24.taxAmount$2(invoice, precision);
value14 = t25.taxAmount$2(invoice, precision);
break;
case 24:
value14 = t24.total$2(0, invoice, precision) - t24.taxAmount$2(invoice, precision);
value14 = t23 ? t25.total$2(0, invoice, precision) - t25.taxAmount$2(invoice, precision) : t25.total$2(0, invoice, precision);
break;
case 25:
t28 = t9.$index(0, t16);
value14 = t28 == null ? _null : t28.name;
t29 = t9.$index(0, t16);
value14 = t29 == null ? _null : t29.name;
if (value14 == null)
value14 = "";
break;
@ -124939,32 +124939,32 @@
value14 = value;
break;
case 26:
t28 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t28).dependOnInheritedWidgetOfExactType$1$0(t8);
t28 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t28.toString;
t29 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t29).dependOnInheritedWidgetOfExactType$1$0(t8);
t29 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t29.toString;
if (invoice.get$isActive())
t29 = "active";
t30 = "active";
else
t29 = t22 && t17 ? "archived" : "deleted";
value14 = t28.lookup$1(t29);
t30 = t22 && t17 ? "archived" : "deleted";
value14 = t29.lookup$1(t30);
break;
default:
value14 = "";
}
if (!A.ReportResult_matchField(A.EnumUtils_parse(t27), _null, reportsUIState, userCompany, value14))
if (!A.ReportResult_matchField(A.EnumUtils_parse(t28), _null, reportsUIState, userCompany, value14))
skip = true;
t28 = J.getInterceptor$(value14);
if (t28.get$runtimeType(value14) === B.Type_bool_lhE)
t29 = J.getInterceptor$(value14);
if (t29.get$runtimeType(value14) === B.Type_bool_lhE)
row.push(new A.ReportBoolValue(value14, t21, t20));
else if (t28.get$runtimeType(value14) === B.Type_double_K1J || t28.get$runtimeType(value14) === B.Type_int_tHn) {
if (t27 === B.InvoiceItemReportFields_4)
t27 = _null;
else if (t27 === B.InvoiceItemReportFields_5 || t27 === B.InvoiceItemReportFields_3)
t27 = t15 ? "1" : t11;
else if (t29.get$runtimeType(value14) === B.Type_double_K1J || t29.get$runtimeType(value14) === B.Type_int_tHn) {
if (t28 === B.InvoiceItemReportFields_4)
t28 = _null;
else if (t28 === B.InvoiceItemReportFields_5 || t28 === B.InvoiceItemReportFields_3)
t28 = t15 ? "1" : t11;
else
t27 = t16;
row.push(new A.ReportNumberValue(value14, _null, t27, t21, t20));
t28 = t16;
row.push(new A.ReportNumberValue(value14, _null, t28, t21, t20));
} else
row.push(new A.ReportStringValue(value14, t21, t20));
}
@ -126564,7 +126564,7 @@
profitAndLossReport_closure4: function profitAndLossReport_closure4() {
},
lineItemReport(userCompany, reportsUIState, productMap, purchaseOrderMap, clientMap, vendorMap, staticState) {
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, invoice, client, vendor, t15, t16, precision, t17, t18, t19, t20, t21, value, value0, value1, value2, value3, value4, value5, t22, t23, row, t24, value6, value7, value8, value9, value10, value11, value12, value13, t25, value14, value15, skip, t26, productId, value16, t27, t28, t29, scope, selectedColumns, _null = null,
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, invoice, client, vendor, t15, t16, precision, t17, t18, t19, t20, t21, value, value0, t22, value1, value2, value3, value4, value5, t23, t24, row, t25, value6, value7, value8, value9, value10, value11, value12, value13, t26, value14, value15, skip, t27, productId, value16, t28, t29, t30, scope, selectedColumns, _null = null,
_s19_ = "purchase_order_item",
data = A._setArrayType([], type$.JSArray_List_ReportElement),
t1 = userCompany.settings.reportSettings._map$_map;
@ -126612,17 +126612,17 @@
continue;
if (t12 && invoice.statusId === "1")
continue;
for (t17 = invoice.lineItems._list$_list, t18 = A._arrayInstanceType(t17), t17 = new J.ArrayIterator(t17, t17.length, t18._eval$1("ArrayIterator<1>")), t19 = invoice.id, t20 = invoice.entityType, t21 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, value1 = invoice.dueDate, value2 = vendor.name, value3 = client.displayName, value4 = invoice.date, value5 = invoice.number, t22 = vendor.currencyId, t18 = t18._precomputed1, t16 = !t16; t17.moveNext$0();) {
t23 = t17.__interceptors$_current;
if (t23 == null)
t23 = t18._as(t23);
for (t17 = invoice.lineItems._list$_list, t18 = A._arrayInstanceType(t17), t17 = new J.ArrayIterator(t17, t17.length, t18._eval$1("ArrayIterator<1>")), t19 = invoice.id, t20 = invoice.entityType, t21 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, t22 = invoice.usesInclusiveTaxes, value1 = invoice.dueDate, value2 = vendor.name, value3 = client.displayName, value4 = invoice.date, value5 = invoice.number, t23 = vendor.currencyId, t18 = t18._precomputed1, t16 = !t16; t17.moveNext$0();) {
t24 = t17.__interceptors$_current;
if (t24 == null)
t24 = t18._as(t24);
row = A._setArrayType([], t10);
for (t24 = new J.ArrayIterator(t3, t3.length, t5), value6 = t23.productKey, value7 = t23.discount, value8 = t23.notes, value9 = t23.customValue4, value10 = t23.customValue3, value11 = t23.customValue2, value12 = t23.customValue1, value13 = t23.productCost, t25 = value13 !== 0, value14 = t23.quantity, value15 = t23.cost, skip = false; t24.moveNext$0();) {
t26 = t24.__interceptors$_current;
if (t26 == null)
t26 = t6._as(t26);
for (t25 = new J.ArrayIterator(t3, t3.length, t5), value6 = t24.productKey, value7 = t24.discount, value8 = t24.notes, value9 = t24.customValue4, value10 = t24.customValue3, value11 = t24.customValue2, value12 = t24.customValue1, value13 = t24.productCost, t26 = value13 !== 0, value14 = t24.quantity, value15 = t24.cost, skip = false; t25.moveNext$0();) {
t27 = t25.__interceptors$_current;
if (t27 == null)
t27 = t6._as(t27);
productId = productKeyMap.$index(0, value6);
switch (t26.index) {
switch (t27.index) {
case 2:
value16 = value15;
break;
@ -126630,16 +126630,16 @@
value16 = value14;
break;
case 3:
if (t25)
if (t26)
value16 = value13;
else
value16 = productId == null ? 0 : t1.$index(0, productId).cost;
break;
case 5:
t27 = t23.total$2(0, invoice, precision);
t28 = t23.taxAmount$2(invoice, precision);
t29 = productId == null ? 0 : t1.$index(0, productId).cost;
value16 = t27 - t28 - t29;
t28 = t24.total$2(0, invoice, precision);
t29 = t24.taxAmount$2(invoice, precision);
t30 = productId == null ? 0 : t1.$index(0, productId).cost;
value16 = t28 - t29 - t30;
break;
case 8:
value16 = value12;
@ -126657,7 +126657,7 @@
value16 = value8;
break;
case 6:
value16 = t23.total$2(0, invoice, precision);
value16 = t22 ? t24.total$2(0, invoice, precision) : t24.total$2(0, invoice, precision) + t24.taxAmount$2(invoice, precision);
break;
case 0:
value16 = value6;
@ -126687,23 +126687,23 @@
value16 = value1;
break;
case 21:
value16 = t23.get$hasTaxes();
value16 = t24.get$hasTaxes();
break;
case 22:
value16 = t23.get$taxRates();
value16 = t24.get$taxRates();
break;
case 23:
value16 = t23.get$taxNames();
value16 = t24.get$taxNames();
break;
case 24:
value16 = t23.taxAmount$2(invoice, precision);
value16 = t24.taxAmount$2(invoice, precision);
break;
case 25:
value16 = t23.total$2(0, invoice, precision) - t23.taxAmount$2(invoice, precision);
value16 = t22 ? t24.total$2(0, invoice, precision) - t24.taxAmount$2(invoice, precision) : t24.total$2(0, invoice, precision);
break;
case 26:
t27 = t9.$index(0, t15);
value16 = t27 == null ? _null : t27.name;
t28 = t9.$index(0, t15);
value16 = t28 == null ? _null : t28.name;
if (value16 == null)
value16 = "";
break;
@ -126714,26 +126714,26 @@
value16 = value;
break;
case 27:
t27 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t27).dependOnInheritedWidgetOfExactType$1$0(t8);
t27 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t27.toString;
t28 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t28).dependOnInheritedWidgetOfExactType$1$0(t8);
t28 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t28.toString;
if (invoice.get$isActive())
t28 = "active";
t29 = "active";
else
t28 = t21 && t16 ? "archived" : "deleted";
value16 = t27.lookup$1(t28);
t29 = t21 && t16 ? "archived" : "deleted";
value16 = t28.lookup$1(t29);
break;
default:
value16 = "";
}
if (!A.ReportResult_matchField(A.EnumUtils_parse(t26), _null, reportsUIState, userCompany, value16))
if (!A.ReportResult_matchField(A.EnumUtils_parse(t27), _null, reportsUIState, userCompany, value16))
skip = true;
t27 = J.getInterceptor$(value16);
if (t27.get$runtimeType(value16) === B.Type_bool_lhE)
t28 = J.getInterceptor$(value16);
if (t28.get$runtimeType(value16) === B.Type_bool_lhE)
row.push(new A.ReportBoolValue(value16, t20, t19));
else if (t27.get$runtimeType(value16) === B.Type_double_K1J || t27.get$runtimeType(value16) === B.Type_int_tHn)
row.push(new A.ReportNumberValue(value16, _null, t26 === B.PurchaseOrderItemReportFields_4 ? _null : t22, t20, t19));
else if (t28.get$runtimeType(value16) === B.Type_double_K1J || t28.get$runtimeType(value16) === B.Type_int_tHn)
row.push(new A.ReportNumberValue(value16, _null, t27 === B.PurchaseOrderItemReportFields_4 ? _null : t23, t20, t19));
else
row.push(new A.ReportStringValue(value16, t20, t19));
}
@ -127061,7 +127061,7 @@
purchaseOrderReport_closure3: function purchaseOrderReport_closure3() {
},
lineItemReport0(userCompany, reportsUIState, productMap, invoiceMap, clientMap, staticState) {
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, invoice, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, value1, value2, value3, value4, t23, t24, row, t25, value5, value6, value7, value8, value9, value10, value11, cost, t26, value12, value13, skip, t27, productId, value14, cost0, t28, scope, t29, selectedColumns, _null = null,
var lineItemReportSettings, defaultColumns, t2, columns, productKeyMap, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, invoice, client, t16, t17, precision, t18, t19, t20, t21, t22, value, value0, t23, value1, value2, value3, value4, t24, t25, row, t26, value5, value6, value7, value8, value9, value10, value11, cost, t27, value12, value13, skip, t28, productId, value14, cost0, t29, scope, t30, selectedColumns, _null = null,
_s10_ = "quote_item",
data = A._setArrayType([], type$.JSArray_List_ReportElement),
t1 = userCompany.settings.reportSettings._map$_map;
@ -127106,17 +127106,17 @@
continue;
if (t13 && invoice.statusId === "1")
continue;
for (t18 = invoice.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = invoice.id, t21 = invoice.entityType, t22 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, value1 = invoice.dueDate, value2 = client.displayName, value3 = invoice.date, value4 = invoice.number, t23 = invoice.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t24 = t18.__interceptors$_current;
if (t24 == null)
t24 = t19._as(t24);
for (t18 = invoice.lineItems._list$_list, t19 = A._arrayInstanceType(t18), t18 = new J.ArrayIterator(t18, t18.length, t19._eval$1("ArrayIterator<1>")), t20 = invoice.id, t21 = invoice.entityType, t22 = invoice.archivedAt > 0, value = client.idNumber, value0 = client.number, t23 = invoice.usesInclusiveTaxes, value1 = invoice.dueDate, value2 = client.displayName, value3 = invoice.date, value4 = invoice.number, t24 = invoice.exchangeRate, t19 = t19._precomputed1, t17 = !t17; t18.moveNext$0();) {
t25 = t18.__interceptors$_current;
if (t25 == null)
t25 = t19._as(t25);
row = A._setArrayType([], t12);
for (t25 = new J.ArrayIterator(t3, t3.length, t5), value5 = t24.productKey, value6 = t24.discount, value7 = t24.notes, value8 = t24.customValue4, value9 = t24.customValue3, value10 = t24.customValue2, value11 = t24.customValue1, cost = t24.productCost, t26 = cost !== 0, value12 = t24.quantity, value13 = t24.cost, skip = false; t25.moveNext$0();) {
t27 = t25.__interceptors$_current;
if (t27 == null)
t27 = t6._as(t27);
for (t26 = new J.ArrayIterator(t3, t3.length, t5), value5 = t25.productKey, value6 = t25.discount, value7 = t25.notes, value8 = t25.customValue4, value9 = t25.customValue3, value10 = t25.customValue2, value11 = t25.customValue1, cost = t25.productCost, t27 = cost !== 0, value12 = t25.quantity, value13 = t25.cost, skip = false; t26.moveNext$0();) {
t28 = t26.__interceptors$_current;
if (t28 == null)
t28 = t6._as(t28);
productId = productKeyMap.$index(0, value5);
switch (t27.index) {
switch (t28.index) {
case 2:
value14 = value13;
break;
@ -127128,12 +127128,12 @@
break;
case 5:
case 6:
if (t26)
if (t27)
cost0 = cost;
else
cost0 = productId == null ? 0 : t1.$index(0, productId).cost;
value14 = (t24.total$2(0, invoice, precision) - t24.taxAmount$2(invoice, precision)) / t23 - cost0;
if (t27 === B.QuoteItemReportFields_6 && cost0 !== 0)
value14 = (t25.total$2(0, invoice, precision) - t25.taxAmount$2(invoice, precision)) / t24 - cost0;
if (t28 === B.QuoteItemReportFields_6 && cost0 !== 0)
value14 = A.S(A.round(value14 / cost0 * 100, 2)) + "%";
break;
case 9:
@ -127152,7 +127152,7 @@
value14 = value7;
break;
case 7:
value14 = t24.total$2(0, invoice, precision);
value14 = t23 ? t25.total$2(0, invoice, precision) : t25.total$2(0, invoice, precision) + t25.taxAmount$2(invoice, precision);
break;
case 0:
value14 = value5;
@ -127176,23 +127176,23 @@
value14 = value1;
break;
case 20:
value14 = t24.get$hasTaxes();
value14 = t25.get$hasTaxes();
break;
case 21:
value14 = t24.get$taxRates();
value14 = t25.get$taxRates();
break;
case 22:
value14 = t24.get$taxNames();
value14 = t25.get$taxNames();
break;
case 23:
value14 = t24.taxAmount$2(invoice, precision);
value14 = t25.taxAmount$2(invoice, precision);
break;
case 24:
value14 = t24.total$2(0, invoice, precision) - t24.taxAmount$2(invoice, precision);
value14 = t23 ? t25.total$2(0, invoice, precision) - t25.taxAmount$2(invoice, precision) : t25.total$2(0, invoice, precision);
break;
case 25:
t28 = t9.$index(0, t16);
value14 = t28 == null ? _null : t28.name;
t29 = t9.$index(0, t16);
value14 = t29 == null ? _null : t29.name;
if (value14 == null)
value14 = "";
break;
@ -127203,32 +127203,32 @@
value14 = value;
break;
case 26:
t28 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t28).dependOnInheritedWidgetOfExactType$1$0(t8);
t28 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t28.toString;
t29 = $.$get$navigatorKey();
scope = $.WidgetsBinding__instance.WidgetsBinding__buildOwner._globalKeyRegistry.$index(0, t29).dependOnInheritedWidgetOfExactType$1$0(t8);
t29 = scope == null ? _null : t7._as(J.$index$asx(scope.localizationsState._typeToResources, B.Type_AppLocalization_KyD));
t29.toString;
if (invoice.get$isActive())
t29 = "active";
t30 = "active";
else
t29 = t22 && t17 ? "archived" : "deleted";
value14 = t28.lookup$1(t29);
t30 = t22 && t17 ? "archived" : "deleted";
value14 = t29.lookup$1(t30);
break;
default:
value14 = "";
}
if (!A.ReportResult_matchField(A.EnumUtils_parse(t27), _null, reportsUIState, userCompany, value14))
if (!A.ReportResult_matchField(A.EnumUtils_parse(t28), _null, reportsUIState, userCompany, value14))
skip = true;
t28 = J.getInterceptor$(value14);
if (t28.get$runtimeType(value14) === B.Type_bool_lhE)
t29 = J.getInterceptor$(value14);
if (t29.get$runtimeType(value14) === B.Type_bool_lhE)
row.push(new A.ReportBoolValue(value14, t21, t20));
else if (t28.get$runtimeType(value14) === B.Type_double_K1J || t28.get$runtimeType(value14) === B.Type_int_tHn) {
if (t27 === B.QuoteItemReportFields_4)
t27 = _null;
else if (t27 === B.QuoteItemReportFields_5 || t27 === B.QuoteItemReportFields_3)
t27 = t15 ? "1" : t11;
else if (t29.get$runtimeType(value14) === B.Type_double_K1J || t29.get$runtimeType(value14) === B.Type_int_tHn) {
if (t28 === B.QuoteItemReportFields_4)
t28 = _null;
else if (t28 === B.QuoteItemReportFields_5 || t28 === B.QuoteItemReportFields_3)
t28 = t15 ? "1" : t11;
else
t27 = t16;
row.push(new A.ReportNumberValue(value14, _null, t27, t21, t20));
t28 = t16;
row.push(new A.ReportNumberValue(value14, _null, t28, t21, t20));
} else
row.push(new A.ReportStringValue(value14, t21, t20));
}
@ -391336,6 +391336,13 @@
$signature: 3059
};
A.InvoiceItemEntity.prototype = {
total$2(_, invoice, precision) {
var total = this.quantity * this.cost,
t1 = this.discount;
if (t1 !== 0)
total = invoice.isAmountDiscount ? total - t1 : total - t1 / 100 * total;
return A.round(total, precision);
},
taxAmount$2(invoice, precision) {
var _this = this,
t1 = new A.InvoiceItemEntity_taxAmount_calculateTaxAmount(_this, invoice, precision);
@ -391344,13 +391351,6 @@
get$clone(_) {
return this.rebuild$1(new A.InvoiceItemEntity_clone_closure());
},
total$2(_, invoice, precision) {
var total = this.quantity * this.cost,
t1 = this.discount;
if (t1 !== 0)
total = invoice.isAmountDiscount ? total - t1 : total - t1 / 100 * total;
return A.round(total, precision);
},
get$isEmpty(_) {
var t1, _this = this;
if (_this.productKey.length === 0)