Fixes for uses_inclusive_taxes

This commit is contained in:
David Bomba 2021-07-17 20:36:51 +10:00
parent 3605b18d2a
commit 0a77e571fe
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -93,6 +93,7 @@ class Invoice extends BaseModel
'exchange_rate',
'subscription_id',
'auto_bill_enabled',
'uses_inclusive_taxes',
];
protected $casts = [