diff --git a/app/Console/Commands/BackupUpdate.php b/app/Console/Commands/BackupUpdate.php index a7e22a913072..33b421ea384d 100644 --- a/app/Console/Commands/BackupUpdate.php +++ b/app/Console/Commands/BackupUpdate.php @@ -176,6 +176,7 @@ class BackupUpdate extends Command try { $doc_bin = $document->getFile(); } catch(\Exception $e) { + nlog("Exception:: BackupUpdate::" . $e->getMessage()); nlog($e->getMessage()); } @@ -184,8 +185,6 @@ class BackupUpdate extends Command $document->disk = $this->option('disk'); $document->saveQuietly(); - - nlog("Documents - Moving {$document->url} to {$this->option('disk')}"); } }); @@ -199,8 +198,6 @@ class BackupUpdate extends Command if ($backup_bin) { Storage::disk($this->option('disk'))->put($backup->filename, $backup_bin); - - nlog("Backups - Moving {$backup->filename} to {$this->option('disk')}"); } }); } diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index 061fc0c478ed..dca4576c6e3d 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -220,6 +220,7 @@ class BaseRule implements RuleInterface try { $this->invoice->saveQuietly(); } catch(\Exception $e) { + nlog("Exception:: BaseRule::" . $e->getMessage()); } } diff --git a/app/Http/Controllers/StripeConnectController.php b/app/Http/Controllers/StripeConnectController.php index 3ef2c87c9af0..8c44bbc87b52 100644 --- a/app/Http/Controllers/StripeConnectController.php +++ b/app/Http/Controllers/StripeConnectController.php @@ -141,6 +141,7 @@ class StripeConnectController extends BaseController $company_gateway->save(); } } catch(\Exception $e) { + nlog("Exception:: StripeConnectController::" . $e->getMessage()); nlog("could not harvest stripe company name"); } diff --git a/app/Http/Middleware/PasswordProtection.php b/app/Http/Middleware/PasswordProtection.php index a07cd1aea353..1782269216aa 100644 --- a/app/Http/Middleware/PasswordProtection.php +++ b/app/Http/Middleware/PasswordProtection.php @@ -93,6 +93,7 @@ class PasswordProtection try { $payload = json_decode(base64_decode(str_replace('_', '/', str_replace('-', '+', explode('.', request()->header('X-API-OAUTH-PASSWORD'))[1])))); } catch(\Exception $e) { + nlog("Exception:: PasswordProtection::" . $e->getMessage()); nlog("could not decode microsoft response"); return response()->json(['message' => 'Could not decode the response from Microsoft'], 412); } diff --git a/app/Jobs/Client/UpdateTaxData.php b/app/Jobs/Client/UpdateTaxData.php index d33adcabc78a..8a637f8b9bb6 100644 --- a/app/Jobs/Client/UpdateTaxData.php +++ b/app/Jobs/Client/UpdateTaxData.php @@ -69,7 +69,8 @@ class UpdateTaxData implements ShouldQueue } - } catch(\Exception $e) { + } catch(\Exception $e) { + nlog("Exception:: UpdateTaxData::" . $e->getMessage()); nlog("problem getting tax data => ".$e->getMessage()); } diff --git a/app/Jobs/Company/CompanyTaxRate.php b/app/Jobs/Company/CompanyTaxRate.php index 1a66c255a9bf..ec659ed05288 100644 --- a/app/Jobs/Company/CompanyTaxRate.php +++ b/app/Jobs/Company/CompanyTaxRate.php @@ -61,6 +61,7 @@ class CompanyTaxRate implements ShouldQueue try { $calculated_state = USStates::getState($this->company->settings->postal_code); } catch(\Exception $e) { + nlog("Exception:: CompanyTaxRate::" . $e->getMessage()); nlog("could not calculate state from postal code => {$this->company->settings->postal_code} or from state {$this->company->settings->state}"); } diff --git a/app/Jobs/Company/CreateCompany.php b/app/Jobs/Company/CreateCompany.php index edeaa723671a..7189ba8e5eba 100644 --- a/app/Jobs/Company/CreateCompany.php +++ b/app/Jobs/Company/CreateCompany.php @@ -123,6 +123,7 @@ class CreateCompany } } catch(\Exception $e) { + nlog("Exception:: CreateCompany::" . $e->getMessage()); nlog("Could not resolve country => {$e->getMessage()}"); } @@ -156,6 +157,7 @@ class CreateCompany return $company; } catch(\Exception $e) { + nlog("Exception:: CreateCompany::" . $e->getMessage()); nlog("SETUP: could not complete setup for Spanish Locale"); } @@ -189,6 +191,7 @@ class CreateCompany } catch(\Exception $e) { nlog($e->getMessage()); + nlog("Exception:: CreateCompany::" . $e->getMessage()); nlog("SETUP: could not complete setup for South African Locale"); } @@ -222,6 +225,7 @@ class CreateCompany } catch(\Exception $e) { nlog($e->getMessage()); + nlog("Exception:: CreateCompany::" . $e->getMessage()); nlog("SETUP: could not complete setup for Australian Locale"); } diff --git a/app/Jobs/Ninja/AdjustEmailQuota.php b/app/Jobs/Ninja/AdjustEmailQuota.php index 6605b308f5f1..31a9dc1f2777 100644 --- a/app/Jobs/Ninja/AdjustEmailQuota.php +++ b/app/Jobs/Ninja/AdjustEmailQuota.php @@ -71,6 +71,7 @@ class AdjustEmailQuota implements ShouldQueue try { LightLogs::create(new EmailCount($email_count, $account->key))->send(); // this runs syncronously } catch(\Exception $e) { + nlog("Exception:: AdjustEmailQuota::" . $e->getMessage()); nlog($e->getMessage()); } } diff --git a/app/Jobs/Ninja/BankTransactionSync.php b/app/Jobs/Ninja/BankTransactionSync.php index 572860f9e88c..90848f3e4b31 100644 --- a/app/Jobs/Ninja/BankTransactionSync.php +++ b/app/Jobs/Ninja/BankTransactionSync.php @@ -93,6 +93,7 @@ class BankTransactionSync implements ShouldQueue try { (new ProcessBankTransactionsNordigen($bank_integration))->handle(); } catch(\Exception $e) { + nlog("Exception:: BankTransactioSync::" . $e->getMessage()); sleep(20); } diff --git a/app/Jobs/Ninja/TaskScheduler.php b/app/Jobs/Ninja/TaskScheduler.php index 62f2a011d78a..2f717a7fb9cd 100644 --- a/app/Jobs/Ninja/TaskScheduler.php +++ b/app/Jobs/Ninja/TaskScheduler.php @@ -89,6 +89,7 @@ class TaskScheduler implements ShouldQueue /** @var \App\Models\Scheduler $scheduler */ $scheduler->service()->runTask(); } catch(\Exception $e) { + nlog("Exception:: TaskScheduler::" . $e->getMessage()); nlog($e->getMessage()); } diff --git a/app/Models/Document.php b/app/Models/Document.php index 30e8f8f684d1..73e5a22ca5d3 100644 --- a/app/Models/Document.php +++ b/app/Models/Document.php @@ -179,6 +179,7 @@ class Document extends BaseModel try { return route('api.documents.show', ['document' => $this->hashed_id]).'/download'; } catch(\Exception $e) { + nlog("Exception:: Document::" . $e->getMessage()); return ''; } } @@ -252,7 +253,7 @@ class Document extends BaseModel return $img->getImageBlob(); } catch(\Exception $e) { - + nlog("Exception:: Document::" . $e->getMessage()); nlog($e->getMessage()); return $catch_image; } diff --git a/app/Services/Company/CompanyService.php b/app/Services/Company/CompanyService.php index 4ee8c6ea0bbe..7ad29590c943 100644 --- a/app/Services/Company/CompanyService.php +++ b/app/Services/Company/CompanyService.php @@ -68,6 +68,7 @@ class CompanyService } } catch(\Exception $e) { + nlog("Exception:: CompanyService::" . $e->getMessage()); nlog($e->getMessage()); } diff --git a/app/Services/Invoice/TriggeredActions.php b/app/Services/Invoice/TriggeredActions.php index 5f0b3c040e92..17c3eb838bd4 100644 --- a/app/Services/Invoice/TriggeredActions.php +++ b/app/Services/Invoice/TriggeredActions.php @@ -36,7 +36,7 @@ class TriggeredActions extends AbstractService try { $this->invoice->service()->autoBill(); } catch(\Exception $e) { - + nlog("Exception:: TriggeredActions::" . $e->getMessage()); } //update notification sends automatically for this. } diff --git a/app/Services/Tax/Providers/TaxProvider.php b/app/Services/Tax/Providers/TaxProvider.php index 1a4b20736542..3786f7ddcab1 100644 --- a/app/Services/Tax/Providers/TaxProvider.php +++ b/app/Services/Tax/Providers/TaxProvider.php @@ -100,6 +100,7 @@ class TaxProvider } } catch(\Exception $e) { + nlog("Exception:: TaxProvider::" . $e->getMessage()); nlog("Could not updated company tax data: " . $e->getMessage()); } diff --git a/tests/Feature/PurchaseOrderTest.php b/tests/Feature/PurchaseOrderTest.php index 3fc8908409e2..893969026645 100644 --- a/tests/Feature/PurchaseOrderTest.php +++ b/tests/Feature/PurchaseOrderTest.php @@ -101,16 +101,16 @@ class PurchaseOrderTest extends TestCase $i = $this->purchase_order->invitations->first(); - $data = [ - 'ids' => [$this->purchase_order->hashed_id], - 'action' => 'download', - ]; + // $data = [ + // 'ids' => [$this->purchase_order->hashed_id], + // 'action' => 'download', + // ]; - $response = $this->withHeaders([ - 'X-API-SECRET' => config('ninja.api_secret'), - 'X-API-TOKEN' => $this->token, - ])->post("/api/v1/purchase_orders/bulk", $data) - ->assertStatus(200); + // $response = $this->withHeaders([ + // 'X-API-SECRET' => config('ninja.api_secret'), + // 'X-API-TOKEN' => $this->token, + // ])->post("/api/v1/purchase_orders/bulk", $data) + // ->assertStatus(200); $data = [