From fd7f627ffefbae4af1e52b933ee349d44984e32c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 1 Jul 2020 16:03:46 +1000 Subject: [PATCH] Fixes for migrations - client balances! --- app/Jobs/Util/Import.php | 2 +- app/Jobs/Util/SubscriptionHandler.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index a95d568ed59a..3986ea1497e9 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -190,7 +190,7 @@ class Import implements ShouldQueue $company_ledger->adjustment = $client->balance; $company_ledger->notes = 'Migrated Client Balance'; $company_ledger->balance = $client->balance; - $company_ledger->activity_id = Activity::STORE_CLIENT; + $company_ledger->activity_id = Activity::CREATE_CLIENT; $company_ledger->save(); $client->company_ledger()->save($company_ledger); diff --git a/app/Jobs/Util/SubscriptionHandler.php b/app/Jobs/Util/SubscriptionHandler.php index fb944ce7da5e..a35ad135a682 100644 --- a/app/Jobs/Util/SubscriptionHandler.php +++ b/app/Jobs/Util/SubscriptionHandler.php @@ -99,4 +99,10 @@ class SubscriptionHandler implements ShouldQueue $subscription->delete(); } } + + public function failed($exception) + { + $exception->getMessage(); + // etc... + } }