diff --git a/ci4/.env b/ci4/.env
index c6225611..7541e4d4 100755
--- a/ci4/.env
+++ b/ci4/.env
@@ -22,8 +22,8 @@ CI_ENVIRONMENT = development
# APP
#--------------------------------------------------------------------
-# app.baseURL = 'https://sk-jjo.imnavajas.es'
-app.baseURL = 'https://sk-imn.imnavajas.es'
+app.baseURL = 'https://sk-jjo.imnavajas.es'
+# app.baseURL = 'https://sk-imn.imnavajas.es'
# app.baseURL = "http://safekat.test/"
# app.forceGlobalSecureRequests = false
diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
index 77700dd7..23092f5f 100755
--- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
+++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php
@@ -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;
@@ -144,13 +145,16 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
endif; // ($requestMethod === 'post')
+ $this->viewData['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
$this->viewData['presupuestoEntity'] = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity();
+ $this->viewData['isCosido'] = (new TipoPresupuestoModel())->get_isCosido($this->viewData['tipo_impresion_id']);
+
$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['tipo_impresion_id'] = 4; // Cosido tapa blanda JJO
+
$this->viewData['formAction'] = route_to('createCosidotapablanda');
@@ -303,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();
@@ -524,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();
@@ -648,11 +655,15 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
continue;
}
- $linea['fields']['precio_hora'] = $precio_hora;
+ $linea['fields']['tipo_maquina'] = $maquina->is_tinta?'inkjet':'toner';
+ $linea['fields']['precio_hora'] = $precio_hora*$margen_precio_hora/100.0;
$linea['fields']['precio_hora_margen'] = $margen_precio_hora;
$linea['fields']['horas_maquina'] = $tiempo;
$linea['fields']['precio_impresion_horas'] = $precio_hora*$tiempo*1.0;
$linea['fields']['margen_impresion_horas'] = $precio_hora*$tiempo*1.0*$margen_precio_hora/100.0;
+
+ $linea['fields']['total_impresion'] = $linea['fields']['precio_pedido'] + // papel
+ $linea['fields']['precio_impresion_horas']; // impresion
array_push($lineas, $linea);
}
@@ -766,6 +777,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
$linea['fields']['maquina'] = $maquina->maquina;
$linea['fields']['maquina_id'] = $maquina->maquina_id;
$linea['fields']['maquina_velocidad'] = $maquina->velocidad;
+ $linea['fields']['tipo_maquina'] = 'inkjet';
$linea['fields']['papel_impresion'] = $papel->nombre;
$linea['fields']['papel_impresion_id'] = $papel->id;
$linea['fields']['paginas'] = $datosPedido->paginas;
@@ -808,7 +820,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
continue;
}
- $linea['fields']['precio_hora'] = $precio_hora;
+ $linea['fields']['precio_hora'] = $precio_hora*$margen_precio_hora/100.0;
$linea['fields']['precio_hora_margen'] = $margen_precio_hora;
$linea['fields']['horas_maquina'] = $tiempo;
$linea['fields']['precio_impresion_horas'] = $precio_hora*$tiempo*1.0;
@@ -1066,7 +1078,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
protected function getPapelGenericoCubierta()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
- $data = $model->getPapelForComparador('color', true, false);
+ $data = $model->getPapelForComparador('colorhq', true, false);
array_unshift($data, (object)array(
"id" => 0,
"nombre" => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))])
@@ -1077,7 +1089,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
protected function getPapelGenericoSobreCubierta()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
- $data = $model->getPapelForComparador('color', false, true);
+ $data = $model->getPapelForComparador('colorhq', false, true);
array_unshift($data, (object)array(
"id" => 0,
"nombre" => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))])
@@ -1129,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');
diff --git a/ci4/app/Controllers/Test.php b/ci4/app/Controllers/Test.php
index cacea56c..7a2ef553 100755
--- a/ci4/app/Controllers/Test.php
+++ b/ci4/app/Controllers/Test.php
@@ -155,6 +155,13 @@ class Test extends BaseController
var_dump($data);
}
+ public function getPapelesCubierta(){
+ $model = model('App\Models\Configuracion\PapelGenericoModel');
+ $data = $model->getPapelForComparador('colorhq', true, false);
+
+ var_dump($data);
+ }
+
public function getGramaje(){
$model = new PapelGenericoModel();
$data = $model->getGramajeComparador("AHUESADO OFFSET", "bnhq" );
diff --git a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php
index ed183b88..af4b8b7a 100755
--- a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php
+++ b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php
@@ -29,6 +29,7 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
"precio" => null,
"total_papel_pedido" => null,
"margen_papel_pedido" => null,
+ "margen_impresion" => null,
"rotativa_impresion" => null,
"rotativa_pag_color" => 0,
"rotativa_set_values" => false,
@@ -65,9 +66,15 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
"rotativa_tiempo_corte" => 0,
"rotativa_precio_hora_corte" => 0,
"rotativa_total_corte" => 0,
- "isActiva" => false,
"check_impresion_total" => false,
"check_papel_total" => false,
+ "maquina" => null,
+ "papel_impresion" => null,
+ "maquina_tipo" => 'toner',
+ "horas_maquina" => 0,
+ "precio_hora" => 0,
+ "precio_impresion" => 0,
+ "total_linea" => 0,
];
protected $casts = [
"presupuesto_id" => "int",
@@ -89,6 +96,7 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
"precio" => "?float",
"total_papel_pedido" => "?float",
"margen_papel_pedido" => "?float",
+ "margen_impresion" => "?float",
"rotativa_pag_color" => "int",
"rotativa_set_values" => "boolean",
"rotativa_negro" => "float",
@@ -124,8 +132,11 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
"rotativa_tiempo_corte" => "float",
"rotativa_precio_hora_corte" => "float",
"rotativa_total_corte" => "float",
- "isActiva" => "boolean",
"check_impresion_total" => "boolean",
"check_papel_total" => "boolean",
+ "horas_maquina" => "double",
+ "precio_hora" => "double",
+ "precio_impresion" => "double",
+ "total_linea" => "double",
];
}
diff --git a/ci4/app/Language/en/Presupuestos.php b/ci4/app/Language/en/Presupuestos.php
index 2b4b89f9..3626c567 100755
--- a/ci4/app/Language/en/Presupuestos.php
+++ b/ci4/app/Language/en/Presupuestos.php
@@ -76,12 +76,14 @@ return [
'click' => 'Click',
'totalClicks' => 'Total clicks',
'horas' => 'Machine hours',
+ 'precioHora' => 'Price hour',
'precioImpresion' => 'Print price',
'precioPagNegro' => 'Pages black price',
'precioPagColor' => 'Pages color price',
'totalTinta' => 'Total ink',
'totalCorte' => 'Total cut',
'total' => 'Total',
+ 'totalLinea' => 'Row Total',
'aFavorFibra' => 'In fiber direction',
'cubierta' => 'Cover',
'sobrecubierta' => 'Dust jacket',
diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php
index 9ed161c8..cd1ff429 100755
--- a/ci4/app/Language/es/Presupuestos.php
+++ b/ci4/app/Language/es/Presupuestos.php
@@ -69,18 +69,20 @@ return [
'pliegosPedido' => 'Pliegos pedido',
'precioPliego' => 'Precio pliegos',
'libro' => 'Libro',
- 'totalPapelPedido' => 'Total papel pedido',
+ 'totalPapelPedido' => 'Papel pedido',
'lomo' => 'Lomo',
'peso' => 'Peso',
'click' => 'Click',
'totalClicks' => 'Total clicks',
'horas' => 'Horas máquina',
+ 'precioHora' => 'Precio hora',
'precioImpresion' => 'Precio impresión',
'precioPagNegro' => 'Precio pág. negro',
'precioPagColor' => 'Precio pág. color',
'totalTinta' => 'Total tinta',
'totalCorte' => 'Total corte',
'total' => 'Total',
+ 'totalLinea' => 'Total Precio Línea',
'aFavorFibra' => 'A favor de fibra',
'cubierta' => 'Cubierta',
'sobrecubierta' => 'Sobrecubierta',
@@ -106,7 +108,7 @@ return [
'porDefecto' => 'Por defecto',
'tipoImpresion' => 'Impresion',
- 'numPagColor' => 'Nº Paginas Color',
+ 'numPagColor' => 'Nº Pag. Color',
'saturacion' => 'Saturación',
'cobNegro' => 'Cob. % Negro',
'cobCyan' => 'Cob. % Cyan',
diff --git a/ci4/app/Models/Configuracion/MaquinaModel.php b/ci4/app/Models/Configuracion/MaquinaModel.php
index f9cb6f52..25fa6b61 100755
--- a/ci4/app/Models/Configuracion/MaquinaModel.php
+++ b/ci4/app/Models/Configuracion/MaquinaModel.php
@@ -353,7 +353,7 @@ class MaquinaModel extends \App\Models\GoBaseModel
->groupEnd();
}
- public function getMaquinaImpresionForPresupuesto($is_rotativa, $tarifa_tipo, $uso_tarifa = 'interior', $tirada, $papel_impresion_id = -1)
+ public function getMaquinaImpresionForPresupuesto($is_rotativa, $tarifa_tipo, $uso_tarifa , $tirada, $papel_impresion_id = -1)
{
/*
1.-> tarifa_Tipo impresion
diff --git a/ci4/app/Models/Configuracion/PapelGenericoModel.php b/ci4/app/Models/Configuracion/PapelGenericoModel.php
index 4d412398..e8d1c99a 100755
--- a/ci4/app/Models/Configuracion/PapelGenericoModel.php
+++ b/ci4/app/Models/Configuracion/PapelGenericoModel.php
@@ -93,7 +93,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
}
- public function getPapelForComparador($tipo, $is_cubierta = null, $is_sobrecubierta = null, $rotativa = null)
+ public function getPapelForComparador($tipo, $is_cubierta = false, $is_sobrecubierta = false, $rotativa = false)
{
/*
1.-> Tipo impresion
@@ -105,6 +105,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
->table($this->table . " t1")
->select(
"t1.id as id, t1.nombre AS nombre"
+ // for debug, t2.nombre AS nombre_papel_impresion, t4.nombre AS maquina_nombre, t5.uso AS tarifa_uso, t5.tipo AS tarifa_tipo"
)
->distinct('t1.id')
->join("lg_papel_impresion t2", "t2.papel_generico_id = t1.id", "left")
@@ -114,36 +115,48 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
->where("t1.is_deleted", 0)
->where("t2.is_deleted", 0)
+ ->where("t2.isActivo", 1)
->where("t3.active", 1)
->where("t4.is_deleted", 0)
->where("t4.tipo", "impresion")
+ ->where("t5.is_deleted", 0)
->where("t5.tipo", $tipo);
- if(!is_null($is_cubierta)){
- if($is_cubierta==true){
+ if($is_cubierta==true){
+
$builder->where("t2.cubierta", 1);
- }
+ $builder->where("t5.uso", 'cubierta');
+ }
+ else{
+ $builder->where("t2.cubierta", 0);
+ $builder->where("t5.uso", 'interior');
}
- if(!is_null($is_sobrecubierta)){
- if($is_sobrecubierta==true){
+ if($is_sobrecubierta==true){
$builder->where("t2.sobrecubierta", 1);
- }
+ $builder->where("t5.uso", 'sobrecubierta');
+ }
+ else{
+ $builder->where("t2.sobrecubierta", 0);
}
- if(!is_null($rotativa)){
- if($rotativa==true){
+ if($is_cubierta==false && $is_sobrecubierta==false){
+ $builder->where("t5.uso", 'interior');
+ }
+
+ if($rotativa==true){
$builder->where("t2.rotativa", 1);
- }
}
- return $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
+ $data = $builder->orderBy("t1.nombre", "asc")->get()->getResultObject();
+ //var_dump($this->db->getLastQuery());
+ return $data;
}
public function getGramajeComparador(string $papel_generico_nombre="", $uso="")
{
if($uso == 'cubierta' || $uso == 'sobrecubierta')
- $tipo = 'color';
+ $tipo = 'colorhq';
else
$tipo=$uso; // color y colorhq valen para los dos
if($uso == 'bn')
diff --git a/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php b/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php
index 6c69f207..7512a0ae 100755
--- a/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php
+++ b/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php
@@ -35,6 +35,7 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
"precio",
"total_papel_pedido",
"margen_papel_pedido",
+ "margen_impresion",
"rotativa_impresion",
"rotativa_pag_color",
"rotativa_set_values",
@@ -73,7 +74,13 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
"rotativa_total_corte",
'check_impresion_total',
'check_papel_total',
- "isActiva",
+ "maquina",
+ "papel_impresion",
+ "maquina_tipo",
+ "horas_maquina",
+ "precio_hora",
+ "precio_impresion",
+ "total_linea",
];
protected $returnType = "App\Entities\Presupuestos\PresupuestoLineaEntity";
@@ -322,22 +329,28 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
->select(
"*"
)
- ->where("t1.presupuesto_id", $presupuesto_id)
- ->where("t1.isActiva", 1);
-
-
+ ->where("t1.presupuesto_id", $presupuesto_id);
+
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
- public function updateLineasPresupuesto($presupuesto_id = -1, $datos=[])
+ public function deleteLineasPresupuesto($presupuesto_id){
+ $this->db
+ ->table($this->table . " t1")
+ ->where("presupuesto_id", $presupuesto_id)
+ ->delete();
+ }
+
+ public function insertLineasPresupuesto($presupuesto_id = -1, $datos=[])
{
+ $this->deleteLineasPresupuesto($presupuesto_id);
+
foreach($datos as $linea){
$this->db
->table($this->table . " t1")
->where("t1.presupuesto_id", $presupuesto_id)
- ->where("t1.tipo", $linea["tipo"])
- ->update($linea);
+ ->insert($linea);
}
}
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
index a75db67d..81885369 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosEnvios.php
@@ -135,10 +135,6 @@ $(document).on('click', '.btn-edit-add', function(e) {
$('#add_entregaPieCalle').prop('checked', data.entregaPieCalle==1?true:false)
$newAddDialog.modal('show')
-
-
- console.log(data)
- console.log()
})
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 f0de6254..1b501c81 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
@@ -281,7 +281,7 @@ function calcular_mermas(){
const tirada = parseInt($('#tirada').val())
var merma = 0
- if(tirada>POD){
+ if(tirada>){
merma = tirada*0.1<=30 ? tirada*0.1 : 30
}
else{
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
index 0d849206..4107e5a4 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php
@@ -1076,10 +1076,12 @@
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
- if($('#tipoImpresion').select2('data')[0].id == 'negro'){
- $('#compPaginasColor').val('0')
- $('#compPaginasNegro').val($('#paginas').val())
- }
+
+ $('#compPaginasColor').val('0')
+ $('#compPaginasColorhq').val('0')
+ $('#compPaginasNegrohq').val('0');
+ $('#compPaginasNegro').val($('#paginas').val())
+
if( $('#tableCompIntPlana').DataTable().rows().count() > 0 &&
$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
@@ -1095,12 +1097,11 @@
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
- if($('#tipoImpresion').select2('data')[0].id == 'negrohq'){
- $('#compPaginasColorhq').val('0')
- $('#compPaginasNegrohq').val($('#paginas').val())
- $('#compGramajeNegohq').change().trigger()
- }
-
+ $('#compPaginasColorhq').val('0')
+ $('#compPaginasColor').val('0')
+ $('#compPaginasNegro').val('0')
+ $('#compPaginasNegrohq').val($('#paginas').val())
+
if($('#tableCompIntPlana').DataTable().rows().count() > 0 &&
!$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
@@ -1112,7 +1113,7 @@
$('#tipoImpresion').on("select2:close", function () {
- $('#paginas').change(),trigger();
+ $('#paginas').change()
})
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
index 7f23f7a1..8398dfce 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosServiciosItems.php
@@ -249,8 +249,6 @@
})
- const POD = ;
-
$('#serv_default').on('click', function(){
get_tarifas_enc('default').then(
get_tarifas_manipulado('default')
@@ -390,7 +388,7 @@
body: JSON.stringify({
datos: datosAcabado,
tirada: tirada,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
}),
headers: {
@@ -415,7 +413,7 @@
paginas: paginas,
ancho: dimension.ancho,
alto: dimension.alto,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
}),
headers: {
@@ -448,7 +446,7 @@
body: JSON.stringify({
datos: datosManipulado,
tirada: tirada,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
}),
headers: {
@@ -575,7 +573,7 @@
var datos = {
tarifa_acabado_id : tarifa_id,
tirada: tirada,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
};
@@ -813,7 +811,7 @@
ancho: dimension.ancho,
alto: dimension.alto,
proveedor_id: parseInt($('#' + this.id).select2('data')[0].id),
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
};
@@ -875,7 +873,7 @@
tirada: tirada,
ancho: dimension.ancho,
alto: dimension.alto,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
};
@@ -1090,7 +1088,7 @@
var datos = {
tarifa_manipulado_id : tarifa_id,
tirada: tirada,
- POD: POD,
+ POD: ,
= csrf_token() ?? "token" ?> : = csrf_token() ?>v
};
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
index e6a5b498..1fb059d5 100755
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
@@ -16,885 +16,34 @@
-
@@ -923,88 +72,717 @@
= $this->section("additionalInlineJs") ?>
+const papelGenericoNegroList = ;
+const papelGenericoNegroHQList = ;
+const papelGenericoColorList = ;
+const papelGenericoColorHQList = ;
+const papelGenericoCubiertaList = ;
+const papelGenericoSobrecubiertaList = ;
+const papelGenericoRotativaNegroList = ;
+const papelGenericoRotativaColorList = ;
+
+
+// Formatting function for row details - modify as you need
+function format(d) {
+ var value = '
'+
+ ' | '+
+ ' | '+
+ ' | '+
+ ''+
+ '' +
+ ' | '
+
+
+
+
+ value += '
'
+
+ if(d.maquinaTipo=='inkjet'){
+ value +=
+ '
'+
+ ' | '+
+ ' | '+
+ ' | '+
+ ''+
+ '' +
+
+ ' | ' +
+ '
' +
+ '
'+
+ ' | '+
+ ' | '+
+ ' | '+
+ ''+
+ '' +
+ (d.row_id.includes('rot')?' ' +
+ ' | ' +
+ '
' +
+ '
'+
+ ' | '+
+ ' | '+
+ ' | '+
+ ''+
+ '' +
+ (d.row_id.includes('rot')?' ': ' ') +
+ '= lang('Presupuestos.metrosPapelLibro') ?>' +
+ '' +
+ ' ' +
+ (d.row_id.includes('rot')?' | ' +
+ '
' +
+ '
'+
+ ' | '+
+ ' | '+
+ ' | '+
+ ''+
+ '' +
+ (d.row_id.includes('rot')?' ': ' ') +
+ '= lang('Presupuestos.velocidadCorte') ?>' +
+ '' +
+ ' ' +
+ (d.row_id.includes('rot')?' ': ' ') +
+ '= lang('Presupuestos.precioHoraCorte') ?>' +
+ '' +
+ ' ' +
+ (d.row_id.includes('rot')?' ' +
+ ' | ' +
+ '
'
+ }
+
+ return $(value).toArray();
+}
+
+const lastColNr_lp = $('#tableLineasPresupuesto').find("tr:first th").length - 1;
+
+const actionBtns_lp = function(data) {
+ return `
+
+ `;
+};
+
+var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
+ scrollX: true,
+ searching: false,
+ paging: false,
+ info: false,
+ ordering: false,
+ responsive: true,
+ select: false,
+ rowId: 'row_id',
+ language: {
+ url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/= config('Basics')->i18n ?>.json"
+ },
+ columnDefs: [
+ {
+ targets: 0,
+ className: 'dt-control',
+ orderable: false,
+ data: null,
+ defaultContent: ''
+ },
+ {
+ targets: [1,2,3,4,5,6,7,8,9],
+ orderable: false,
+ visible: false,
+ },
+ {
+ orderable: false,
+ searchable: false,
+ targets: [lastColNr_lp]
+ },
+ ],
+ columns: [
+ {data: null},
+ {data: 'tarifa_impresion_id'},
+ {data: 'maquina_ancho'},
+ {data: 'maquina_alto'},
+ {data: 'maquina_impresion_ancho'},
+ {data: 'maquina_impresion_alto'},
+ {data: 'formas'},
+ {data: 'formas_v'},
+ {data: 'formas_h'},
+ {data: 'formas_orientacion'},
+ {data: 'icon',
+ render: function ( data, type, row, meta ){
+ return '

'
+ }
+ },
+ {data: 'paginas',
+ render: function ( data, type, row, meta ) {
+ if(row.row_id != "lp_cubierta" && row.row_id != "lp_sobrecubierta")
+ return '
| ';
+ else if(row.row_id == "lp_cubierta"){
+ return ' \
+
\
+ ';
+ }
+ }
+ },
+ {data: 'papel',
+ render: function ( data, type, row, meta ) {
+ var select = $('