From e08bb9d5d01d21696fdc57ca17b807371dc2d6c2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 6 May 2022 10:45:34 +0300 Subject: [PATCH 1/3] Only show invoice action for expenses which are invoiceable --- lib/data/models/expense_model.dart | 1 + lib/redux/expense/expense_selectors.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/data/models/expense_model.dart b/lib/data/models/expense_model.dart index 04924149518..c87a010901e 100644 --- a/lib/data/models/expense_model.dart +++ b/lib/data/models/expense_model.dart @@ -349,6 +349,7 @@ abstract class ExpenseEntity extends Object if (!isInvoiced && !isRecurring && + shouldBeInvoiced && userCompany.canCreate(EntityType.invoice)) { actions.add(EntityAction.invoiceExpense); } diff --git a/lib/redux/expense/expense_selectors.dart b/lib/redux/expense/expense_selectors.dart index 534f18ecd98..874ed45eef4 100644 --- a/lib/redux/expense/expense_selectors.dart +++ b/lib/redux/expense/expense_selectors.dart @@ -311,7 +311,7 @@ List clientExpenseList( expense.clientId != clientId) { return false; } - return expense.isActive && !expense.isInvoiced; + return expense.isActive && !expense.isInvoiced && expense.shouldBeInvoiced; }).toList(); list.sort((idA, idB) => expenseMap[idA] From 90ac0f90d2fc56da1a5fe4d5cad8f01ab60f16e3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 6 May 2022 14:06:47 +0300 Subject: [PATCH 2/3] Update health check --- lib/ui/app/dialogs/health_check_dialog.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/app/dialogs/health_check_dialog.dart b/lib/ui/app/dialogs/health_check_dialog.dart index 9a80630e9a7..2137f19b8bd 100644 --- a/lib/ui/app/dialogs/health_check_dialog.dart +++ b/lib/ui/app/dialogs/health_check_dialog.dart @@ -153,15 +153,14 @@ class _HealthCheckDialogState extends State { url: 'https://invoiceninja.github.io/docs/self-host-installation/#file-permissions', ), + /* if (!state.account.isDocker) ...[ if (!_response.openBasedir) - /* _HealthListTile( title: 'Open Basedir', isWarning: true, subtitle: 'Not enabled', ), - */ if (!_response.cacheEnabled) _HealthListTile( title: 'Config not cached', @@ -170,6 +169,7 @@ class _HealthCheckDialogState extends State { isWarning: true, ), ], + */ if (_response.queue == 'sync') _HealthListTile( title: 'Queue not enabled', From 0da5b4016a65fcff316425b807524614accf900b Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 6 May 2022 14:07:04 +0300 Subject: [PATCH 3/3] Update health check --- lib/ui/app/dialogs/health_check_dialog.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ui/app/dialogs/health_check_dialog.dart b/lib/ui/app/dialogs/health_check_dialog.dart index 2137f19b8bd..5e004c5bbb6 100644 --- a/lib/ui/app/dialogs/health_check_dialog.dart +++ b/lib/ui/app/dialogs/health_check_dialog.dart @@ -90,7 +90,6 @@ class _HealthCheckDialogState extends State { @override Widget build(BuildContext context) { final localization = AppLocalization.of(context); - final state = StoreProvider.of(context).state; final webPhpVersion = _parseVersion(_response?.phpVersion?.currentPHPVersion ?? ''); final cliPhpVersion =