mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadidas tarifas encuadernacion por horas para los cosidos
This commit is contained in:
@ -189,4 +189,25 @@ class TarifaEncuadernacionLineaModel extends \App\Models\GoBaseModel
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function removeAllEncuadernacionLineasForTarifa($tarifaId = -1, $datetime = null, $delete_flag=1){
|
||||
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select('t1.id')
|
||||
->join("tarifa_encuadernacion_tiradas t2", "t1.tirada_encuadernacion_id = t2.id", "left")
|
||||
->join("tarifa_encuadernacion t3", "t2.tarifa_encuadernacion_id = t3.id", "left")
|
||||
->where("t3.id", $tarifaId);
|
||||
|
||||
|
||||
$ids = $builder->get()->getResultArray();
|
||||
foreach($ids as $id){
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->set(["t1.deleted_at" => $datetime->format('Y-m-d H:i:s'),
|
||||
"t1.is_deleted" => $delete_flag])
|
||||
->where('t1.id', $id["id"])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user