linea de presupuesto bn funcionando a falta de borrar

This commit is contained in:
Jaime Jiménez Ortega
2023-11-06 09:11:05 +01:00
parent 876d763abd
commit 71706158ca
8 changed files with 425 additions and 437 deletions

View File

@ -747,20 +747,78 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
$datos = $reqData['datos'] ?? null;
//$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
$newTokenHash = csrf_hash();
$csrfTokenName = csrf_token();
if ($tipo == 'gramaje') {
// En este caso contiene el nombre del papel generico
$model = new PapelGenericoModel();
$menu = $model->getGramajeComparador($datos, $uso );
}
$newTokenHash = csrf_hash();
$csrfTokenName = csrf_token();
$data = [
'menu' => $menu,
$csrfTokenName => $newTokenHash
];
}
elseif ($tipo == 'gramajeLineasPresupuesto') {
$tipoLinea = $reqData['tipoLinea'] ?? null;
// En este caso contiene el id del papel generico
$model = new PapelGenericoModel();
$menu = $model->getGramajeLineasPresupuesto($datos, $tipoLinea, $uso );
$data = [
'menu' => $menu,
$csrfTokenName => $newTokenHash
];
}
elseif ($tipo == 'papelImpresion') {
$gramaje = $reqData['gramaje'] ?? null;
$tipoLinea = $reqData['tipoLinea'] ?? null;
// En este caso contiene el nombre del papel generico
// Uso: negro, negrohq, color, colorhq, rot_bn, rot_color,
$model = new PapelImpresionModel();
$menu = $model->getPapelesImpresionForMenu($datos, $gramaje, $tipoLinea, $uso );
$data = [
'menu' => $menu,
$csrfTokenName => $newTokenHash
];
}
elseif ($tipo == 'maquina') {
$is_rotativa = $reqData['is_rotativa'] ?? null;
$papel_impresion = $reqData['papel_impresion'] ?? null;
$tipo_linea = $reqData['tipoLinea'] ?? null;
$ancho = $reqData['ancho'] ?? null;
$alto = $reqData['alto'] ?? null;
// Datos contiene la tirada
// uso: negro, negrohq, color, colorhq,
$model = new MaquinaModel();
$maquinas = $model->getMaquinaImpresionForPresupuesto($is_rotativa, $uso, $datos, $papel_impresion );
$menu = [];
foreach ($maquinas as $maquina){
$formas = PresupuestoService::getNumFormasPlana($tipo_linea, $maquina, floatval($ancho), floatval($alto), true);
if($formas['num_formas'] != 'n/a'){
array_push($menu, $maquina);
}
}
$data = [
'menu' => $menu,
$csrfTokenName => $newTokenHash
];
}
else{
$data = [
'tipo' => $tipo,
$csrfTokenName => $newTokenHash
];
}
return $this->respond($data);
} else {
return $this->failUnauthorized('Invalid request', 403);
@ -912,391 +970,4 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
/*
protected function getUbicacionLibroListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('LgUbicacionesLibros.ubicacionLibro'))])];
if (!empty($selId)) :
$ubicacionesLibroModel = model('App\Models\Configuracion\UbicacionesLibroModel');
$selOption = $ubicacionesLibroModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getFormaPagoListItems()
{
$formasPagoModel = model('App\Models\Configuracion\FormasPagoModel');
$onlyActiveOnes = true;
$data = $formasPagoModel->getAllForMenu('id, nombre', 'nombre', $onlyActiveOnes);
return $data;
}
protected function getPapelImpresionListItems4($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])];
if (!empty($selId)) :
$papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel');
$selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPresupuestoEstadoListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PresupuestoEstados.presupuestoEstado'))])];
if (!empty($selId)) :
$presupuestoEstadoModel = model('App\Models\Presupuestos\PresupuestoEstadoModel');
$selOption = $presupuestoEstadoModel->where('id', $selId)->findColumn('estado');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelGenericoListItems3($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])];
if (!empty($selId)) :
$papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel');
$selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelImpresionListItems2($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])];
if (!empty($selId)) :
$papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel');
$selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinaListItems3($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])];
if (!empty($selId)) :
$maquinaModel = model('App\Models\Presupuestos\MaquinaModel');
$selOption = $maquinaModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinasTarifasImpresionListItems2($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])];
if (!empty($selId)) :
$maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel');
$selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelGenericoListItems2($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])];
if (!empty($selId)) :
$papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel');
$selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinaListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])];
if (!empty($selId)) :
$maquinaModel = model('App\Models\Presupuestos\MaquinaModel');
$selOption = $maquinaModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinaListItems2($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])];
if (!empty($selId)) :
$maquinaModel = model('App\Models\Presupuestos\MaquinaModel');
$selOption = $maquinaModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getTipologiasLibroListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('TipologiasLibros.tipologiasLibro'))])];
if (!empty($selId)) :
$tipologiasLibroModel = model('App\Models\Presupuestos\TipologiasLibroModel');
$selOption = $tipologiasLibroModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelImpresionListItems3($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])];
if (!empty($selId)) :
$papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel');
$selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinasTarifasImpresionListItems4($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])];
if (!empty($selId)) :
$maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel');
$selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getUserListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])];
if (!empty($selId)) :
$userModel = model('App\Models\Presupuestos\UserModel');
$selOption = $userModel->where('id_user', $selId)->findColumn('first_name');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinasTarifasImpresionListItems3($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])];
if (!empty($selId)) :
$maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel');
$selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('id');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getUserListItems3($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])];
if (!empty($selId)) :
$userModel = model('App\Models\Presupuestos\UserModel');
$selOption = $userModel->where('id_user', $selId)->findColumn('first_name');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelImpresionListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])];
if (!empty($selId)) :
$papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel');
$selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getTiposImpresionListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('TiposImpresions.tiposImpresion'))])];
if (!empty($selId)) :
$tiposImpresionModel = model('App\Models\Presupuestos\TiposImpresionModel');
$selOption = $tiposImpresionModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinasTarifasImpresionListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])];
if (!empty($selId)) :
$maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel');
$selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelGenericoListItems4($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])];
if (!empty($selId)) :
$papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel');
$selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getMaquinaListItems4($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])];
if (!empty($selId)) :
$maquinaModel = model('App\Models\Presupuestos\MaquinaModel');
$selOption = $maquinaModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getUserListItems2($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])];
if (!empty($selId)) :
$userModel = model('App\Models\Presupuestos\UserModel');
$selOption = $userModel->where('id_user', $selId)->findColumn('first_name');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPapelGenericoListItems($selId = null)
{
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])];
if (!empty($selId)) :
$papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel');
$selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre');
if (!empty($selOption)) :
$data[$selId] = $selOption[0];
endif;
endif;
return $data;
}
protected function getPaginasCubiertaOptions()
{
$paginasCubiertaOptions = [
'' => lang('Basic.global.pleaseSelect'),
'4x0' => '4x0',
'4x4' => '4x4',
];
return $paginasCubiertaOptions;
}
protected function getPaginasPortadaOptions()
{
$paginasPortadaOptions = [
'' => lang('Basic.global.pleaseSelect'),
'4x0' => '4x0',
'4x4' => '4x4',
];
return $paginasPortadaOptions;
}
*/
}

