diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index 45cdc1b10b19..f4817e56ac60 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -65878,7 +65878,7 @@ if (B.JSString_methods.startsWith$1(url, "https://invoicing.co")) secret = ""; t1 = type$.legacy_String; - headers = A.LinkedHashMap_LinkedHashMap$_literal(["X-CLIENT-VERSION", "5.0.116", "X-API-SECRET", secret, "X-Requested-With", "XMLHttpRequest", "Content-Type", "application/json; charset=utf-8"], t1, t1); + headers = A.LinkedHashMap_LinkedHashMap$_literal(["X-CLIENT-VERSION", "5.0.117", "X-API-SECRET", secret, "X-Requested-With", "XMLHttpRequest", "Content-Type", "application/json; charset=utf-8"], t1, t1); if (token.length !== 0) headers.$indexSet(0, "X-API-Token", token); if ((idToken == null ? "" : idToken).length !== 0) @@ -65902,9 +65902,9 @@ t2 = response.get$body(response).length > 200 ? B.JSString_methods.substring$2(response.get$body(response), 0, 200) : response.get$body(response); throw A.wrapException("Error: please check that Invoice Ninja v5 is installed on the server\n\nURL: " + url + "\n\nResponse: " + t2 + "\n\nHeaders: " + t1.toString$0(0) + "}"); } else { - t1 = A.Version__compare(A.Version_parse("5.0.116"), A.Version_parse(minClientVersion)); + t1 = A.Version__compare(A.Version_parse("5.0.117"), A.Version_parse(minClientVersion)); if (t1 < 0) - throw A.wrapException("Error: client not supported, please update to the latest version [Current v5.0.116 < Minimum v" + A.S(minClientVersion) + "]"); + throw A.wrapException("Error: client not supported, please update to the latest version [Current v5.0.117 < Minimum v" + A.S(minClientVersion) + "]"); else { t1 = A.Version__compare(A.Version_parse(serverVersion), A.Version_parse("5.0.4")); if (t1 < 0) @@ -356009,7 +356009,8 @@ response = B.JSString_methods.compareTo$1(invoiceA.dueDate, invoiceB.dueDate); break; case "next_send_date": - response = B.JSString_methods.compareTo$1(invoiceA.nextSendDatetime, invoiceB.nextSendDatetime); + t1 = invoiceA.nextSendDatetime; + response = t1.length !== 0 && invoiceB.nextSendDatetime.length !== 0 ? B.JSString_methods.compareTo$1(t1, invoiceB.nextSendDatetime) : J.compareTo$1$ns(invoiceA.nextSendDate, invoiceB.nextSendDate); break; case "assigned_to": t1 = invoiceA.assignedUserId; @@ -356202,7 +356203,7 @@ if (t4 === B.EntityType_invoice) { t5 = t1.userCompanyStates; t1 = t1.uiState.selectedCompanyIndex; - t1 = t5._list[t1].userCompany.company.settings.enableEInvoice; + t1 = t5._list[t1].userCompany.company.settings.enableEInvoice === true; } else t1 = false; if (t1) @@ -391075,7 +391076,7 @@ version = "v" + (t1 == null ? "" : t1); if (version.length !== 0) version += "-"; - return B.JSString_methods.$add(version + A.getPlatformLetter(), B.JSArray_methods.get$last("5.0.116".split("."))); + return B.JSString_methods.$add(version + A.getPlatformLetter(), B.JSArray_methods.get$last("5.0.117".split("."))); }, get$historyList() { var _this = this, @@ -488912,7 +488913,13 @@ case "last_sent_date": return A.Text$(A.formatDate(invoice.lastSentDate, context, true, true, false), _null, _null, _null, _null, _null, _null, _null, _null, _null); case "next_send_date": - return A.Text$(invoice.entityType === B.EntityType_invoice && invoice.statusId === "4" ? "" : A.formatDate(invoice.nextSendDatetime, context, true, false, true), _null, _null, _null, _null, _null, _null, _null, _null, _null); + if (invoice.entityType === B.EntityType_invoice && invoice.statusId === "4") + t1 = ""; + else { + t1 = invoice.nextSendDatetime; + t1 = t1.length !== 0 ? A.formatDate(t1, context, true, false, true) : A.formatDate(invoice.nextSendDate, context, true, true, false); + } + return A.Text$(t1, _null, _null, _null, _null, _null, _null, _null, _null, _null); case "reminder1_sent": return A.Text$(A.formatDate(invoice.reminder1Sent, context, true, true, false), _null, _null, _null, _null, _null, _null, _null, _null, _null); case "reminder2_sent": @@ -489757,11 +489764,14 @@ }; A.InvoiceOverview.prototype = { build$1(context) { - var t6, creditMap, paymentMap, t7, t8, payments, colors, statuses, userCompany, color, t9, t10, t11, t12, t13, t14, t15, t16, t17, widgets, dueDateField, t18, t19, t20, relatedInvoice, relatedQuote, _this = this, _null = null, _s4_ = "date", - _s8_ = "invoice1", - _s8_0 = "invoice2", - _s8_1 = "invoice3", - _s8_2 = "invoice4", + var t6, creditMap, paymentMap, t7, t8, payments, colors, statuses, userCompany, color, t9, t10, t11, t12, t13, t14, t15, t16, t17, widgets, dueDateField, relatedInvoice, relatedQuote, _this = this, _null = null, + _s8_ = "due_date", + _s4_ = "date", + _s14_ = "next_send_date", + _s8_0 = "invoice1", + _s8_1 = "invoice2", + _s8_2 = "invoice3", + _s8_3 = "invoice4", _s10_ = "surcharge1", _s10_0 = "surcharge2", _s10_1 = "surcharge3", @@ -489864,7 +489874,7 @@ if (t8.length !== 0) B.JSArray_methods.addAll$1(widgets, A._setArrayType([new A.IconMessage(t8, B.IconData_58286_MaterialIcons_null_false, _null, _null, true, _null), new A.ListDivider(_null)], t17)); t8 = !t7; - dueDateField = !t8 || t13 ? "valid_until" : "due_date"; + dueDateField = !t8 || t13 ? "valid_until" : _s8_; t10 = type$.legacy_String; t12 = A.LinkedHashMap_LinkedHashMap$_empty(t10, t10); if (t7) @@ -489881,7 +489891,7 @@ else t6 = false; if (t6) - t12.$indexSet(0, "next_send_date", A.formatDate(invoice.nextSendDate, context, true, true, false)); + t12.$indexSet(0, _s14_, A.formatDate(invoice.nextSendDate, context, true, true, false)); t6 = invoice.partial; t7 = t9 ? _null : invoice.clientId; t12.$indexSet(0, "partial_due", A.formatNumber(t6, context, t7, _null, B.FormatNumberType_0, true, _null, t9 ? t5 : _null, true)); @@ -489892,42 +489902,46 @@ t14 = invoice.isAmountDiscount ? B.FormatNumberType_0 : B.FormatNumberType_1; t12.$indexSet(0, "discount", A.formatNumber(invoice.discount, context, t7, _null, t14, true, _null, t5, true)); if (t2 === B.EntityType_recurringInvoice) { - t5 = t1.lookup$1(B.Map_tOn4d.$index(0, invoice.frequencyId)); - t7 = A.formatDate(invoice.lastSentDate, context, true, true, false); - t14 = A.formatDate(invoice.nextSendDate, context, true, true, false); - t16 = A.formatDate(invoice.nextSendDatetime, context, false, false, true); - t18 = invoice.remainingCycles; - t18 = t18 === -1 ? t1.get$endless() : A.S(t18); - t19 = invoice.autoBill; - t20 = t1.lookup$1(t19); - if (B.JSArray_methods.contains$1(A._setArrayType(["optin", "optout"], type$.JSArray_legacy_String), t19)) - t19 = " - " + (invoice.autoBillEnabled ? t1.get$yes() : t1.get$no()); + t5 = A.LinkedHashMap_LinkedHashMap$_empty(t10, t10); + t5.$indexSet(0, "frequency", t1.lookup$1(B.Map_tOn4d.$index(0, invoice.frequencyId))); + t5.$indexSet(0, "last_sent_date", A.formatDate(invoice.lastSentDate, context, true, true, false)); + t5.$indexSet(0, _s14_, A.formatDate(invoice.nextSendDate, context, true, true, false)); + t7 = invoice.nextSendDatetime; + if (t7.length !== 0) + t5.$indexSet(0, "next_send_time", A.formatDate(t7, context, false, false, true)); + t7 = invoice.remainingCycles; + t5.$indexSet(0, "remaining_cycles", t7 === -1 ? t1.get$endless() : A.S(t7)); + t7 = invoice.autoBill; + t10 = t1.lookup$1(t7); + if (B.JSArray_methods.contains$1(A._setArrayType(["optin", "optout"], type$.JSArray_legacy_String), t7)) + t7 = " - " + (invoice.autoBillEnabled ? t1.get$yes() : t1.get$no()); else - t19 = ""; - t19 = J.$add$ansx(t20, t19); - t20 = invoice.dueDateDays; - if (t20 === "terms") - t20 = t1.get$paymentTerm(); - else if (t20 === "on_receipt") - t20 = t1.get$dueOnReceipt(); - else if (t20 === "1") - t20 = t1.get$firstDayOfTheMonth(); + t7 = ""; + t5.$indexSet(0, "auto_bill", J.$add$ansx(t10, t7)); + t7 = invoice.dueDateDays; + if (t7 === "terms") + t7 = t1.get$paymentTerm(); + else if (t7 === "on_receipt") + t7 = t1.get$dueOnReceipt(); + else if (t7 === "1") + t7 = t1.get$firstDayOfTheMonth(); else - t20 = t20 === "31" ? t1.get$lastDayOfTheMonth() : B.JSString_methods.replaceFirst$2(t1.get$dayCount(), ":count", A.S(t20)); - t12.addAll$1(0, A.LinkedHashMap_LinkedHashMap$_literal(["frequency", t5, "last_sent_date", t7, "next_send_date", t14, "next_send_time", t16, "remaining_cycles", t18, "auto_bill", t19, "due_date", t20], t10, t10)); + t7 = t7 === "31" ? t1.get$lastDayOfTheMonth() : B.JSString_methods.replaceFirst$2(t1.get$dayCount(), ":count", A.S(t7)); + t5.$indexSet(0, _s8_, t7); + t12.addAll$1(0, t5); } t5 = invoice.customValue1; if (t5.length !== 0) - t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_), A.formatCustomValue(context, _s8_, t5)); + t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_0), A.formatCustomValue(context, _s8_0, t5)); t5 = invoice.customValue2; if (t5.length !== 0) - t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_0), A.formatCustomValue(context, _s8_0, t5)); + t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_1), A.formatCustomValue(context, _s8_1, t5)); t5 = invoice.customValue3; if (t5.length !== 0) - t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_1), A.formatCustomValue(context, _s8_1, t5)); + t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_2), A.formatCustomValue(context, _s8_2, t5)); t5 = invoice.customValue4; if (t5.length !== 0) - t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_2), A.formatCustomValue(context, _s8_2, t5)); + t12.$indexSet(0, company.getCustomFieldLabel$1(_s8_3), A.formatCustomValue(context, _s8_3, t5)); t5 = _this.isFilter; if (t9) widgets.push(A.EntityListTile$(vendor, t5, vendor.get$primaryContact().email)); @@ -499821,7 +499835,8 @@ t2 = invoice.remainingCycles; return A.Text$(t2 === -1 ? t1.get$endless() : A.S(t2), _null, _null, _null, _null, _null, _null, _null, _null, _null); case "next_send_date": - return A.Text$(A.formatDate(invoice.nextSendDatetime, context, true, false, true), _null, _null, _null, _null, _null, _null, _null, _null, _null); + t1 = invoice.nextSendDatetime; + return A.Text$(t1.length !== 0 ? A.formatDate(t1, context, true, false, true) : A.formatDate(invoice.nextSendDate, context, true, true, false), _null, _null, _null, _null, _null, _null, _null, _null, _null); case "frequency": return A.Text$(t1.lookup$1(B.Map_tOn4d.$index(0, invoice.frequencyId)), _null, _null, _null, _null, _null, _null, _null, _null, _null); case "due_date_days":