Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed May 23, 2023
2 parents a6e5188 + 29163ef commit 68279df
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

// TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.116';
const String kClientVersion = '5.0.117';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down
11 changes: 8 additions & 3 deletions lib/data/models/invoice_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,13 @@ abstract class InvoiceEntity extends Object
response = invoiceA.dueDate.compareTo(invoiceB.dueDate);
break;
case InvoiceFields.nextSendDate:
response =
invoiceA.nextSendDatetime.compareTo(invoiceB.nextSendDatetime);
if (invoiceA.nextSendDatetime.isNotEmpty &&
invoiceB.nextSendDatetime.isNotEmpty) {
response =
invoiceA.nextSendDatetime.compareTo(invoiceB.nextSendDatetime);
} else {
response = invoiceA.nextSendDate.compareTo(invoiceB.nextSendDate);
}
break;
case EntityFields.assignedTo:
final userA = userMap[invoiceA.assignedUserId] ?? UserEntity();
Expand Down Expand Up @@ -1066,7 +1071,7 @@ abstract class InvoiceEntity extends Object
if (!isRecurring) {
actions.add(EntityAction.printPdf);
actions.add(EntityAction.download);
if (isInvoice && state.company.settings.enableEInvoice) {
if (isInvoice && state.company.settings.enableEInvoice == true) {
actions.add(EntityAction.eInvoice);
}
}
Expand Down
6 changes: 4 additions & 2 deletions lib/ui/invoice/invoice_presenter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ class InvoicePresenter extends EntityPresenter {
case InvoiceFields.nextSendDate:
return Text(invoice.isPaid
? ''
: formatDate(invoice.nextSendDatetime, context,
showTime: true, showSeconds: false));
: invoice.nextSendDatetime.isNotEmpty
? formatDate(invoice.nextSendDatetime, context,
showTime: true, showSeconds: false)
: formatDate(invoice.nextSendDate, context));
case InvoiceFields.reminder1Sent:
return Text(formatDate(invoice.reminder1Sent, context));
case InvoiceFields.reminder2Sent:
Expand Down
7 changes: 4 additions & 3 deletions lib/ui/invoice/view/invoice_view_overview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ class InvoiceOverview extends StatelessWidget {
formatDate(invoice.lastSentDate, context),
RecurringInvoiceFields.nextSendDate:
formatDate(invoice.nextSendDate, context),
RecurringInvoiceFields.nextSendTime: formatDate(
invoice.nextSendDatetime, context,
showDate: false, showTime: true, showSeconds: false),
if (invoice.nextSendDatetime.isNotEmpty)
RecurringInvoiceFields.nextSendTime: formatDate(
invoice.nextSendDatetime, context,
showDate: false, showTime: true, showSeconds: false),
RecurringInvoiceFields.remainingCycles: invoice.remainingCycles == -1
? localization.endless
: '${invoice.remainingCycles}',
Expand Down
6 changes: 4 additions & 2 deletions lib/ui/recurring_invoice/recurring_invoice_presenter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ class RecurringInvoicePresenter extends EntityPresenter {
? localization.endless
: '${invoice.remainingCycles}');
case RecurringInvoiceFields.nextSendDate:
return Text(formatDate(invoice.nextSendDatetime, context,
showTime: true, showSeconds: false));
return Text(invoice.nextSendDatetime.isNotEmpty
? formatDate(invoice.nextSendDatetime, context,
showTime: true, showSeconds: false)
: formatDate(invoice.nextSendDate, context));
case RecurringInvoiceFields.frequency:
return Text(localization.lookup(kFrequencies[invoice.frequencyId]));
case RecurringInvoiceFields.dueDateDays:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.foss.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.116+116
version: 5.0.117+117
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.116+116
version: 5.0.117+117
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invoiceninja
version: '5.0.116'
version: '5.0.117
summary: Create invoices, accept payments, track expenses & time-tasks
description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead
Expand Down

0 comments on commit 68279df

Please sign in to comment.