mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
planning plana
This commit is contained in:
@ -61,9 +61,9 @@ class OrdenTrabajoDate extends Model
|
||||
// Callbacks
|
||||
protected $allowCallbacks = true;
|
||||
protected $beforeInsert = [];
|
||||
protected $afterInsert = ["updateOrdenTrabajoUser"];
|
||||
protected $afterInsert = [];
|
||||
protected $beforeUpdate = [];
|
||||
protected $afterUpdate = ["updateOrdenTrabajoUser"];
|
||||
protected $afterUpdate = [];
|
||||
protected $beforeFind = [];
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
@ -102,7 +102,7 @@ class OrdenTrabajoDate extends Model
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
protected function updateUserDateMap($data,$values){
|
||||
public function updateUserDateMap($orden_trabajo_id,$data){
|
||||
$mapping = [
|
||||
"fecha_encuadernado_at" => "encuadernacion_user_id",
|
||||
// "fecha_externo_at" => "null",
|
||||
@ -121,10 +121,10 @@ class OrdenTrabajoDate extends Model
|
||||
];
|
||||
$otUser = model(OrdenTrabajoUser::class);
|
||||
$auth_user_id = auth()->user()->id;
|
||||
foreach ($values as $key => $value) {
|
||||
foreach ($data as $key => $value) {
|
||||
if(isset($mapping[$key])){
|
||||
if($value){
|
||||
$otUser->where('orden_trabajo_id',$data['orden_trabajo_id'])
|
||||
$otUser->where('orden_trabajo_id',$orden_trabajo_id)
|
||||
->set([$mapping[$key] => $auth_user_id])
|
||||
->update();
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ use CodeIgniter\Model;
|
||||
|
||||
class TarifaExtraMaquinaModel extends Model
|
||||
{
|
||||
protected $table = 'tarifa_acabado_maquinas';
|
||||
protected $table = 'tarifa_extra_maquinas';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = TarifaExtraMaquinaEntity::class;
|
||||
|
||||
Reference in New Issue
Block a user