1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #6281 from turbo124/v5-develop

Fixes for checking constraints
This commit is contained in:
David Bomba 2021-07-16 16:55:26 +10:00 committed by GitHub
commit e1e1787d08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -561,6 +561,7 @@ class Import implements ShouldQueue
$model_query = (new $model())
->query()
->where($column, $value)
->where('company_id', $this->company->id)
->exists();
if($model_query)

View File

@ -63,7 +63,8 @@ class ClientRepository extends BaseRepository
}
$client->fill($data);
$client->save();
if (!isset($client->number) || empty($client->number)) {
$client->number = $this->getNextClientNumber($client);
}