diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 554465e5..35307b35 100755 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,8 +1,15 @@ - + diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index a822c826..0fc99f1a 100755 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -100,6 +100,10 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController // JJO $sanitizedData['user_created_id'] = $session->id_user; + if ($sanitizedData['papel_formato_id'] == null) { + $sanitizedData['papel_formato_id'] = 0; + } + $noException = true; if ($successfulResult = $this->canValidate($this->model->validationRulesAdd, $this->model->validationMessagesAdd)) : // if ($successfulResult = $this->validate($this->formValidationRules) ) : @@ -218,6 +222,17 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $sanitizedData['papel_formato_personalizado'] = false; } + if ($this->request->getPost('papel_formato_id') == null) { + $sanitizedData['papel_formato_id'] = 0; + } + + if ($this->request->getPost('solapas') == null) { + $sanitizedData['solapas'] = 0; + } + if ($this->request->getPost('solapas_sobrecubierta') == null) { + $sanitizedData['solapas'] = 0; + } + $noException = true; if($sanitizedData['papel_formato_id'] == null && $sanitizedData['papel_formato_ancho'] == null && $sanitizedData['papel_formato_alto'] == null){ @@ -329,6 +344,10 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $this->viewData['papelGenericoRotativaNegroList'] = $this->getPapelGenericoRotativaNegro(); $this->viewData['papelGenericoRotativaColorList'] = $this->getPapelGenericoRotativaColor(); + // Acabados exteriores + $this->viewData['acabadosCubierta'] = $this->getAcabadosCubierta(); + $this->viewData['acabadosSobrecubierta'] = $this->getAcabadosSobrecubierta(); + // Lineas Presupuesto $this->viewData['lineasPresupuesto'] = (new PresupuestoLineaModel())->getLineasPresupuesto($id); @@ -552,11 +571,8 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $datosPedido->solapas_ancho = $reqData['solapas_ancho']; $datosPedido->lomo = $reqData['lomo']; - if($type=='sobrecubierta') - $datosPedido->lomo_cubierta = $reqData['lomo_cubierta']; - - $datosPedido->anchoExteriores = PresupuestoService::getAnchoTotalExteriores($tipo_impresion_id, $datosPedido); - $datosPedido->altoExteriores = PresupuestoService::getAltoTotalExteriores($tipo_impresion_id, $datosPedido); + $datosPedido->anchoExteriores = PresupuestoService::getAnchoTotalExteriores($type, $tipo_impresion_id, $datosPedido); + $datosPedido->altoExteriores = PresupuestoService::getAltoTotalExteriores($type, $tipo_impresion_id, $datosPedido); // Cubierta y sobrecubierta siempre color HQ $resourceData = $this->getCompIntData($type, $datosPedido, $papel_generico, $gramaje, $isColor, 1, $cliente_id); @@ -787,8 +803,10 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $linea = PresupuestoService::getCostesLinea($uso, $datosPedido, $maquina, $papel, $opciones_papel, $tarifa); } - if(array_key_exists('error', $linea)) + if(array_key_exists('error', $linea)){ + //array_push($lineas, $linea); for debug continue; + } if($maquina->is_inkjet){ // calculo de tintas @@ -1206,15 +1224,26 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController } - protected function getPapelFormatoListItems($selId = null) + protected function getAcabadosCubierta() { - $papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel'); - $data = $papelFormatoModel->getElementsForMenu(); + $model = model('App\Models\Tarifas\TarifaacabadoModel'); + $data = $model->getServiciosAcabadoCubierta(); array_shift($data); - array_unshift($data, (object)['id' => '', 'tamanio' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papelFormatoId'))])]); + array_unshift($data, (object)['id' => '', 'label' => lang('Basic.global.None')]); return $data; } + protected function getAcabadosSobrecubierta() + { + $model = model('App\Models\Tarifas\TarifaacabadoModel'); + $data = $model->getServiciosAcabadoSobrecubierta(); + array_shift($data); + array_unshift($data, (object)['id' => '', 'label' => lang('Basic.global.None')]); + return $data; + } + + + protected function getPapelGenericoRotativaNegro() { @@ -1330,10 +1359,15 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController { $model = model('App\Models\Tarifas\TarifaEncuadernacionModel'); $data = $model->getServiciosEncuadernacionSelector(); - /*array_unshift($data, (object)array( - "value" => 0, - "label" => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.servicioEncuadernado'))]) - ));*/ + return $data; + } + + protected function getPapelFormatoListItems($selId = null) + { + $papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel'); + $data = $papelFormatoModel->getElementsForMenu(); + array_shift($data); + array_unshift($data, (object)['id' => '', 'tamanio' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papelFormatoId'))])]); return $data; } @@ -1341,10 +1375,6 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController { $model = model('App\Models\Tarifas\TarifaacabadoModel'); $data = $model->getServiciosAcabadoSelector(); - /*array_unshift($data, (object)array( - "value" => 0, - "label" => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.servicioAcabado'))]) - ));*/ return $data; } diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoacabados.php b/ci4/app/Controllers/Presupuestos/Presupuestoacabados.php index 7cd46225..a449aaf9 100755 --- a/ci4/app/Controllers/Presupuestos/Presupuestoacabados.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestoacabados.php @@ -42,15 +42,14 @@ class Presupuestoacabados extends \App\Controllers\GoBaseResourceController endif; $postData = $this->request->getJSON(); - $tarifas = array_column($postData->datos, 'tarifa_id'); - if(count($tarifas)>0){ - $this->model->deleteServiciosNotInArray($requestedId, $tarifas); + if(count($postData->datos)>0){ + $this->model->deleteServiciosNotInArray($requestedId, $postData->datos); } else{ $this->model->deleteAllServicios($requestedId); } - if(count($tarifas)>0){ + if(count($postData->datos)>0){ $this->model->updateTarifas($requestedId, $postData->datos); } diff --git a/ci4/app/Controllers/Tarifas/Tarifaacabado.php b/ci4/app/Controllers/Tarifas/Tarifaacabado.php index 1fa8ff55..09f6e89e 100755 --- a/ci4/app/Controllers/Tarifas/Tarifaacabado.php +++ b/ci4/app/Controllers/Tarifas/Tarifaacabado.php @@ -84,10 +84,19 @@ class Tarifaacabado extends \App\Controllers\GoBaseResourceController // JJO $sanitizedData['user_created_id'] = $session->id_user; + if ($this->request->getPost('mostrar_en_presupuesto') == null) { $sanitizedData['mostrar_en_presupuesto'] = false; } + if ($this->request->getPost('acabado_cubierta') == null) { + $sanitizedData['acabado_cubierta'] = false; + } + + if ($this->request->getPost('acabado_sobrecubierta') == null) { + $sanitizedData['acabado_sobrecubierta'] = false; + } + $noException = true; if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) : @@ -166,9 +175,18 @@ class Tarifaacabado extends \App\Controllers\GoBaseResourceController // JJO $sanitizedData['user_updated_id'] = $session->id_user; + if ($this->request->getPost('mostrar_en_presupuesto') == null) { $sanitizedData['mostrar_en_presupuesto'] = false; } + + if ($this->request->getPost('acabado_cubierta') == null) { + $sanitizedData['acabado_cubierta'] = false; + } + + if ($this->request->getPost('acabado_sobrecubierta') == null) { + $sanitizedData['acabado_sobrecubierta'] = false; + } $noException = true; diff --git a/ci4/app/Controllers/Test.php b/ci4/app/Controllers/Test.php index 7fcf3f0d..581eca3b 100755 --- a/ci4/app/Controllers/Test.php +++ b/ci4/app/Controllers/Test.php @@ -18,7 +18,11 @@ class Test extends BaseController public function index() { echo '
';
-        \var_dump($this->get_precio_tarifa(18,300,10,150,210,-1,30));
+        $model = model('App\Models\Presupuestos\PresupuestoAcabadosModel');
+        $tarifas = [
+            (object)['tarifa_id'=>1, "cubierta"=>0, "sobrecubierta"=>0]
+        ];
+        var_dump($model->deleteServiciosNotInArray(44, $tarifas));
         echo '
