mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en preciopliego2
This commit is contained in:
@ -336,7 +336,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
public function getMaquinaImpresionForPresupuesto($is_rotativa, $tarifa_tipo, $papel_impresion_id = -1)
|
||||
public function getMaquinaImpresionForPresupuesto($is_rotativa, $tarifa_tipo, $tirada, $papel_impresion_id = -1)
|
||||
{
|
||||
/*
|
||||
1.-> tarifa_Tipo impresion
|
||||
@ -362,7 +362,9 @@ class MaquinaModel extends \App\Models\GoBaseModel
|
||||
->where("t2.is_deleted", 0)
|
||||
->where("t2.tipo", $tarifa_tipo)
|
||||
->where("t3.papel_impresion_id", $papel_impresion_id)
|
||||
->where("t3.active", 1);
|
||||
->where("t3.active", 1)
|
||||
->where("t1.min <=", $tirada)
|
||||
->where("t1.max >=", $tirada);
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
@ -15,10 +15,10 @@ class PresupuestoService extends BaseService
|
||||
$uso = 'interior';
|
||||
$tipo = 'negro';
|
||||
$cantidad = (object)array(
|
||||
'paginas' => 100,
|
||||
'tirada' => 50,
|
||||
'merma' => 5,
|
||||
'merma_portada' => 1,
|
||||
'paginas' => 200,
|
||||
'tirada' => 500,
|
||||
'merma' => 10,
|
||||
'merma_portada' => 10,
|
||||
);
|
||||
|
||||
|
||||
@ -45,7 +45,8 @@ class PresupuestoService extends BaseService
|
||||
$maquinas = $maquina_model->getMaquinaImpresionForPresupuesto(
|
||||
is_rotativa: $papel->rotativa,
|
||||
tarifa_tipo: 'negro',
|
||||
papel_impresion_id: $papel->id
|
||||
papel_impresion_id: $papel->id,
|
||||
tirada: $cantidad->tirada+$cantidad->merma
|
||||
);
|
||||
echo '<pre>';
|
||||
echo '<p>Para papel impresion: ' . $papel->nombre . '</p>';
|
||||
|
||||
Reference in New Issue
Block a user