mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadida la funcionalidad en tarifas preimpresion de mostrar en presupuesto
This commit is contained in:
@ -62,6 +62,10 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
|
||||
|
||||
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -140,6 +144,9 @@ class Tarifapreimpresion extends \App\Controllers\GoBaseController
|
||||
if (isset($this->model->user_updated_id)) {
|
||||
$sanitizedData['user_updated_id'] = $session->id_user;
|
||||
}
|
||||
if ($this->request->getPost('mostrar_en_presupuesto') == null) {
|
||||
$sanitizedData['mostrar_en_presupuesto'] = false;
|
||||
}
|
||||
|
||||
$noException = true;
|
||||
if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) :
|
||||
|
||||
@ -12,6 +12,7 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_min" => 0,
|
||||
"importe_fijo" => 0,
|
||||
"margen" => 0,
|
||||
"mostrar_en_presupuesto" => 1,
|
||||
"user_created_id" => 1,
|
||||
"user_update_id" => 1,
|
||||
"is_deleted" => 0,
|
||||
@ -24,6 +25,7 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio_min" => "float",
|
||||
"importe_fijo" => "float",
|
||||
"margen" => "float",
|
||||
"mostrar_en_presupuesto" => "int",
|
||||
"user_created_id" => "int",
|
||||
"user_update_id" => "int",
|
||||
"is_deleted" => "int",
|
||||
|
||||
@ -15,6 +15,7 @@ return [
|
||||
'tarifapreimpresion' => 'Preprinting rate',
|
||||
'tarifapreimpresionList' => 'Preprinting rates List',
|
||||
'tarifaspreimpresion' => 'Preprinting rates',
|
||||
'mostrar_en_presupuesto' => 'Show in budget',
|
||||
'updatedAt' => 'Updated At',
|
||||
'userCreatedId' => 'User Created ID',
|
||||
'userUpdateId' => 'User Update ID',
|
||||
|
||||
@ -10,6 +10,7 @@ return [
|
||||
'precio' => 'Precio/página',
|
||||
'precioMin' => 'Precio Mínimo',
|
||||
'importeFijo' => 'Importe Fijo',
|
||||
'mostrar_en_presupuesto' => 'Mostrar en presupuesto',
|
||||
'margen' => 'Margen',
|
||||
'tarifapreimpresion' => 'Tarifa Preimpresión',
|
||||
'tarifapreimpresionList' => 'Lista Tarifas Preimpresión',
|
||||
|
||||
@ -18,6 +18,7 @@ class TarifapreimpresionModel extends \App\Models\GoBaseModel
|
||||
"precio_min",
|
||||
"importe_fijo",
|
||||
"margen",
|
||||
"mostrar_en_presupuesto",
|
||||
"deleted_at",
|
||||
"is_deleted",
|
||||
"user_created_id",
|
||||
|
||||
@ -72,6 +72,22 @@
|
||||
value="<?= old('margen', $tarifapreimpresionEntity->margen) ?>"
|
||||
>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="checkbox"
|
||||
id="mostrar_en_presupuesto"
|
||||
name="mostrar_en_presupuesto"
|
||||
value="1"
|
||||
class="form-check-input"<?= $tarifapreimpresionEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>
|
||||
>
|
||||
<label for="mostrar_en_presupuesto" class="form-check-label">
|
||||
<?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
@ -20,6 +20,7 @@
|
||||
<th><?= lang('Tarifapreimpresion.precioMin') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.importeFijo') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.margen') ?></th>
|
||||
<th><?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?></th>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -41,6 +42,9 @@
|
||||
<td class="align-middle">
|
||||
<?= esc($item->margen) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->mostrar_en_presupuesto)==1?'<i class="ti ti-check"></i>':"" ?>
|
||||
</td>
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editTarifapreimpresion', $item->id), "<i class='ti ti-pencil ti-sm mx-2'></i>", ['class'=>'text-body', 'data-id'=>$item->id,]); ?>
|
||||
<?=anchor('#confirm2delete', "<i class='ti ti-trash ti-sm mx-2'></i>", ['class'=>'text-body', 'data-href'=>route_to('deleteTarifapreimpresion', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
|
||||
Reference in New Issue
Block a user