'; /* @@ -179,6 +183,13 @@ class Test extends BaseController var_dump($data); } + public function getPapelesSobrecubierta(){ + $model = model('App\Models\Configuracion\PapelGenericoModel'); + $data = $model->getPapelForComparador('colorhq', false, true, false); + + var_dump($data); + } + public function getPapelesGuardas(){ $model = model('App\Models\Configuracion\PapelGenericoModel'); $data = $model->getPapelForComparador('color', false, false, false, true); @@ -514,6 +525,99 @@ class Test extends BaseController echo ''; + } + + public static function testLineasSobrecubierta() + { + $uso = 'sobrecubierta'; + $tipo = 'colorhq'; + + $datosPedido = (object)array( + 'paginas' => 240, + 'tirada' => 100, + 'merma' => 10, + 'merma_portada' => 10, + 'ancho' => 150, + 'alto' => 210, + 'isCosido' => true, + 'solapas' => false, + ); + + $opciones_papel = array( + 'sobrecubierta' => 1, + 'rotativa' => 0, + ); + + + // Se obtienen los papeles disponibles + $papelimpresionmodel = new \App\Models\Configuracion\PapelImpresionModel(); + $papeles = $papelimpresionmodel->getIdPapelesImpresionForPresupuesto( + papel_generico_id: 1, // Blanco offset + gramaje: 200, + options: $opciones_papel + ); + + echo '
';
+        var_dump($papeles);
+        echo '
'; + + $lineas = array(); + // Para cada papel, se obtienen las maquinas disponibles + foreach ($papeles as $papel) { + + $maquinamodel = new \App\Models\Configuracion\MaquinaModel(); + $maquinas = $maquinamodel->getMaquinaImpresionForPresupuesto( + is_rotativa: 0, + tarifa_tipo: $tipo, + uso_tarifa: 'sobrecubierta', + tirada: $datosPedido->tirada + $datosPedido->merma, + papel_impresion_id: $papel->id, + ); + + echo '
';
+            echo '-------------------------------';
+            echo '
'; + + echo '
';
+            var_dump($maquinas);
+            echo '
'; + + // Se recorren las máquinas y se calcula el coste de linea por cada una + foreach ($maquinas as $maquina) { + + echo '
';
+                echo '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$';
+                echo '
'; + + $tarifamodel = new \App\Models\Configuracion\MaquinasTarifasImpresionModel(); + $tarifa = $tarifamodel->getTarifa($maquina->maquina_id, $uso, $tipo); + + echo '
';
+                var_dump($tarifa);
+                echo '
'; + + if(!is_float($tarifa)){ + continue; + } + $linea = PresupuestoService::getCostesLinea($uso, $datosPedido, $maquina, $papel, $opciones_papel, $tarifa); + $linea['fields']['maquina'] = $maquina->maquina; + $linea['fields']['maquina_id'] = $maquina->maquina_id; + $linea['fields']['papel_impresion'] = $papel->nombre; + $linea['fields']['papel_impresion_id'] = $papel->id; + $linea['fields']['paginas'] = $datosPedido->paginas; + $linea['fields']['gramaje'] = 100; + $linea['fields']['papel_generico_id'] = 3; + $linea['fields']['papel_generico'] = 'Blanco offset'; + + array_push($lineas, $linea); + } + } + + echo '
';
+        var_dump($lineas);
+        echo '
'; + + } } \ No newline at end of file diff --git a/ci4/app/Entities/Clientes/ClientePreciosEntity.php b/ci4/app/Entities/Clientes/ClientePreciosEntity.php old mode 100644 new mode 100755 diff --git a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php index 89c30ac9..71c10315 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php @@ -12,6 +12,8 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity "precio_unidad" => null, "precio_total" => null, "margen" => null, + "cubierta" => null, + "sobrecubierta" => null, "created_at" => null, "updated_at" => null, ]; @@ -21,5 +23,7 @@ class PresupuestoAcabadosEntity extends \CodeIgniter\Entity\Entity "precio_unidad" => "float", "precio_total" => "float", "margen" => "float", + "cubierta" => "int", + "sobrecubierta" => "int", ]; } diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php index bf6bffd0..f01d0e2b 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php @@ -39,6 +39,8 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "tirada" => null, "solapas" => false, "solapas_ancho" => 0.0, + "solapas_sobrecubierta" => false, + "solapas_ancho_sobrecubierta" => 0.0, "cosido" => false, "sobrecubiertas" => false, "sobrecubiertas_ancho" => 0.0, @@ -80,6 +82,8 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "total_descuentoPercent" => null, "total_presupuesto" => null, "total_precio_unidad" => null, + "acabado_cubierta_id" => null, + "acabado_sobrecubierta_id" => null, ]; protected $casts = [ "cliente_id" => "int", @@ -107,6 +111,8 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "tirada" => "int", "solapas" => "boolean", "solapas_ancho" => "float", + "solapas_sobrecubierta" => "boolean", + "solapas_ancho_sobrecubierta" => "float", "cosido" => "boolean", "sobrecubiertas" => "boolean", "sobrecubiertas_ancho" => "float", @@ -135,5 +141,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "total_descuentoPercent" => "?float", "total_presupuesto" => "?float", "total_precio_unidad" => "?float", + "acabado_cubierta_id" => "int", + "acabado_sobrecubierta_id" => "int", ]; } diff --git a/ci4/app/Entities/Tarifas/TarifaacabadoEntity.php b/ci4/app/Entities/Tarifas/TarifaacabadoEntity.php index 0d2d9b91..8a8a972d 100755 --- a/ci4/app/Entities/Tarifas/TarifaacabadoEntity.php +++ b/ci4/app/Entities/Tarifas/TarifaacabadoEntity.php @@ -11,6 +11,8 @@ class TarifaacabadoEntity extends \CodeIgniter\Entity\Entity "precio_min" => 0, "importe_fijo" => 0, "mostrar_en_presupuesto" => 1, + "acabado_cubierta" => 0, + "acabado_sobrecubierta" => 0, "user_created_id" => 0, "user_updated_id" => 0, "is_deleted" => 0, @@ -21,7 +23,6 @@ class TarifaacabadoEntity extends \CodeIgniter\Entity\Entity protected $casts = [ "precio_min" => "float", "importe_fijo" => "float", - "mostrar_en_presupuesto" => "int", "user_created_id" => "int", "user_updated_id" => "int", "is_deleted" => "int", diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php index 29acfd76..d8625da1 100755 --- a/ci4/app/Language/es/Presupuestos.php +++ b/ci4/app/Language/es/Presupuestos.php @@ -44,6 +44,9 @@ return [ 'papelFormatoPersonalizado' => 'Tamaño personalizado', 'papelFormatoAncho' => 'Ancho', 'papelFormatoAlto' => 'Alto', + 'acabadosExteriores' => 'Acabados exteriores', + 'acabadoCubierta' => 'Acabado Cubierta', + 'acabadoSobrecubierta' => 'Acabado Sobrecubierta', 'cosido' => 'Cosido', 'ferro' => 'Ferro', 'ferroDigital' => 'Ferro Digital', @@ -95,7 +98,9 @@ return [ 'sobrecubierta' => 'Sobrecubierta', 'encuadernacion' => 'Encuadernación', 'solapasCubierta' => 'Solapas cubierta', - 'solapasAnchoCubierta' => 'Ancho solapas cubierta', + 'solapasSobrecubierta' => 'Solapas sobrecub.', + 'solapasAnchoCubierta' => 'Ancho solapas cub.', + 'solapasAnchoSobrecubierta' => 'Ancho solapas sobrecub.', 'sinImpresion' => 'Sin impresion', '1cara' => '1 cara', '2caras' => '2 caras', @@ -193,11 +198,13 @@ return [ 'previewMaquina' => 'Máquina', 'previewConfiguracionGuardas' => 'Configuración de guardas', 'previewConfiguracionCubierta' => 'Configuración de cubierta', + 'previewConfiguracionSobrecubierta' => 'Configuración de sobrecubierta', 'previewEsquemaCubierta' => 'Esquema de cubierta', 'previewConfiguracionEsquemaCubierta' => 'Configuración esquema de cubierta', 'previewMaquinaPlana' => 'Configuración del papel: Plana', 'previewMaquinaRotativa' => 'Configuración del papel: Rotativa', 'previewCubierta' => 'Configuración del papel: Cubierta', + 'previewSobrecubierta' => 'Configuración del papel: Sobrecubierta', 'previewPapelGenerico' => 'Papel Genérico', 'previewPapelCompra' => 'Papel de Compra', 'previewAreaImpresion' => 'Área de Impresión', diff --git a/ci4/app/Language/es/Tarifaacabado.php b/ci4/app/Language/es/Tarifaacabado.php index c7024dc1..3c6622ff 100755 --- a/ci4/app/Language/es/Tarifaacabado.php +++ b/ci4/app/Language/es/Tarifaacabado.php @@ -12,6 +12,8 @@ return [ 'precioMin' => 'Precio Mínimo', 'importeFijo' => 'Importe Fijo', 'mostrar_en_presupuesto' => 'Mostrar en presupuesto', + "acabado_cubierta" => "Acabado cubierta", + "acabado_sobrecubierta" => "Acabado sobrecubierta", 'tarifaacabado' => 'Tarifa Acabado', 'tarifaacabadoList' => 'Lista Tarifas Acabado', 'tarifasacabado' => 'Tarifas Acabado', diff --git a/ci4/app/Models/Clientes/ClientePreciosModel.php b/ci4/app/Models/Clientes/ClientePreciosModel.php old mode 100644 new mode 100755 diff --git a/ci4/app/Models/Configuracion/PapelGenericoModel.php b/ci4/app/Models/Configuracion/PapelGenericoModel.php index cc1b37c7..e9a0a536 100755 --- a/ci4/app/Models/Configuracion/PapelGenericoModel.php +++ b/ci4/app/Models/Configuracion/PapelGenericoModel.php @@ -127,21 +127,11 @@ class PapelGenericoModel extends \App\Models\GoBaseModel $builder->where("t2.cubierta", 1); $builder->where("t5.uso", 'cubierta'); } - else{ - if(!$is_guardas){ - $builder->where("t2.cubierta", 0); - } - } if($is_sobrecubierta==true){ $builder->where("t2.sobrecubierta", 1); $builder->where("t5.uso", 'sobrecubierta'); } - else{ - if(!$is_guardas){ - $builder->where("t2.sobrecubierta", 0); - } - } if($is_cubierta==false && $is_sobrecubierta==false){ $builder->where("t5.uso", 'interior'); diff --git a/ci4/app/Models/Presupuestos/PresupuestoAcabadosModel.php b/ci4/app/Models/Presupuestos/PresupuestoAcabadosModel.php index 3bf50737..6923f0a1 100755 --- a/ci4/app/Models/Presupuestos/PresupuestoAcabadosModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoAcabadosModel.php @@ -19,7 +19,7 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel 2 => "t1.precio_total" ]; - protected $allowedFields = ["presupuesto_id", "tarifa_acabado_id", "nombre", "precio_total", "precio_unidad", "margen"]; + protected $allowedFields = ["presupuesto_id", "tarifa_acabado_id", "nombre", "precio_total", "precio_unidad", "margen", "cubierta", "sobrecubierta"]; protected $returnType = "App\Entities\Presupuestos\PresupuestoAcabadosEntity"; protected $useTimestamps = true; @@ -98,13 +98,33 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel ->delete(); } - public function deleteServiciosNotInArray($presupuesto_id, $tarifas_id){ + public function deleteServiciosNotInArray($presupuesto_id, $tarifas){ + + $builder = $this->db + ->table($this->table . " t1"); + $builder->select("*"); + $builder->where('presupuesto_id', $presupuesto_id); + $results = $builder->get()->getResultObject(); + + $ids_for_delete = []; + foreach($results as $result){ + $found = false; + foreach($tarifas as $tarifa){ + if($tarifa->tarifa_id == $result->tarifa_acabado_id && + $tarifa->cubierta == $result->cubierta && + $tarifa->sobrecubierta == $result->sobrecubierta) + $found = true; + } + if(!$found){ + array_push($ids_for_delete, $result->id); + } + } $builder = $this->db ->table($this->table . " t1"); $builder->where('presupuesto_id', $presupuesto_id); - foreach($tarifas_id as $id){ - $builder->where('tarifa_acabado_id !=', $id); + foreach($ids_for_delete as $id){ + $builder->orWhere('id', $id); } $builder->delete(); } @@ -118,6 +138,8 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel $builder->select("id"); $builder->where('presupuesto_id', $presupuesto_id); $builder->where('tarifa_acabado_id', $tarifa->tarifa_id); + $builder->where('cubierta', $tarifa->cubierta); + $builder->where('sobrecubierta', $tarifa->sobrecubierta); $result = $builder->get()->getResultObject(); if(count($result)>0){ $this->db @@ -127,6 +149,8 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel ->set('precio_unidad', $tarifa->precio_unidad) ->set('precio_total', $tarifa->precio_total) ->set('margen', $tarifa->margen) + ->set('cubierta', $tarifa->cubierta) + ->set('sobrecubierta', $tarifa->sobrecubierta) ->update(); @@ -139,6 +163,8 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel ->set('precio_unidad', $tarifa->precio_unidad) ->set('precio_total', $tarifa->precio_total) ->set('margen', $tarifa->margen) + ->set('cubierta', $tarifa->cubierta) + ->set('sobrecubierta', $tarifa->sobrecubierta) ->insert(); } } @@ -157,7 +183,7 @@ class PresupuestoAcabadosModel extends \App\Models\GoBaseModel ->table($this->table . " t1") ->select( "t1.id AS id, t1.tarifa_acabado_id AS tarifa_acabado_id, t1.precio_unidad AS precio_unidad, - t1.precio_total AS precio_total, t1.margen AS margen, t2.nombre AS nombre" + t1.precio_total AS precio_total, t1.margen AS margen, t2.nombre AS nombre, t1.cubierta AS cubierta, t1.sobrecubierta AS sobrecubierta" ); $builder->where('t1.presupuesto_id', $presupuesto_id); diff --git a/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php b/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php index 4aa222ac..7d6d6ca3 100755 --- a/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoEncuadernacionesModel.php @@ -253,7 +253,7 @@ class PresupuestoEncuadernacionesModel extends \App\Models\GoBaseModel array_push($ret_array, (object)[ - 'tarifa_id'=> $tarifa['tarifa_id'], + 'tarifa_id'=> $tarifa_proveedor->tarifa_enc_id, 'tarifa_nombre'=> $tarifa_proveedor->tarifa_enc_nombre, 'precio_unidad'=> $result_data[0], 'total'=> $result_data[1], diff --git a/ci4/app/Models/Presupuestos/PresupuestoModel.php b/ci4/app/Models/Presupuestos/PresupuestoModel.php index 8f8f6acc..3df3c2e0 100755 --- a/ci4/app/Models/Presupuestos/PresupuestoModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoModel.php @@ -60,6 +60,8 @@ class PresupuestoModel extends \App\Models\GoBaseModel "tirada", "solapas", "solapas_ancho", + "solapas_sobrecubierta", + "solapas_ancho_sobrecubierta", "cosido", "sobrecubiertas", "sobrecubiertas_ancho", @@ -98,6 +100,8 @@ class PresupuestoModel extends \App\Models\GoBaseModel "total_descuentoPercent", "total_presupuesto", "total_precio_unidad", + "acabado_cubierta_id", + "acabado_sobrecubierta_id", ]; protected $returnType = "App\Entities\Presupuestos\PresupuestoEntity"; diff --git a/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php b/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php index c4eb90e9..7dc92afe 100755 --- a/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php +++ b/ci4/app/Models/Tarifas/TarifaEncuadernacionModel.php @@ -137,6 +137,10 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel public function getTarifaPresupuestoEncuadernacion($tarifa_id, $paginas, $tirada, $ancho, $alto, $proveedor_id=-1){ + // para los apaisados + $dim_h = $ancho<$alto?$ancho:$alto; + $dim_v = $ancho<$alto?$alto:$ancho; + $builder = $this->db ->table($this->table . " t1") ->select( @@ -159,10 +163,10 @@ class TarifaEncuadernacionModel extends \App\Models\GoBaseModel $builder->where('t2.tirada_max >=', $tirada); $builder->where('t3.paginas_libro_min <=', $paginas); $builder->where('t3.paginas_libro_max >=', $paginas); - $builder->where('t4.ancho_min <=', $ancho); - $builder->where('t4.ancho_max >=', $ancho); - $builder->where('t4.alto_min <=', $alto); - $builder->where('t4.alto_max >=', $alto); + $builder->where('t4.ancho_min <=', $dim_h); + $builder->where('t4.ancho_max >', $dim_h); + $builder->where('t4.alto_min <=', $dim_v); + $builder->where('t4.alto_max >=', $dim_v); if($proveedor_id != -1){ $builder->where('t2.proveedor_id', $proveedor_id); diff --git a/ci4/app/Models/Tarifas/TarifaacabadoModel.php b/ci4/app/Models/Tarifas/TarifaacabadoModel.php index 1821d331..61a9685e 100755 --- a/ci4/app/Models/Tarifas/TarifaacabadoModel.php +++ b/ci4/app/Models/Tarifas/TarifaacabadoModel.php @@ -24,6 +24,8 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel "precio_min", "importe_fijo", "mostrar_en_presupuesto", + "acabado_cubierta", + "acabado_sobrecubierta", "deleted_at", "is_deleted", "user_created_id", @@ -81,7 +83,8 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel public function getResource(string $search = "") { $builder = $this->db->table($this->table . " t1")->select( - "t1.id AS id, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo, t1.mostrar_en_presupuesto AS mostrar_en_presupuesto" + "t1.id AS id, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo, + t1.mostrar_en_presupuesto AS mostrar_en_presupuesto, t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta" ); //JJO @@ -117,7 +120,7 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel ->table($this->table . " t1") ->select( "t1.id AS tarifa_acabado_id, t1.nombre AS tarifa_acabado_nombre, t1.precio_min AS tarifa_precio_min, t1.importe_fijo AS tarifa_importe_fijo, - t2.id AS tarifa_linea_id, t2.tirada_min AS tirada_min, t2.tirada_max AS tirada_max, + t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta, t2.id AS tarifa_linea_id, t2.tirada_min AS tirada_min, t2.tirada_max AS tirada_max, t2.precio_min AS precio_min, t2.precio_max AS precio_max, t2.margen AS margen" ) ->join("tarifa_acabado_lineas t2", "t1.id = t2.tarifa_acabado_id", "left") @@ -148,4 +151,33 @@ class TarifaacabadoModel extends \App\Models\GoBaseModel return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject(); } + + public function getServiciosAcabadoCubierta() + { + $builder = $this->db + ->table($this->table . " t1") + ->select( + "t1.id as id, t1.nombre AS label" + ) + ->where("t1.is_deleted", 0) + ->where("t1.mostrar_en_presupuesto", 1) + ->where("t1.acabado_cubierta", 1); + + return $builder->orderBy("t1.id", "asc")->get()->getResultObject(); + } + + + public function getServiciosAcabadoSobrecubierta() + { + $builder = $this->db + ->table($this->table . " t1") + ->select( + "t1.id as id, t1.nombre AS label" + ) + ->where("t1.is_deleted", 0) + ->where("t1.mostrar_en_presupuesto", 1) + ->where("t1.acabado_sobrecubierta", 1); + + return $builder->orderBy("t1.id", "asc")->get()->getResultObject(); + } } diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index aa81ef9a..83c7f2c6 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -541,8 +541,9 @@ class PresupuestoService extends BaseService /** * Devuelve el ancho de la cubierta/sobrecubierta, incluido el lomo. + * El $uso tiene que ser "cubierta" o "sobrecubierta" */ - public static function getAnchoTotalExteriores($tipo_impresion_id, $datosPedido=null) + public static function getAnchoTotalExteriores($uso="cubierta", $tipo_impresion_id, $datosPedido=null) { $ancho_total = 0; @@ -550,8 +551,7 @@ class PresupuestoService extends BaseService // Tapa blanda (cosido y fresado) if($tipo_impresion_id == 2 || $tipo_impresion_id == 4){ $ancho_total = floatval($datosPedido->ancho)*2 + floatval($datosPedido->lomo); - $ancho_total += property_exists($datosPedido, 'lomo_cubierta')?$datosPedido->lomo_cubierta:0; - + // añadimos ancho de las solapas // si se añaden solapas hay que sumar 3mm de los dobleces if ($datosPedido->solapas) { @@ -563,9 +563,14 @@ class PresupuestoService extends BaseService // Tapa dura cosido y fresado else if($tipo_impresion_id == 1 || $tipo_impresion_id == 3){ $ancho_total = floatval($datosPedido->ancho)*2 + floatval($datosPedido->lomo); - $ancho_total += property_exists($datosPedido, 'lomo_cubierta')?$datosPedido->lomo_cubierta:0; - // Se añaden 20mm de sangre por cada lado + 2 * 0.6mm de portada y contraportada -> total 41.2 - $ancho_total += (1.2+2*self::SANGRE_FORMAS_CUBIERTA); + // si es cubierta + // Se añaden 20mm de sangre por cada lado + 2 * 6mm de vuelo portada y contraportada -> total 52 + if($uso=="cubierta") + $ancho_total += (12+2*self::SANGRE_FORMAS_CUBIERTA); + // si es sobrecubierta + // Se añaden 5mm de sangre por cada lado + 2 * 6mm de vuelo portada y contraportada -> total 52 + else + $ancho_total += (12+2*self::SANGRE_FORMAS); } else{ // En cualquier otro caso se le suma 5mm de sangre por cada lado @@ -576,9 +581,9 @@ class PresupuestoService extends BaseService } /** - * Devuelve el ancho de la cubierta/sobrecubierta, incluido el lomo. + * Devuelve el alto de la cubierta/sobrecubierta */ - public static function getAltoTotalExteriores($tipo_impresion_id, $datosPedido=null) + public static function getAltoTotalExteriores($uso="cubierta", $tipo_impresion_id, $datosPedido=null) { $alto_total = 0; @@ -586,8 +591,14 @@ class PresupuestoService extends BaseService $alto_total = floatval($datosPedido->alto); // Tapa dura (cosido y fresado) if($tipo_impresion_id == 1 || $tipo_impresion_id == 3){ - // Se añaden 20mm de sangre por cada lado + 0.7mm extra que sobresale -> total 40.7 - $alto_total += (0.7+2*self::SANGRE_FORMAS_CUBIERTA); + // Se añaden 20mm de sangre por cada lado + 7mm extra que sobresale -> total 47 + if($uso=="cubierta") + $alto_total += (7+2*self::SANGRE_FORMAS_CUBIERTA); + // si es sobrecubierta + // Se añaden 5mm de sangre por cada lado + 7mm de vuelo -> total 52 + else + $alto_total += (7+2*self::SANGRE_FORMAS); + } // En cualquier otro caso se le suma 5mm de sangre por cada lado else{ diff --git a/ci4/app/Views/themes/backend/vuexy/form/clientes/cliente/convert2templateModal.php b/ci4/app/Views/themes/backend/vuexy/form/clientes/cliente/convert2templateModal.php old mode 100644 new mode 100755 diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php index 4b80201e..543a1f26 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php @@ -15,8 +15,7 @@
- -
+
@@ -24,37 +23,21 @@
- - - -
- -
- -
- solapas == true ? 'checked' : ''; ?>> - -
- -
- -
- -
- +
-
+
+
-
+
@@ -72,30 +55,24 @@
-
- papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="papel_formato_ancho) ?>"> +
+ papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control formato_libro" value="papel_formato_ancho) ?>">
-
- papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="papel_formato_alto) ?>"> +
+ papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control formato_libro" value="papel_formato_alto) ?>">
- -
- papel_formato_personalizado == true ? 'checked' : ''; ?>> - -
-
-
+
@@ -104,7 +81,7 @@
-
+
@@ -114,36 +91,133 @@
+ + +
- - - -
- - - solapas == true): ?> -
- -
@@ -883,6 +975,12 @@ $('#tab-pv-esquema-cubierta').on( "click", function() { } ); +$('#tab-pv-sobrecubierta').on( "click", function() { + + previewInteriorPlana('sobrecubierta', , ); + +} ); + endSection() ?> diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js index 23aa03a6..fef4b8da 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js @@ -329,10 +329,30 @@ function clearIntLineas(is_color) { function clearCubierta() { - $('#tableCompCubierta').DataTable().clear().draw(); - $('#insertarCubiertaBtn').css('display', 'none'); + var tabla = $('#tableCompCubierta').DataTable(); + tabla + .rows(function (idx, data, node) { + return data['tipo'] === 'cubierta'; + }) + .remove() + .draw(); + if(tabla.rows().count()==0) + $('#insertarCubiertaBtn').css('display', 'none'); } +function clearSobrecubierta() { + + + var tabla = $('#tableCompCubierta').DataTable(); + tabla + .rows(function (idx, data, node) { + return data['tipo'] === 'sobrecubierta'; + }) + .remove() + .draw(); + if(tabla.rows().count()==0) + $('#insertarCubiertaBtn').css('display', 'none'); +} function clearGuardas() { @@ -397,13 +417,33 @@ function selectCubiertaLineas() { $("#tableCompCubierta").DataTable().rows('.selected').deselect(); - let value_total = 0.00; + cubierta_selected = false; + sobrecubierta_selected = false; if ($("#tableCompCubierta").DataTable().rows().count() > 0) { - $("#tableCompCubierta").DataTable().row(0).nodes().to$().toggleClass('selected'); - value_total = parseFloat($("#tableCompCubierta").DataTable().rows(0).data()[0]['total']) - }; + $("#tableCompCubierta").DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) { + if (!cubierta_selected && $('#tableCompCubierta').DataTable().cell(rowIdx, 0).data() === 'cubierta') { + $("#tableCompCubierta").DataTable().row(rowIdx).nodes().to$().toggleClass('selected'); + cubierta_selected = true; + } + if (!sobrecubierta_selected && $('#tableCompCubierta').DataTable().cell(rowIdx, 0).data() === 'sobrecubierta') { + $("#tableCompCubierta").DataTable().row(rowIdx).nodes().to$().toggleClass('selected'); + sobrecubierta_selected = true; + } + }); + } + + var table = $("#tableCompCubierta").DataTable(); + var rows = table.rows('.selected').indexes(); + var data = table.rows(rows).data(); + + var value_total = 0.00; + + for (let i = 0; i < data.length; i++) { + + value_total += parseFloat(data[i]['total']) + } $('#total_comp_cubierta').html(value_total.toFixed(2)); @@ -552,6 +592,19 @@ function fillCubierta(data) { }) } +function fillSobrecubierta(data) { + + let sorted = data.lineas.sort( + (p1, p2) => ((p1.fields.precio_pedido + p1.fields.precio_click_pedido) < (p2.fields.precio_pedido + p2.fields.precio_click_pedido)) ? + -1 : ((p1.fields.precio_pedido + p1.fields.precio_click_pedido) > (p2.fields.precio_pedido + p2.fields.precio_click_pedido)) ? 1 : 0); + sorted.forEach(function (linea) { + if (typeof linea.error == "undefined") + $('#tableCompCubierta').DataTable().row + .add(getRowFromLineaInt('sobrecubierta', linea)) + .draw() + }) +} + function fillGuardas(data) { let sorted = data.lineas.sort( @@ -658,6 +711,20 @@ function generateCompJSON() { } $.extend(data, cubierta_obj); + try { + sobrecubierta_obj = { + "sobrecubierta": { + 'imprimir': $('#compSobrecubierta option:selected').val(), + 'papel_id': $('#compPapelSobrecubierta').select2('data')[0].id, + 'gramaje': $('#compGramajeSobrecubierta').select2('data')[0].text.trim(), + }, + } + } + catch (e) { + sobrecubierta_obj = {} + } + $.extend(data, sobrecubierta_obj); + if($('#compCarasGuardas').length>0){ try { guardas_obj = { diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js index c5f36f06..beb26eda 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js @@ -6,7 +6,7 @@ function previewInteriorPlana(lpTagName, isCosido, isTapaDura) { // Local parameters let guardaV = 0; - guardaH = 0; + let guardaH = 0; let styleText = {size: 12, family: 'Public Sans'}; // Get the preview Object parameters @@ -497,12 +497,10 @@ function portadaTapaBlanda(lpTagName, isCosido, isTapaDura) { function getLomoLibro() { - let _anchoLomo = 0; - $("#tableLineasPresupuesto tbody tr:visible td input[id*='_lomo']").each(function () { - _anchoLomo += parseFloat($(this).val()); - }); + const anchoLomoInputs = $("#tableLineasPresupuesto tbody tr:visible td input[id*='_lomo']"); + const anchoLomo = Array.from(anchoLomoInputs).reduce((sum, input) => sum + parseFloat($(input).val()), 0); - return parseFloat(_anchoLomo.toFixed(2)); + return parseFloat(anchoLomo.toFixed(2)); } @@ -512,7 +510,7 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { $('#tableLineasPresupuesto').DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) { - let lineaPresupuestoId = this.data().row_id; + let lineaPresupuestoId = this.data().row_id.replace('lp_', ''); switch (lpName) { case 'bn': @@ -523,12 +521,13 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { case 'rot_bn': case 'rot_color': case 'guardas': - if (lineaPresupuestoId.indexOf(lpName) >= 0) { + case 'sobrecubierta': + if (lineaPresupuestoId === lpName) { rowData = this.data(); } break; case 'ec': - if (lineaPresupuestoId.indexOf('cubierta') >= 0) { + if (lineaPresupuestoId === 'cubierta') { rowData = this.data(); } break; @@ -537,7 +536,6 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { break; } - //console.log(rowData); }); @@ -546,7 +544,7 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { gramajeLibro: parseInt(rowData.gramaje), manoLP: parseFloat(rowData.lomo), lomoLibro: getLomoLibro(), - anchoSolapa: parseFloat($('#solapas_ancho').val()), + anchoSolapa: $('#solapas').is(':checked') ? parseFloat($('#solapas_ancho').val()) : parseFloat(0), nFormas: parseInt(rowData.formas), nFormasH: parseInt(rowData.formas_h), nFormasV: parseInt(rowData.formas_v), @@ -559,7 +557,7 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { anchoLibro: getDimensionLibro().ancho }; - console.log(pvObj); + //console.log(pvObj); // Printing shape definition pvObj.anchoForma = (_isCosido) ? 2 * pvObj.anchoLibro : pvObj.anchoLibro; @@ -603,9 +601,29 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro); pvObj.altoForma += (2 * sangre); } + // Update labels $(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma); break; + + case 'sobrecubierta': + let sangre = parseFloat(5); // mm + let anchoSolapaSobrecubierta = $('#solapas_sobrecubierta').is(':checked') ? parseFloat($('#solapas_ancho_sobrecubierta').val()) : parseFloat(0); // mm + if(_isTapaDura){ + let anchoPliegue = parseFloat(6); // mm + let altoPliegue = parseFloat(7); // mm + pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * anchoPliegue) + (2 * (anchoSolapaSobrecubierta + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro); + pvObj.altoForma += altoPliegue + (2 * sangre); + }else{ + pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (anchoSolapaSobrecubierta + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro); + pvObj.altoForma += (2 * sangre); + } + + // Update labels + $(pvName + '_solapas').text(anchoSolapaSobrecubierta); + anchoSolapaSobrecubierta != 0 ? $('.pv-solapas').show() : $('.pv-solapas').hide(); + $(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma); + break; case 'ec': $(pvName + '_pg').attr("href", $(pvName + '_pg').attr('sk-url') + rowData.papel); $(pvName + '_pi').attr("href", $(pvName + '_pi').attr('sk-url') + rowData.papel_impresion_id); @@ -648,48 +666,25 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { function getVisibleTabs() { + const table = $('#tableLineasPresupuesto').DataTable(); // Clear all existing tabs - $('*[id*=tab-pv-]').each(function () { - $(this).hide(); - $(this).children('.active').each(function () { - $(this).removeClass('active'); - }); - - $('*[id*=pv_]').each(function () { - $(this).removeClass("active show"); - }); - - }); + $('*[id*=tab-pv-]').hide().find('.active').removeClass('active'); + $('*[id*=pv_]').removeClass('active show'); // Enable active tabs - $('#tableLineasPresupuesto').DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) { - let lpName = this.data().row_id.replace('lp_', ''); - let tabName = lpName.replace('_', '-'); - //console.log(lpName); - switch (lpName) { - case 'bn': - case 'bnhq': - case 'color': - case 'colorhq': - case 'rot_bn': - case 'rot_color': - case 'guardas': - $("#tab-pv-" + tabName).show(); - break; + table.rows().every(function () { + const lpName = this.data().row_id.replace('lp_', ''); + const tabName = lpName.replace('_', '-'); - case 'cubierta': - $("#tab-pv-" + tabName).show(); - $("#tab-pv-esquema-" + tabName).show(); - break; - - default: - break; + if (['bn', 'bnhq', 'color', 'colorhq', 'rot_bn', 'rot_color', 'guardas', 'cubierta', 'sobrecubierta'].includes(lpName)) { + $(`#tab-pv-${tabName}`).show(); + if (lpName === 'cubierta') { + $(`#tab-pv-${tabName}`).show(); + $(`#tab-pv-esquema-${tabName}`).show(); + } } - }); - - } diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php index fd006643..106a5307 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php @@ -181,8 +181,8 @@ - const url = window.location.href; - const url_parts = url.split('/'); +const url = window.location.href; +const url_parts = url.split('/'); section("additionalInlineJs") ?> diff --git a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/_tarifaAcabadoFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/_tarifaAcabadoFormItems.php index 24fb87d6..f07290fc 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/_tarifaAcabadoFormItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/_tarifaAcabadoFormItems.php @@ -26,7 +26,6 @@
-
+
+
+ +
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php index 0ab800ae..dba9776b 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php +++ b/ci4/app/Views/themes/backend/vuexy/form/tarifas/acabado/viewTarifaAcabadoList.php @@ -20,6 +20,8 @@ + + @@ -91,12 +93,14 @@ { 'data': 'precio_min' }, { 'data': 'importe_fijo' }, { 'data': 'mostrar_en_presupuesto' }, + { 'data': 'acabado_cubierta' }, + { 'data': 'acabado_sobrecubierta' }, { 'data': actionBtns } ] }); theTable.on( 'draw.dt', function () { - const boolCols = [3]; + const boolCols = [3, 4, 5]; for (let coln of boolCols) { theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) { cell.innerHTML = cell.innerHTML == '1' ? '' : ''; diff --git a/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_guardas.png b/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_guardas.png old mode 100644 new mode 100755 diff --git a/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_inkjet_bn.png b/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_inkjet_bn.png old mode 100644 new mode 100755 diff --git a/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_inkjet_color.png b/httpdocs/themes/vuexy/img/safekat/presupuestos/icon_inkjet_color.png old mode 100644 new mode 100755 diff --git a/sk-commit.bat b/sk-commit.bat old mode 100644 new mode 100755 diff --git a/sk-new-branch.bat b/sk-new-branch.bat old mode 100644 new mode 100755