mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificacion en tablas tarifas acabado/manipulado. Correccion errores maquinas_defecto. Cambiados modelos y entidades tarifas acabado manipulado
This commit is contained in:
@ -255,20 +255,19 @@ if ($this->request->getPost('predeterminado') == null ) {
|
||||
return lang('MaquinasTarifasImpresions.validation.cubierta_sobrecubierta_color');
|
||||
}
|
||||
|
||||
// No se pueden duplicar valores al crear
|
||||
if($action === Editor::ACTION_CREATE){
|
||||
$builder = $this->model->select('*')
|
||||
->where(array(
|
||||
'maquina_id'=> $values['maquina_id'],
|
||||
'tipo'=> $values['tipo'],
|
||||
'uso'=> $values['uso'],
|
||||
'is_deleted'=> 0));
|
||||
$builder = $this->model->select('*')
|
||||
->where(array(
|
||||
'maquina_id'=> $values['maquina_id'],
|
||||
'tipo'=> $values['tipo'],
|
||||
'uso'=> $values['uso'],
|
||||
'is_deleted'=> 0));
|
||||
|
||||
if ($builder->countAllResults() >= 1){
|
||||
if(($action === Editor::ACTION_EDIT && $builder->get()->getFirstRow()->id != $pkey)
|
||||
|| $action === Editor::ACTION_CREATE)
|
||||
return lang('MaquinasTarifasImpresions.validation.duplicated_uso_tipo');
|
||||
|
||||
// No se pueden duplicar valores al crear o al editar
|
||||
if ($builder->countAllResults() >= 1){
|
||||
if(($action === Editor::ACTION_EDIT && $builder->get()->getFirstRow()->id != $pkey)
|
||||
|| $action === Editor::ACTION_CREATE){
|
||||
|
||||
return lang('MaquinasTarifasImpresions.validation.duplicated_uso_tipo');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user