mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminadas LP
This commit is contained in:
@ -11,6 +11,7 @@ use App\Models\Presupuestos\PresupuestoDireccionesModel;
|
||||
use App\Models\Configuracion\PapelGenericoModel;
|
||||
use App\Models\Configuracion\TipoPresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
use App\Models\Presupuestos\PresupuestoLineaModel;
|
||||
|
||||
use App\Models\Presupuestos\PresupuestoEncuadernacionesModel;
|
||||
use App\Models\Presupuestos\PresupuestoAcabadosModel;
|
||||
@ -306,7 +307,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$this->viewData['papelGenericoRotativaColorList'] = $this->getPapelGenericoRotativaColor();
|
||||
|
||||
// Lineas Presupuesto
|
||||
$this->viewData['lineasPresupuesto'] = $this->getLineasPresupuestoActivas($id);
|
||||
$this->viewData['lineasPresupuesto'] = (new PresupuestoLineaModel())->getLineasPresupuesto($id);
|
||||
|
||||
// Tarifas
|
||||
$this->viewData['serviciosAcabado'] = $this->getServiciosAcabado();
|
||||
@ -527,11 +528,14 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
if($tipo=='lineasPresupuesto'){
|
||||
|
||||
$model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
|
||||
$datos = $reqData['datos'] ?? null;
|
||||
$presupuesto_id = $reqData['presupuesto_id'] ?? -1;
|
||||
|
||||
if($datos != null){
|
||||
$this->updateLineasPresupuestoActivas($presupuesto_id, $datos);
|
||||
|
||||
$model->insertLineasPresupuesto($presupuesto_id, $datos);
|
||||
}
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
@ -1137,27 +1141,6 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getLineasPresupuestoActivas($presupuesto_id)
|
||||
{
|
||||
$model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$data = $model->getLineasPresupuesto($presupuesto_id);
|
||||
|
||||
$papel_imp_model = model('App\Models\Configuracion\PapelImpresionModel');
|
||||
$maquina_model = model('App\Models\Configuracion\MaquinaModel');
|
||||
|
||||
foreach($data as $linea){
|
||||
$linea->papel_impresion_nombre = $papel_imp_model->getNombre($linea->papel_impresion_id)[0]->text;
|
||||
$linea->maquina_nombre = $maquina_model->getNombre($linea->maquina_id)[0]->text;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function updateLineasPresupuestoActivas($presupuesto_id, $datos)
|
||||
{
|
||||
$model = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
return $model->updateLineasPresupuesto($presupuesto_id, $datos);
|
||||
}
|
||||
|
||||
protected function getPOD()
|
||||
{
|
||||
$model = model('App\Models\Configuracion\ConfiguracionSistemaModel');
|
||||
|
||||
Reference in New Issue
Block a user