mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
leyendo lp y pasandolas a las tablas
This commit is contained in:
@ -116,6 +116,9 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
$id = $this->model->db->insertID();
|
||||
|
||||
$lp_model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$lp_model->createForPresupuesto($id);
|
||||
|
||||
$message = lang('Basic.global.saveSuccess', [lang('Basic.global.record')]) . '.';
|
||||
|
||||
if ($thenRedirect) :
|
||||
@ -137,21 +140,6 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$this->viewData['incReiList'] = array('incidencia' => lang('Presupuestos.incidencia'), 'reimpresion' => lang('Presupuestos.reimpresion'), 'sin_cargo' => lang('Presupuestos.sinCargo'));
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
$this->viewData['papelGenericoNegroList'] = $this->getPapelGenericoNegro();
|
||||
$this->viewData['papelGenericoNegroHQList'] = $this->getPapelGenericoNegroHQ();
|
||||
$this->viewData['papelGenericoColorList'] = $this->getPapelGenericoColor();
|
||||
$this->viewData['papelGenericoColorHQList'] = $this->getPapelGenericoColorHQ();
|
||||
$this->viewData['papelGenericoCubiertaList'] = $this->getPapelGenericoCubierta();
|
||||
$this->viewData['papelGenericoSobrecubiertaList'] = $this->getPapelGenericoSobreCubierta();
|
||||
$this->viewData['papelGenericoRotativaNegroList'] = $this->getPapelGenericoRotativaNegro();
|
||||
$this->viewData['papelGenericoRotativaColorList'] = $this->getPapelGenericoRotativaColor();
|
||||
|
||||
// Tarifas
|
||||
$this->viewData['serviciosPreimpresion'] = $this->getServiciosPreimpresion();
|
||||
$this->viewData['serviciosEncuadernacion'] = $this->getServiciosEncuadernacion();
|
||||
$this->viewData['serviciosAcabado'] = $this->getServiciosAcabado();
|
||||
$this->viewData['serviciosManipulado'] = $this->getServiciosManipulado();
|
||||
|
||||
$this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
|
||||
|
||||
@ -310,34 +298,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
//$this->viewData['formaPagoList'] = $this->getFormaPagoListItems();
|
||||
//$this->viewData['tiposImpresionList'] = $this->getTiposImpresionListItems($presupuestoEntity->tipo_impresion_id ?? null);
|
||||
//$this->viewData['tipologiasLibroList'] = $this->getTipologiasLibroListItems($presupuestoEntity->tipologia_id ?? null);
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
//$this->viewData['ubicacionLibroList'] = $this->getUbicacionLibroListItems($presupuestoEntity->ubicacion_id ?? null);
|
||||
//$this->viewData['presupuestoEstadoList'] = $this->getPresupuestoEstadoListItems($presupuestoEntity->estado_id ?? null);
|
||||
//$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
//$this->viewData['papelGenericoList'] = $this->getPapelGenericoListItems($presupuestoEntity->paginas_negro_papel_id ?? null);
|
||||
//$this->viewData['papelImpresionList'] = $this->getPapelImpresionListItems($presupuestoEntity->paginas_negro_papel_impresion_id ?? null);
|
||||
//$this->viewData['maquinaList'] = $this->getMaquinaListItems($presupuestoEntity->paginas_negro_maquina_id ?? null);
|
||||
//$this->viewData['maquinasTarifasImpresionList'] = $this->getMaquinasTarifasImpresionListItems($presupuestoEntity->paginas_negro_tarifa_impresion_id ?? null);
|
||||
//$this->viewData['papelGenericoList2'] = $this->getPapelGenericoListItems2($presupuestoEntity->paginas_color_papel_id ?? null);
|
||||
/*$this->viewData['papelImpresionList2'] = $this->getPapelImpresionListItems2($presupuestoEntity->paginas_color_papel_impresion_id ?? null);
|
||||
$this->viewData['maquinaList2'] = $this->getMaquinaListItems2($presupuestoEntity->paginas_color_maquina_id ?? null);
|
||||
$this->viewData['maquinasTarifasImpresionList2'] = $this->getMaquinasTarifasImpresionListItems2($presupuestoEntity->paginas_color_tarifa_impresion_id ?? null);
|
||||
$this->viewData['papelGenericoList3'] = $this->getPapelGenericoListItems3($presupuestoEntity->paginas_portada_papel_id ?? null);
|
||||
$this->viewData['papelImpresionList3'] = $this->getPapelImpresionListItems3($presupuestoEntity->paginas_portada_papel_impresion_id ?? null);
|
||||
$this->viewData['maquinaList3'] = $this->getMaquinaListItems3($presupuestoEntity->paginas_portada_maquina_id ?? null);
|
||||
$this->viewData['maquinasTarifasImpresionList3'] = $this->getMaquinasTarifasImpresionListItems3($presupuestoEntity->paginas_portada_tarifa_impresion_id ?? null);
|
||||
$this->viewData['papelGenericoList4'] = $this->getPapelGenericoListItems4($presupuestoEntity->paginas_cubierta_papel_id ?? null);
|
||||
$this->viewData['papelImpresionList4'] = $this->getPapelImpresionListItems4($presupuestoEntity->paginas_cubierta_papel_impresion_id ?? null);
|
||||
$this->viewData['maquinaList4'] = $this->getMaquinaListItems4($presupuestoEntity->paginas_cubierta_maquina_id ?? null);
|
||||
$this->viewData['maquinasTarifasImpresionList4'] = $this->getMaquinasTarifasImpresionListItems4($presupuestoEntity->paginas_cubierta_tarifa_impresion_id ?? null);
|
||||
$this->viewData['userList'] = $this->getUserListItems($presupuestoEntity->total_confirmado_user_id ?? null);
|
||||
$this->viewData['userList2'] = $this->getUserListItems2($presupuestoEntity->aprobado_user_id ?? null);
|
||||
$this->viewData['userList3'] = $this->getUserListItems3($presupuestoEntity->pedido_espera_user_id ?? null);
|
||||
$this->viewData['paginasCubiertaList'] = $this->getPaginasCubiertaOptions();
|
||||
$this->viewData['paginasPortadaList'] = $this->getPaginasPortadaOptions();*/
|
||||
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$this->viewData['incReiList'] = array('incidencia' => lang('Presupuestos.incidencia'), 'reimpresion' => lang('Presupuestos.reimpresion'), 'sin_cargo' => lang('Presupuestos.sinCargo'));
|
||||
@ -352,12 +313,14 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$this->viewData['papelGenericoRotativaNegroList'] = $this->getPapelGenericoRotativaNegro();
|
||||
$this->viewData['papelGenericoRotativaColorList'] = $this->getPapelGenericoRotativaColor();
|
||||
|
||||
// Lineas Presupuesto
|
||||
$this->viewData['lineasPresupuesto'] = $this->getLineasPresupuestoActivas($id);
|
||||
|
||||
// Tarifas
|
||||
$this->viewData['serviciosPreimpresion'] = $this->getServiciosPreimpresion();
|
||||
$this->viewData['serviciosEncuadernacion'] = $this->getServiciosEncuadernacion();
|
||||
$this->viewData['serviciosAcabado'] = $this->getServiciosAcabado();
|
||||
$this->viewData['serviciosManipulado'] = $this->getServiciosManipulado();
|
||||
|
||||
|
||||
$this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
|
||||
|
||||
@ -1041,7 +1004,11 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
protected function getLineasPresupuestoActivas($presupuesto_id)
|
||||
{
|
||||
$model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
return $model->getLineasPresupuesto($presupuesto_id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -17,7 +17,31 @@ class Test extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->testLineasIntPlana();
|
||||
$time = '99:59:59';
|
||||
|
||||
$time_parts = explode(":", $time);
|
||||
$seconds = $time_parts[2] + $time_parts[1] * 60 + $time_parts[0] * 3600;
|
||||
echo "Time in seconds: " . $seconds;
|
||||
}
|
||||
|
||||
public function timeToSeconds(){
|
||||
$time = '99:59:59';
|
||||
|
||||
$time_parts = explode(":", $time);
|
||||
$seconds = $time_parts[2] + $time_parts[1] * 60 + $time_parts[0] * 3600;
|
||||
echo "Time in seconds: " . $seconds;
|
||||
}
|
||||
|
||||
public function getLP(){
|
||||
$lp_model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$data = $lp_model->getLineasPresupuesto(8);
|
||||
foreach($data as $linea)
|
||||
var_dump($linea->tipo);
|
||||
}
|
||||
|
||||
public function createLP(){
|
||||
$lp_model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$lp_model->createForPresupuesto(8);
|
||||
}
|
||||
|
||||
public function getPapelesHQ(){
|
||||
|
||||
Reference in New Issue
Block a user