mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/add_check_papeles' into 'main'
Mod/add check papeles See merge request jjimenez/safekat!389
This commit is contained in:
@ -156,8 +156,13 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
if ($this->request->getPost('show_in_client') == null) {
|
||||
$sanitizedData['show_in_client'] = false;
|
||||
}
|
||||
|
||||
|
||||
if ($this->request->getPost('show_in_client_special') == null) {
|
||||
$sanitizedData['show_in_client_special'] = false;
|
||||
}
|
||||
|
||||
if($sanitizedData['show_in_client_special']){
|
||||
$sanitizedData['show_in_client'] = true;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -209,6 +209,19 @@ class Papelesimpresion extends \App\Controllers\BaseResourceController
|
||||
if ($this->request->getPost('inkjet') == null) {
|
||||
$sanitizedData['inkjet'] = false;
|
||||
}
|
||||
if ($this->request->getPost('isActivo') == null) {
|
||||
$sanitizedData['isActivo'] = false;
|
||||
}
|
||||
if ($this->request->getPost('show_in_client') == null) {
|
||||
$sanitizedData['show_in_client'] = false;
|
||||
}
|
||||
if ($this->request->getPost('show_in_client_special') == null) {
|
||||
$sanitizedData['show_in_client_special'] = false;
|
||||
}
|
||||
|
||||
if($sanitizedData['show_in_client_special']){
|
||||
$sanitizedData['show_in_client'] = true;
|
||||
}
|
||||
|
||||
// Hay que asegurarse de que se quitan los consumos de tintas de rotativa
|
||||
// en caso de que se haya deseleccionado la opción rotativa
|
||||
|
||||
@ -10,13 +10,15 @@ class PapelGenerico extends \CodeIgniter\Entity\Entity
|
||||
"nombre" => null,
|
||||
"code" => null,
|
||||
"code_ot" => null,
|
||||
"show_in_client" => true,
|
||||
"show_in_client" => false,
|
||||
"show_in_client_special" => false,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"show_in_client" => "boolean",
|
||||
"show_in_client_special" => "boolean",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -22,6 +22,9 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"guardas" => false,
|
||||
"inkjet" => false,
|
||||
"rotativa" => false,
|
||||
"isActivo" => true,
|
||||
"show_in_client" => false,
|
||||
"show_in_client_special" => false,
|
||||
"is_deleted" => 0,
|
||||
"created_at" => null,
|
||||
"updated_at" => null,
|
||||
@ -39,6 +42,9 @@ class PapelImpresion extends \CodeIgniter\Entity\Entity
|
||||
"sobrecubierta" => "boolean",
|
||||
"guardas" => "boolean",
|
||||
"rotativa" => "boolean",
|
||||
"isActivo" => "boolean",
|
||||
"show_in_client" => "boolean",
|
||||
"show_in_client_special" => "boolean",
|
||||
"is_deleted" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ return [
|
||||
'papelGenericoList' => 'Lista Papeles Genéricos',
|
||||
'papelesGenericos' => 'Papeles Genéricos',
|
||||
'showInClient' => 'Mostrar en cliente',
|
||||
'showInClientSpecial' => 'Papel especial cliente',
|
||||
'updatedAt' => 'Actualizado el',
|
||||
'form_acordion_title' => 'Propiedades Papel Genérico',
|
||||
|
||||
|
||||
@ -35,6 +35,8 @@ return [
|
||||
'rotativa' => 'Rotativa',
|
||||
'updatedAt' => 'Actualizado en',
|
||||
'activo' => 'Activo?',
|
||||
'showInClient' => 'Mostrar en cliente',
|
||||
'showInClientSpecial' => 'Papel especial cliente',
|
||||
'userUpdateId' => 'ID usuario actualización',
|
||||
|
||||
'consumo_tintas_rotativas' => 'Consumo tintas',
|
||||
|
||||
@ -19,9 +19,10 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
1 => "t1.code",
|
||||
2 => "t1.code_ot",
|
||||
3 => "t1.show_in_client",
|
||||
3 => "t1.show_in_client_special",
|
||||
];
|
||||
|
||||
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client", "deleted_at", "is_deleted"];
|
||||
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client", "show_in_client_special", "deleted_at", "is_deleted"];
|
||||
protected $returnType = "App\Entities\Configuracion\PapelGenerico";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
@ -104,7 +105,8 @@ class PapelGenericoModel extends \App\Models\BaseModel
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id AS id, t1.nombre AS nombre, t1.code AS code, t1.code_ot AS code_ot, t1.show_in_client AS show_in_client"
|
||||
"t1.id AS id, t1.nombre AS nombre, t1.code AS code, t1.code_ot AS code_ot,
|
||||
t1.show_in_client AS show_in_client, t1.show_in_client_special AS show_in_client_special"
|
||||
)
|
||||
->where("is_deleted", 0);
|
||||
|
||||
|
||||
@ -23,7 +23,9 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
7 => "t1.guardas",
|
||||
8 => "t1.inkjet",
|
||||
9 => "t1.rotativa",
|
||||
10 => "t1.isActivo"
|
||||
10 => "t1.isActivo",
|
||||
11 => "t1.show_in_client",
|
||||
12 => "t1.show_in_client_special"
|
||||
];
|
||||
|
||||
|
||||
@ -44,6 +46,8 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
"inkjet",
|
||||
"rotativa",
|
||||
"isActivo",
|
||||
"show_in_client",
|
||||
"show_in_client_special",
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_updated_id",
|
||||
@ -150,7 +154,8 @@ class PapelImpresionModel extends \App\Models\BaseModel
|
||||
t1.espesor AS espesor, t1.gramaje AS gramaje, t1.precio_tonelada AS precio_tonelada,
|
||||
t1.bn AS bn, t1.color AS color, t1.cubierta AS cubierta, t1.sobrecubierta AS sobrecubierta, t1.guardas AS guardas,
|
||||
t1.inkjet AS inkjet, t1.rotativa AS rotativa,
|
||||
t1.isActivo AS isActivo, t2.nombre AS papel_generico_id"
|
||||
t1.isActivo AS isActivo, t2.nombre AS papel_generico_id,
|
||||
t1.show_in_client AS show_in_client, t1.show_in_client_special AS show_in_client_special"
|
||||
);
|
||||
|
||||
$builder->join("lg_papel_generico t2", "t1.papel_generico_id = t2.id", "left");
|
||||
|
||||
@ -1,36 +1,55 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?=lang('PapelGenerico.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $papelGenerico->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-12 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?= lang('PapelGenerico.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control"
|
||||
value="<?= old('nombre', $papelGenerico->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">
|
||||
<?=lang('PapelGenerico.code') ?>
|
||||
</label>
|
||||
<input type="text" id="code" name="code" maxLength="5" class="form-control" value="<?=old('code', $papelGenerico->code) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="code" class="form-label">
|
||||
<?= lang('PapelGenerico.code') ?>
|
||||
</label>
|
||||
<input type="text" id="code" name="code" maxLength="5" class="form-control"
|
||||
value="<?= old('code', $papelGenerico->code) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="codeOt" class="form-label">
|
||||
<?=lang('PapelGenerico.codeOt') ?>
|
||||
</label>
|
||||
<input type="text" id="codeOt" name="code_ot" maxLength="5" class="form-control" value="<?=old('code_ot', $papelGenerico->code_ot) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="codeOt" class="form-label">
|
||||
<?= lang('PapelGenerico.codeOt') ?>
|
||||
</label>
|
||||
<input type="text" id="codeOt" name="code_ot" maxLength="5" class="form-control"
|
||||
value="<?= old('code_ot', $papelGenerico->code_ot) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="showInClient" class="form-check-label">
|
||||
<input type="checkbox" id="showInClient" name="show_in_client" value="1" class="form-check-input"<?=$papelGenerico->show_in_client== true ? 'checked' : ''; ?>>
|
||||
<?=lang('PapelGenerico.showInClient') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="showInClient" class="form-check-label">
|
||||
<?= lang('PapelGenerico.showInClient') ?>
|
||||
</label>
|
||||
<input type="checkbox" id="showInClient" name="show_in_client" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->show_in_client_special == true ? 'disabled' : ''; ?>
|
||||
<?= $papelGenerico->show_in_client == true ? 'checked' : ''; ?>>
|
||||
|
||||
</div><!--//.col -->
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="showInClientSpecial" class="form-check-label">
|
||||
<?= lang('PapelGenerico.showInClientSpecial') ?>
|
||||
</label>
|
||||
<input type="checkbox" id="showInClientSpecial" name="show_in_client_special" value="1"
|
||||
class="form-check-input" <?= $papelGenerico->show_in_client_special == true ? 'checked' : ''; ?>>
|
||||
|
||||
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -1,165 +1,202 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?= lang('PapelImpresion.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?= old('nombre', $papelImpresion->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="nombre" class="form-label">
|
||||
<?= lang('PapelImpresion.nombre') ?>*
|
||||
</label>
|
||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control"
|
||||
value="<?= old('nombre', $papelImpresion->nombre) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="referencia" class="form-label">
|
||||
<?= lang('PapelImpresion.referencia') ?>
|
||||
</label>
|
||||
<input type="text" id="referencia" name="referencia" maxLength="13" class="form-control" value="<?= old('referencia', $papelImpresion->referencia) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="referencia" class="form-label">
|
||||
<?= lang('PapelImpresion.referencia') ?>
|
||||
</label>
|
||||
<input type="text" id="referencia" name="referencia" maxLength="13" class="form-control"
|
||||
value="<?= old('referencia', $papelImpresion->referencia) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="mano" class="form-label">
|
||||
<?= lang('PapelImpresion.mano') ?>*
|
||||
</label>
|
||||
<input type="number" id="mano" name="mano" required maxLength="8" step="0.01" class="form-control" value="<?= old('mano', $papelImpresion->mano) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="mano" class="form-label">
|
||||
<?= lang('PapelImpresion.mano') ?>*
|
||||
</label>
|
||||
<input type="number" id="mano" name="mano" required maxLength="8" step="0.01" class="form-control"
|
||||
value="<?= old('mano', $papelImpresion->mano) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="precioTonelada" class="form-label">
|
||||
<?= lang('PapelImpresion.precioTonelada') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioTonelada" name="precio_tonelada" required maxLength="31" step="0.01" class="form-control" value="<?= old('precio_tonelada', $papelImpresion->precio_tonelada) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="precioTonelada" class="form-label">
|
||||
<?= lang('PapelImpresion.precioTonelada') ?>*
|
||||
</label>
|
||||
<input type="number" id="precioTonelada" name="precio_tonelada" required maxLength="31" step="0.01"
|
||||
class="form-control" value="<?= old('precio_tonelada', $papelImpresion->precio_tonelada) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
</div><!--//.col -->
|
||||
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="papelGenericoId" class="form-label">
|
||||
<?= lang('PapelImpresion.papelGenericoId') ?>*
|
||||
</label>
|
||||
<select id="papelGenericoId" name="papel_generico_id" required class="form-control select2" style="width: 100%;">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<label for="papelGenericoId" class="form-label">
|
||||
<?= lang('PapelImpresion.papelGenericoId') ?>*
|
||||
</label>
|
||||
<select id="papelGenericoId" name="papel_generico_id" required class="form-control select2"
|
||||
style="width: 100%;">
|
||||
|
||||
<?php if (isset($papelGenericoList) && is_array($papelGenericoList) && !empty($papelGenericoList)) :
|
||||
foreach ($papelGenericoList as $k => $v) : ?>
|
||||
<option value="<?= $k ?>" <?= $k == $papelImpresion->papel_generico_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
<?php if (isset($papelGenericoList) && is_array($papelGenericoList) && !empty($papelGenericoList)):
|
||||
foreach ($papelGenericoList as $k => $v): ?>
|
||||
<option value="<?= $k ?>" <?= $k == $papelImpresion->papel_generico_id ? ' selected' : '' ?>>
|
||||
<?= $v ?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="gramaje" class="form-label">
|
||||
<?= lang('PapelImpresion.gramaje') ?>*
|
||||
</label>
|
||||
<input type="number" id="gramaje" name="gramaje" required maxLength="31" step="0.01" class="form-control" value="<?= old('gramaje', $papelImpresion->gramaje) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="gramaje" class="form-label">
|
||||
<?= lang('PapelImpresion.gramaje') ?>*
|
||||
</label>
|
||||
<input type="number" id="gramaje" name="gramaje" required maxLength="31" step="0.01" class="form-control"
|
||||
value="<?= old('gramaje', $papelImpresion->gramaje) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="espesor" class="form-label">
|
||||
<?= lang('PapelImpresion.espesor') ?>*
|
||||
</label>
|
||||
<input type="number" id="espesor" name="espesor" required placeholder="0.00" maxLength="8" step="0.01" class="form-control" value="<?= old('espesor', $papelImpresion->espesor) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<label for="espesor" class="form-label">
|
||||
<?= lang('PapelImpresion.espesor') ?>*
|
||||
</label>
|
||||
<input type="number" id="espesor" name="espesor" required placeholder="0.00" maxLength="8" step="0.01"
|
||||
class="form-control" value="<?= old('espesor', $papelImpresion->espesor) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
</div><!--//.col -->
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
</div><!-- //.row -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="bn" class="form-check-label">
|
||||
<input type="checkbox" id="bn" name="bn" value="1" class="form-check-input" <?= $papelImpresion->bn == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.bn') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="bn" class="form-check-label">
|
||||
<input type="checkbox" id="bn" name="bn" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->bn == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.bn') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="cubierta" class="form-check-label">
|
||||
<input type="checkbox" id="cubierta" name="cubierta" value="1" class="form-check-input" <?= $papelImpresion->cubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.cubierta') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="cubierta" class="form-check-label">
|
||||
<input type="checkbox" id="cubierta" name="cubierta" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->cubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.cubierta') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="guardas" class="form-check-label">
|
||||
<input type="checkbox" id="guardas" name="guardas" value="1" class="form-check-input" <?= $papelImpresion->guardas == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.guardas') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="guardas" class="form-check-label">
|
||||
<input type="checkbox" id="guardas" name="guardas" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->guardas == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.guardas') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="rotativa" class="form-check-label">
|
||||
<input type="checkbox" id="rotativa" name="rotativa" value="1" class="form-check-input" <?= $papelImpresion->rotativa == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.rotativa') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="rotativa" class="form-check-label">
|
||||
<input type="checkbox" id="rotativa" name="rotativa" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->rotativa == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.rotativa') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="isActivo" class="form-check-label">
|
||||
<input type="checkbox" id="isActivo" name="isActivo" value="1" class="form-check-input" <?= $papelImpresion->isActivo == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.activo') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
<label for="isActivo" class="form-check-label">
|
||||
<input type="checkbox" id="isActivo" name="isActivo" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->isActivo == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.activo') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="showInClient" class="form-check-label">
|
||||
<?= lang('PapelImpresion.showInClient') ?>
|
||||
</label>
|
||||
<input type="checkbox" id="showInClient" name="show_in_client" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->show_in_client_special == true ? 'disabled' : ''; ?>
|
||||
<?= $papelImpresion->show_in_client == true ? 'checked' : ''; ?>>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<label for="color" class="form-check-label">
|
||||
<input type="checkbox" id="color" name="color" value="1" class="form-check-input" <?= $papelImpresion->color == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.color') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<label for="showInClientSpecial" class="form-check-label">
|
||||
<?= lang('PapelImpresion.showInClientSpecial') ?>
|
||||
</label>
|
||||
<input type="checkbox" id="showInClientSpecial" name="show_in_client_special" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->show_in_client_special == true ? 'checked' : ''; ?>>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="sobrecubierta" class="form-check-label">
|
||||
<input type="checkbox" id="sobrecubierta" name="sobrecubierta" value="1" class="form-check-input" <?= $papelImpresion->sobrecubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.sobrecubierta') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="color" class="form-check-label">
|
||||
<input type="checkbox" id="color" name="color" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->color == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.color') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="inkjet" class="form-check-label">
|
||||
<input type="checkbox" id="inkjet" name="inkjet" value="1" class="form-check-input" <?= $papelImpresion->inkjet == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.inkjet') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
<label for="sobrecubierta" class="form-check-label">
|
||||
<input type="checkbox" id="sobrecubierta" name="sobrecubierta" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->sobrecubierta == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.sobrecubierta') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="defecto" class="form-check-label">
|
||||
<input type="checkbox" id="defecto" name="defecto" value="1" class="form-check-input" <?= $papelImpresion->defecto == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.defecto') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.row -->
|
||||
<label for="inkjet" class="form-check-label">
|
||||
<input type="checkbox" id="inkjet" name="inkjet" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->inkjet == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.inkjet') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
|
||||
<label for="defecto" class="form-check-label">
|
||||
<input type="checkbox" id="defecto" name="defecto" value="1" class="form-check-input"
|
||||
<?= $papelImpresion->defecto == true ? 'checked' : ''; ?>>
|
||||
<?= lang('PapelImpresion.defecto') ?>
|
||||
</label>
|
||||
</div><!--//.form-check -->
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div><!-- //.row -->
|
||||
@ -134,6 +134,16 @@
|
||||
window.location.href = `/configuracion/papelesimpresion/edit/${$(this).attr('data-id')}`;
|
||||
});
|
||||
|
||||
$('#showInClientSpecial').on('change', function() {
|
||||
if($(this).is(':checked')) {
|
||||
$('#showInClient').prop('disabled', true);
|
||||
$('#showInClient').prop('checked', true);
|
||||
}
|
||||
else{
|
||||
$('#showInClient').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<th><?= lang('PapelGenerico.code') ?></th>
|
||||
<th><?= lang('PapelGenerico.codeOt') ?></th>
|
||||
<th><?= lang('PapelGenerico.showInClient') ?></th>
|
||||
<th><?= lang('PapelGenerico.showInClientSpecial') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -90,13 +91,14 @@
|
||||
{ 'data': 'code' },
|
||||
{ 'data': 'code_ot' },
|
||||
{ 'data': 'show_in_client' },
|
||||
{ 'data': 'show_in_client_special' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
const boolCols = [3];
|
||||
const boolCols = [3, 4];
|
||||
for (let coln of boolCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
|
||||
|
||||
@ -757,6 +757,16 @@
|
||||
}
|
||||
})
|
||||
|
||||
$('#showInClientSpecial').on('change', function() {
|
||||
if($(this).is(':checked')) {
|
||||
$('#showInClient').prop('disabled', true);
|
||||
$('#showInClient').prop('checked', true);
|
||||
}
|
||||
else{
|
||||
$('#showInClient').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
<th><?= lang('PapelImpresion.inkjet') ?></th>
|
||||
<th><?= lang('PapelImpresion.rotativa') ?></th>
|
||||
<th><?= lang('PapelImpresion.activo') ?></th>
|
||||
<th><?= lang('PapelImpresion.showInClient') ?></th>
|
||||
<th><?= lang('PapelImpresion.showInClientSpecial') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -106,13 +108,15 @@
|
||||
{ 'data': 'inkjet' },
|
||||
{ 'data': 'rotativa' },
|
||||
{ 'data': 'isActivo' },
|
||||
{ 'data': 'show_in_client' },
|
||||
{ 'data': 'show_in_client_special' },
|
||||
{ 'data': actionBtns }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
theTable.on( 'draw.dt', function () {
|
||||
const boolCols = [3, 4, 5, 6, 7, 8, 9, 10];
|
||||
const boolCols = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
for (let coln of boolCols) {
|
||||
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = cell.innerHTML == '1' ? '<i class="ti ti-check"></i>' : '';
|
||||
|
||||
Reference in New Issue
Block a user