From 0a77e571fe66f4372d465f32ac0fcfcc9a04196f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 17 Jul 2021 20:36:51 +1000 Subject: [PATCH] Fixes for uses_inclusive_taxes --- app/Jobs/Util/Import.php | 7 +++++++ app/Models/Invoice.php | 1 + 2 files changed, 8 insertions(+) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index bbee05114e8b..111212195505 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -430,6 +430,9 @@ class Import implements ShouldQueue private function transformCompanyData(array $data): array { + nlog("pre transformed"); + nlog($data['settings']); + $company_settings = CompanySettings::defaults(); if (array_key_exists('settings', $data)) { @@ -451,6 +454,9 @@ class Import implements ShouldQueue $data['settings'] = $company_settings; } + + nlog("transformed Settings"); + nlog($data['settings']); return $data; } @@ -566,6 +572,7 @@ class Import implements ShouldQueue $model_query = $model::where($column, $value) ->where('company_id', $this->company->id) + ->withTrashed() ->exists(); if($model_query) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 75c3e314a86f..34aa257d3129 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -93,6 +93,7 @@ class Invoice extends BaseModel 'exchange_rate', 'subscription_id', 'auto_bill_enabled', + 'uses_inclusive_taxes', ]; protected $casts = [