View File

@ -135,6 +135,9 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
public function getGramajeComparador(string $papel_generico_nombre="", $uso="")
{
if($uso == 'cubierta' || $uso == 'sobrecubierta')
$tipo = 'color';
else
$tipo=$uso; // color y colorhq valen para los dos
if($uso == 'bn')
$tipo="negro";
@ -169,7 +172,55 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
else if ($uso == 'sobrecubierta')
$builder->where("t2.sobrecubierta", 1);
$values = $builder->orderBy("t2.gramaje", "asc")->get()->getResultObject();
$id = 1;
foreach ($values as $value){
$value->id = $id;
$id++;
}
$values_array = array_map( function( $value ) {
return $value->text;
}, $values );
$unique_values = array_unique($values_array);
return array_values(array_intersect_key($values, $unique_values));
}
//tipo: negro, negrohq, color, colorhq
//uso: interior, rotativa, cubierta, sobrecubierta
public function getGramajeLineasPresupuesto($papel_generico_id=0, $tipo="", $uso="")
{
$builder = $this->db
->table($this->table . " t1")
->select(
"t2.gramaje AS text"
)
->join("lg_papel_impresion t2", "t2.papel_generico_id = t1.id", "left")
->join("lg_maquina_papel_impresion t3", "t3.papel_impresion_id = t2.id", "left")
->join("lg_maquinas t4", "t3.maquina_id = t4.id", "left")
->join("lg_maquinas_tarifas_impresion t5", "t5.maquina_id = t4.id", "left")
->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.tipo", $tipo)
->where("t1.id", $papel_generico_id);
if($tipo == 'negro' || $tipo == 'negrohq')
$builder->where("t2.bn", 1);
else if ($tipo == 'color' || $tipo == 'colorhq')
$builder->where("t2.color", 1);
if ($uso == 'cubierta')
$builder->where("t2.cubierta", 1);
else if ($uso == 'sobrecubierta')
$builder->where("t2.sobrecubierta", 1);
if($uso=='rotativa')
$builder->where("t2.rotativa", 1);
else
$builder->where("t2.rotativa", 0);
$values = $builder->orderBy("t2.gramaje", "asc")->get()->getResultObject();

View File

@ -255,6 +255,76 @@ class PapelImpresionModel extends \App\Models\GoBaseModel
$builder->where("t1.rotativa", $rotativa);
}
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
//tipo: negro, negrohq, color, colorhq
//uso: interior, rotativa, cubierta, sobrecubierta
public function getPapelesImpresionForMenu($papel_generico = null, $gramaje = null, $tipo = null, $uso=""){
$builder = $this->db
->table($this->table . " t1")
->distinct("t1.id")
->join("lg_papel_generico t2", "t1.papel_generico_id = t2.id", "left")
->join("lg_maquina_papel_impresion t3", "t1.id = t3.papel_impresion_id", "left")
->join("lg_maquinas t4", "t3.maquina_id = t4.id", "left")
->join("lg_maquinas_tarifas_impresion t5", "t4.id = t5.maquina_id", "left")
->select(
"t1.id AS id, t1.nombre AS text");
$builder->where("t1.is_deleted", 0);
$builder->where("t1.isActivo", 1);
$builder->where("t2.is_deleted", 0);
$builder->where("t3.active", 1);
$builder->where("t4.is_deleted", 0);
$builder->where("t4.tipo", 'impresion');
$builder->where("t5.is_deleted", 0);
$builder->where("t5.tipo", $tipo);
$builder->where("t2.id", $papel_generico);
$builder->where("t1.gramaje", $gramaje);
if($tipo == 'negro' || $tipo == 'negrohq')
$builder->where("t1.bn", 1);
else if ($tipo == 'color' || $tipo == 'colorhq')
$builder->where("t1.color", 1);
if ($uso == 'cubierta')
$builder->where("t1.cubierta", 1);
else if ($uso == 'sobrecubierta')
$builder->where("t1.sobrecubierta", 1);
if($uso=='rotativa')
$builder->where("t1.rotativa", 1);
else
$builder->where("t1.rotativa", 0);
/*
if($tipo=='negro' || $tipo=='negrohq'){
$builder->where("t1.bn", 1);
$builder->where("t1.rotativa", 0);
}
elseif($tipo=='color' || $tipo=='colorhq'){
$builder->where("t1.color", 1);
$builder->where("t1.rotativa", 0);
}
elseif($tipo=='cubierta'){
$builder->where("t1.cubierta", 1);
$builder->where("t1.color", 1);
$builder->where("t1.rotativa", 0);
}
elseif($tipo=='sobrecubierta'){
$builder->where("t1.sobrecubierta", 1);
$builder->where("t1.color", 1);
$builder->where("t1.rotativa", 0);
}
elseif($tipo=='rot_bn'){
$builder->where("t1.bn", 1);
$builder->where("t1.rotativa", 1);
}
elseif($tipo=='rot_color'){
$builder->where("t1.color", 1);
$builder->where("t1.rotativa", 1);
}
*/
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
}
}

