Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Currency exchange rate will not be saved when rate is 0.
James Cole55b6d711f3a4
diff --git a/app/Helpers/Filter/CountAttachmentsFilter.php b/app/Helpers/Filter/CountAttachmentsFilter.phpindex 9ca0e79438..3103de0e54 100644--- a/app/Helpers/Filter/CountAttachmentsFilter.php+++ b/app/Helpers/Filter/CountAttachmentsFilter.php@@ -64,4 +64,4 @@ class CountAttachmentsFilter implements FilterInterfacereturn $set;}-}\ No newline at end of file+}diff --git a/app/Helpers/Filter/SplitIndicatorFilter.php b/app/Helpers/Filter/SplitIndicatorFilter.phpindex 73116232e1..5d59ce5496 100644--- a/app/Helpers/Filter/SplitIndicatorFilter.php+++ b/app/Helpers/Filter/SplitIndicatorFilter.php@@ -64,4 +64,4 @@ class SplitIndicatorFilter implements FilterInterfacereturn $set;}-}\ No newline at end of file+}diff --git a/app/Services/Bunq/Object/Image.php b/app/Services/Bunq/Object/Image.phpindex dc4370fcc6..11d83f9e5b 100644--- a/app/Services/Bunq/Object/Image.php+++ b/app/Services/Bunq/Object/Image.php@@ -59,4 +59,4 @@ class Image extends BunqObjectdie(sprintf('Cannot convert %s to array.', get_class($this)));}-}\ No newline at end of file+}diff --git a/app/Services/Bunq/Object/LabelUser.php b/app/Services/Bunq/Object/LabelUser.phpindex 2ced566153..c3eaacc5d9 100644--- a/app/Services/Bunq/Object/LabelUser.php+++ b/app/Services/Bunq/Object/LabelUser.php@@ -87,4 +87,4 @@ class LabelUser extends BunqObject{die(sprintf('Cannot convert %s to array.', get_class($this)));}-}\ No newline at end of file+}diff --git a/app/Services/Currency/FixerIOv2.php b/app/Services/Currency/FixerIOv2.phpindex eb43ba6cf9..12b9b76dbd 100644--- a/app/Services/Currency/FixerIOv2.php+++ b/app/Services/Currency/FixerIOv2.php@@ -92,11 +92,13 @@ class FixerIOv2 implements ExchangeRateInterface}if (null !== $content) {$code = $toCurrency->code;- $rate = isset($content['rates'][$code]) ? $content['rates'][$code] : '0';+ $rate = $content['rates'][$code] ?? 0;}Log::debug('Got the following rates from Fixer: ', $content['rates'] ?? []);$exchangeRate->rate = $rate;- $exchangeRate->save();+ if ($rate !== 0) {+ $exchangeRate->save();+ }return $exchangeRate;}diff --git a/app/Services/Internal/Destroy/CategoryDestroyService.php b/app/Services/Internal/Destroy/CategoryDestroyService.phpindex 08e163313c..2f1440a513 100644--- a/app/Services/Internal/Destroy/CategoryDestroyService.php+++ b/app/Services/Internal/Destroy/CategoryDestroyService.php@@ -43,4 +43,4 @@ class CategoryDestroyServiceLog::error(sprintf('Could not delete category: %s', $e->getMessage())); // @codeCoverageIgnore}}-}\ No newline at end of file+}diff --git a/app/Services/Internal/Destroy/CurrencyDestroyService.php b/app/Services/Internal/Destroy/CurrencyDestroyService.phpindex 58689f349e..04cf37b279 100644--- a/app/Services/Internal/Destroy/CurrencyDestroyService.php+++ b/app/Services/Internal/Destroy/CurrencyDestroyService.php@@ -45,4 +45,4 @@ class CurrencyDestroyService}}-}\ No newline at end of file+}diff --git a/app/Services/Internal/Update/CategoryUpdateService.php b/app/Services/Internal/Update/CategoryUpdateService.phpindex 9aaa335afc..677a71d4b8 100644--- a/app/Services/Internal/Update/CategoryUpdateService.php+++ b/app/Services/Internal/Update/CategoryUpdateService.php@@ -45,4 +45,4 @@ class CategoryUpdateServicereturn $category;}-}\ No newline at end of file+}diff --git a/app/Services/Internal/Update/CurrencyUpdateService.php b/app/Services/Internal/Update/CurrencyUpdateService.phpindex 416282f67e..c5be7786ba 100644--- a/app/Services/Internal/Update/CurrencyUpdateService.php+++ b/app/Services/Internal/Update/CurrencyUpdateService.php@@ -47,4 +47,4 @@ class CurrencyUpdateServicereturn $currency;}-}\ No newline at end of file+}diff --git a/database/migrations/2018_03_19_141348_changes_for_v472.php b/database/migrations/2018_03_19_141348_changes_for_v472.phpindex 6d675f098e..0960d6e381 100644--- a/database/migrations/2018_03_19_141348_changes_for_v472.php+++ b/database/migrations/2018_03_19_141348_changes_for_v472.php@@ -1,4 +1,5 @@<?php+declare(strict_types=1);use Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;