|
@@ -63,7 +63,7 @@ class VehiculoController extends AuthController {
|
|
|
$modelo->load($this->req->getBodyParams(), '');
|
|
|
|
|
|
$placa = $modelo->placa;
|
|
|
- $existePlaca = $this->modelClass::find()->where(['placa' => $placa])->andWhere(['<>', 'id', $id])->exists();
|
|
|
+ $existePlaca = $this->modelClass::find()->where(['placa' => $placa])->andWhere(['<>', 'id', $id])->exists()->andWhere(['eliminado'])->is_null();
|
|
|
|
|
|
if ($existePlaca) {
|
|
|
return (new Respuesta())
|
|
@@ -73,7 +73,7 @@ class VehiculoController extends AuthController {
|
|
|
$modelo->load($this->req->getBodyParams(), '');
|
|
|
|
|
|
$serie = $modelo->serie;
|
|
|
- $existeSerie = $this->modelClass::find()->where(['serie' => $serie])->andWhere(['<>', 'id', $id])->exists();
|
|
|
+ $existeSerie = $this->modelClass::find()->where(['serie' => $serie])->andWhere(['<>', 'id', $id])->exists()->andWhere(['eliminado'])->is_null();
|
|
|
|
|
|
if ($existeSerie) {
|
|
|
return (new Respuesta())
|