View File

@ -251,7 +251,7 @@ class PresupuestoService extends BaseService
}
private static function getNumFormasPlana($uso, $maquina, $ancho, $alto, $isCosido)
public static function getNumFormasPlana($uso, $maquina, $ancho, $alto, $isCosido)
{
// El ancho si es cosido es el doble
if($uso != 'cubierta' && $uso != 'sobrecubierta'){

View File

@ -95,7 +95,7 @@
<label for="merma" class="form-label">
<?= lang('Presupuestos.merma') ?>*
</label>
<input type="number" id="merma" name="merma" maxLength="8" step="0.01" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
<input type="number" id="merma" name="merma" maxLength="8" step="1" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
@ -104,7 +104,7 @@
<label for="mermacubierta" class="form-label">
<?= lang('Presupuestos.mermacubierta') ?>*
</label>
<input type="number" id="mermacubierta" name="merma_cubierta" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
<input type="number" id="mermacubierta" name="merma_cubierta" placeholder="10" maxLength="8" step="1" class="form-control" value="<?= old('merma_cubierta', $presupuestoEntity->merma_cubierta) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->

View File

@ -37,9 +37,9 @@
<tbody>
<tr id="lp_bn">
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bn.png') ?>" /></td>
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input lp-bn-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_bn_papel" name="lp_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_bn_papel" name="lp_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
foreach ($papelGenericoNegroList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -52,28 +52,28 @@
</select>
</td>
<td class="lp-td">
<select id="lp_bn_gramaje" name="lp_bn_gramaje" class="form-control form-select-sm lp-cell lp-select" style="min-width: 40px;">
<select id="lp_bn_gramaje" name="lp_bn_gramaje" class="form-control form-select-sm lp-cell lp-select lp-bn-select" style="min-width: 40px;">
</select>
</td>
<td class="lp-td">
<select id="lp_bn_papelCompra" name="lp_bn_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_bn_papelImpresion" name="lp_bn_papelImpresion" class="form-control form-select-sm lp-cell lp-select lp-bn-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_bn_maquina" name="lp_bn_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_bn_maquina" name="lp_bn_maquina" class="form-control form-select-sm lp-cell lp-select lp-bn-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_bn_tiempo" name="lp_bn_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_numeroPliegos" name="lp_bn_numeroPliegos" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_pliegosPedido" name="lp_bn_pliegosPedido" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_precioPliego" name="lp_bn_precioPliego" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_libro" name="lp_bn_libro" readonly class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_totalPapelPedido" name="lp_bn_totalPapelPedido" readonly class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_tiempo" name="lp_bn_tiempo" class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_numeroPliegos" name="lp_bn_numeroPliegos" class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_pliegosPedido" name="lp_bn_pliegosPedido" class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_precioPliego" name="lp_bn_precioPliego" class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_libro" name="lp_bn_libro" readonly class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_totalPapelPedido" name="lp_bn_totalPapelPedido" readonly class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_checkPapel" name="lp_bn_checkPapel_bn" style="width: 15px; padding: 0; margin:0;" type="checkbox" checked></td>
<td class="lp-td"><input id="lp_bn_lomo" name="lp_bn_lomo" readonly class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_peso" name="lp_bn_peso" readonly class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_click" name="lp_bn_click" readonly class="lp-input lp-cell lp-cell-disabled" value="0"></td>
<td class="lp-td"><input id="lp_bn_totalClicks" name="lp_bn_totalClicks" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_lomo" name="lp_bn_lomo" readonly class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_peso" name="lp_bn_peso" readonly class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_click" name="lp_bn_click" readonly class="lp-input lp-cell lp-cell-disabled lp-bn-input" value="0"></td>
<td class="lp-td"><input id="lp_bn_totalClicks" name="lp_bn_totalClicks" class="lp-input lp-cell lp-cell-disabled lp-bn-input" type="text" value="0"></td>
<td class="lp-td"><input id="lp_bn_checkClicks" name="lp_bn_checkClicks" style="width: 15px; padding: 0; margin:0;" type="checkbox" checked></td>
<td style="padding: 0; margin:0;"><a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2"></i></a></td>
</tr>
@ -82,7 +82,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bnhq.png') ?>" /></td>
<td class="lp-td"><input id="lp_bnhq_paginas" name="lp_bnhq_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_bnhq_papel" name="lp_bnhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_bnhq_papel" name="lp_bnhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
foreach ($papelGenericoNegroHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -99,11 +99,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_bnhq_papelCompra" name="lp_bnhq_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_bnhq_papelImpresion" name="lp_bnhq_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_bnhq_maquina" name="lp_bnhq_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_bnhq_maquina" name="lp_bnhq_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_bnhq_tiempo" name="lp_bnhq_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -125,7 +125,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_color.png') ?>" /></td>
<td class="lp-td"><input id="lp_color_paginas" name="lp_color_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_color_papel" name="lp_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_color_papel" name="lp_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
foreach ($papelGenericoColorList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -142,11 +142,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_color_papelCompra" name="lp_color_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_color_papelImpresion" name="lp_color_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_color_maquina" name="lp_color_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_color_maquina" name="lp_color_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_color_tiempo" name="lp_color_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -168,7 +168,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_colorhq.png') ?>" /></td>
<td class="lp-td"><input id="lp_colorhq_paginas" name="lp_colorhq_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_colorhq_papel" name="lp_colorhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_colorhq_papel" name="lp_colorhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -185,11 +185,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_colorhq_papelCompra" name="lp_colorhq_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_colorhq_papelImpresion" name="lp_colorhq_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_colorhq_maquina" name="lp_colorhq_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_colorhq_maquina" name="lp_colorhq_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_colorhq_tiempo" name="lp_colorhq_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -211,7 +211,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_bn.png') ?>" /></td>
<td class="lp-td"><input id="lp_rot_bn_paginas" name="lp_rot_bn_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_rot_bn_papel" name="lp_rot_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_rot_bn_papel" name="lp_rot_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -228,11 +228,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_rot_bn_papelCompra" name="lp_rot_bn_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_rot_bn_papelImpresion" name="lp_rot_bn_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_rot_bn_maquina" name="lp_rot_bn_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_rot_bn_maquina" name="lp_rot_bn_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_rot_bn_tiempo" name="lp_rot_bn_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -460,7 +460,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_color.png') ?>" /></td>
<td class="lp-td"><input id="lp_rot_color_paginas" name="lp_rot_color_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_rot_color_papel" name="lp_rot_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_rot_color_papel" name="lp_rot_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -477,11 +477,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_rot_color_papelCompra" name="lp_rot_color_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_rot_color_papelImpresion" name="lp_rot_color_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_rot_color_maquina" name="lp_rot_color_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_rot_color_maquina" name="lp_rot_color_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_rot_color_tiempo" name="lp_rot_color_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -708,7 +708,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_cubierta.png') ?>" /></td>
<td class="lp-td"><input id="lp_cubierta_paginas" name="lp_cubierta_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_cubierta_papel" name="lp_cubierta_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_cubierta_papel" name="lp_cubierta_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -725,11 +725,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_cubierta_papelCompra" name="lp_cubierta_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_cubierta_papelImpresion" name="lp_cubierta_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_cubierta_maquina" name="lp_cubierta_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_cubierta_maquina" name="lp_cubierta_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_cubierta_tiempo" name="lp_cubierta_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -751,7 +751,7 @@
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_sobrecubierta.png') ?>" /></td>
<td class="lp-td"><input id="lp_sobrecubierta_paginas" name="lp_sobrecubierta_paginas" class="lp-cell lp-input" type="text" value="0"></td>
<td class="lp-td">
<select id="lp_sobrecubierta_papel" name="lp_sobrecubierta_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_sobrecubierta_papel" name="lp_sobrecubierta_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<?php if($v->id != 0): ?>
@ -768,11 +768,11 @@
</select>
</td>
<td class="lp-td">
<select id="lp_sobrecubierta_papelCompra" name="lp_sobrecubierta_papelCompra" class="form-control form-select-sm lp-cell lp-select" style="min-width: 160px;">
<select id="lp_sobrecubierta_papelImpresion" name="lp_sobrecubierta_papelImpresion" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
</select>
</td>
<td class="lp-td">
<select id="lp_sobrecubierta_maquina" name="lp_sobrecubierta_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 120px;">
<select id="lp_sobrecubierta_maquina" name="lp_sobrecubierta_maquina" class="form-control form-select-sm lp-cell lp-select" style="min-width: 110px;">
</select>
</td>
<td class="lp-td"><input id="lp_sobrecubierta_tiempo" name="lp_sobrecubierta_tiempo" class="lp-input lp-cell lp-cell-disabled" type="text" value="0"></td>
@ -804,6 +804,16 @@
<!------------------------------------------->
<?= $this->section("additionalInlineJs") ?>
$('#lp_bn_papel').val('');
$('#lp_bnhq_papel').val('');
$('#lp_color_papel').val('');
$('#lp_colorhq_papel').val('');
$('#lp_rot_bn_papel').val('');
$('#lp_rot_color_papel').val('');
$('#lp_cubierta_papel').val('');
$('#lp_sobrecubierta_papel').val('');
$('#lp_rot_color_vercalculos').on("click", function () {
if($( ".calculos_rot_color" ).css('display') == 'none')
$( ".calculos_rot_color" ).css('display', 'flex')
@ -819,4 +829,188 @@ $('#lp_rot_bn_vercalculos').on("click", function () {
$( ".calculos_rot_bn" ).css('display', 'none')
}
});
function clear_lp_bn(clear_selectors){
let pags = $("#lp_bn_paginas" ).val()
$(".lp-bn-input" ).val("0")
$("#lp_bn_paginas" ).val(pags)
if(clear_selectors)
$( ".lp-bn-select").empty()
}
function fill_lp_bn(data){
$('#lp_bn_tiempo').val(data.tiempo_maquina)
$('#lp_bn_numeroPliegos').val(isNaN(parseFloat(data.pliegos_libro)) ? "" : parseFloat(data.pliegos_libro).toFixed(2))
$('#lp_bn_pliegosPedido').val(isNaN(parseFloat(data.pliegos_pedido)) ? "" : parseFloat(data.pliegos_pedido).toFixed(2))
$('#lp_bn_precioPliego').val(isNaN(parseFloat(data.precios_pliegos)) ? "" : parseFloat(data.precios_pliegos).toFixed(6))
$('#lp_bn_libro').val(isNaN(parseFloat(data.precio_libro)) ? "" : parseFloat(data.precio_libro).toFixed(2))
$('#lp_bn_totalPapelPedido').val(isNaN(parseFloat(data.precio_pedido)) ? "" : parseFloat(data.precio_pedido).toFixed(2))
$('#lp_bn_lomo').val(isNaN(parseFloat(data.mano)) ? "" : parseFloat(data.mano).toFixed(2))
$('#lp_bn_peso').val(isNaN(parseFloat(data.peso)) ? "" : parseFloat(data.peso).toFixed(2))
$('#lp_bn_click').val(isNaN(parseFloat(data.precio_click)) ? "" : parseFloat(data.precio_click).toFixed(6))
$('#lp_bn_totalClicks').val(isNaN(parseFloat(data.precio_click_pedido)) ? "" : parseFloat(data.precio_click_pedido).toFixed(2))
}
$('#lp_bn_papel').on("change", function () {
clear_lp_bn(true)
$.ajax({
type: 'post',
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
data: {
tipo: 'gramajeLineasPresupuesto',
uso: 'interior',
datos: $('#lp_bn_papel option:selected').val() ,
tipoLinea: "negro",
<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v
},
dataType: 'json',
success: function (data) {
yeniden(data.<?= csrf_token() ?>);
$.each(data.menu, function(item){
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
$('#lp_bn_gramaje').append(option);
});
$('#lp_bn_gramaje').val('')
}
});
})
$('#lp_bn_gramaje').on("change", function () {
$('#lp_bn_papelImpresion').empty()
$('#lp_bn_maquina').empty()
clear_lp_bn(false)
$.ajax({
type: 'post',
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
data: {
tipo: 'papelImpresion',
uso: 'negro',
datos: $('#lp_bn_papel option:selected').val() ,
gramaje: $('#lp_bn_gramaje option:selected').text().trim() ,
tipoLinea: "negro",
<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v
},
dataType: 'json',
success: function (data) {
yeniden(data.<?= csrf_token() ?>);
$.each(data.menu, function(item){
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
$('#lp_bn_papelImpresion').append(option);
});
$('#lp_bn_papelImpresion').val('')
}
});
})
$('#lp_bn_papelImpresion').on("change", function () {
$('#lp_bn_maquina').empty()
clear_lp_bn(false)
const dimension = getDimensionLibro();
$.ajax({
type: 'post',
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
data: {
tipo: 'maquina',
uso: 'negro',
tipoLinea: "interior",
is_rotativa: 0,
ancho: dimension.ancho,
alto: dimension.alto,
datos: parseInt($('#tirada').val()) + parseInt($('#merma').val()),
papel_impresion: $('#lp_bn_papelImpresion option:selected').val() ,
<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v
},
dataType: 'json',
success: function (data) {
yeniden(data.<?= csrf_token() ?>);
$.each(data.menu, function(item){
var option = $('<option/>', {'value':data.menu[item].maquina_id, 'text':data.menu[item].maquina})
$('#lp_bn_maquina').append(option);
});
$('#lp_bn_maquina').val('')
}
});
})
$('#lp_bn_maquina').on("change", function () {
if(parseInt($('#lp_bn_paginas').val())>0){
calcularPresupuesto_bn();
}
})
$('#lp_bn_paginas').on("change", function () {
if( parseInt($('#lp_bn_paginas').val())>0 &&
parseInt($('#lp_bn_papel option:selected').val())>0 &&
parseInt($('#lp_bn_gramaje option:selected').val())>0 &&
parseInt($('#lp_bn_papelImpresion option:selected').val())>0
){
calcularPresupuesto_bn();
}
})
function calcularPresupuesto_bn(){
const dimension = getDimensionLibro();
let datos = {
type: 'interior',
color: 0,
hq: 0,
paginas: parseInt($('#lp_bn_paginas').val()),
tirada: parseInt($('#tirada').val()),
merma: parseInt($('#merma').val()),
ancho: dimension.ancho,
alto: dimension.alto,
papel_generico_id: $('#lp_bn_papel option:selected').val() ,
papel_generico: $('#lp_bn_papel option:selected').text().trim(),
gramaje: $('#lp_bn_gramaje option:selected').text().trim(),
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
console.log(datos)
$.ajax({
type: "POST",
url: "/cosidotapablanda/datatable",
data: datos,
success: function (data) {
if(data.lineas.length >0){
// Se cogen los valores de la linea con los datos correspondientes
$.each(data.lineas, function(key, value) {
if(value.fields.maquina_id === $('#lp_bn_maquina option:selected').val() &&
value.fields.papel_generico_id === datos.papel_generico_id &&
value.fields.papel_impresion_id === $('#lp_bn_papelImpresion option:selected').val() ) {
fill_lp_bn(value.fields);
return false;
}
else{
clear_lp_bn(false);
}
});
}
else{
}
yeniden(data.<?= csrf_token() ?>);
},
error: function(e){
}
})
}
<?= $this->endSection() ?>

View File

@ -399,7 +399,7 @@
url: "/cosidotapablanda/datatable",
data: datos,
success: function (data) {
console.log(data)
clearIntLineas(is_color);
if(data.lineas.length >0){
@ -800,6 +800,7 @@
data: function (params) {
return {
tipo: 'gramaje',
uso: 'cubierta',
datos: $('#compPapelCubierta').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};

View File

@ -50,7 +50,8 @@ table.dataTable.table-hover>tbody>tr.selected:hover>* {
}
.lp-input {
min-width: 40px;
text-align: center;
min-width: 50px;
width: 100%;
border-radius: 0.25rem !important;
}