add code and comment to tarifaacabado

This commit is contained in:
amazuecos
2024-10-21 17:52:09 +00:00
parent 2ff86a7743
commit 66a5651a30
5 changed files with 75 additions and 47 deletions

View File

@ -10,6 +10,9 @@ return [
'id' => 'ID',
'moduleTitle' => 'Finishing Rates',
'nombre' => 'Name',
'code' => 'Código',
'comment' => 'Comentario',
'comment_placeholder' => 'Inserte un comentario',
'precioMax' => 'Price Max',
'precioMin' => 'Price Min',
'precioMin' => 'Min Price',

View File

@ -85,7 +85,7 @@ class TarifaAcabadoModel extends \App\Models\BaseModel
public function getResource(string $search = "")
{
$builder = $this->db->table($this->table . " t1")->select(
"t1.id AS id, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo,
"t1.id AS id, t1.nombre AS nombre,t1.code AS code, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo,
t1.mostrar_en_presupuesto AS mostrar_en_presupuesto, t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta"
);

View File

@ -5,15 +5,27 @@
<?= lang('Tarifaacabado.nombre') ?>*
</label>
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control"
value="<?= old('nombre', $tarifaacabadoEntity->nombre) ?>">
value="<?= old('nombre', $tarifaacabadoEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code" class="form-label">
<?= lang('Tarifaacabado.code') ?>*
</label>
<input
type="text"
id="code"
name="code"
required
maxLength="5"
class="form-control"
value="<?= old('code', $tarifaacabadoEntity->code) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?= lang('Tarifaacabado.precioMin') ?>*
</label>
<input type="text" id="precio_min" name="precio_min" class="form-control"
value="<?= old('precio_min', $tarifaacabadoEntity->precio_min) ?>">
value="<?= old('precio_min', $tarifaacabadoEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
@ -21,9 +33,21 @@
<?= lang('Tarifaacabado.importeFijo') ?>*
</label>
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control"
value="<?= old('importe_fijo', $tarifaacabadoEntity->importe_fijo) ?>">
value="<?= old('importe_fijo', $tarifaacabadoEntity->importe_fijo) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="comment" class="form-label">
<?= lang('Tarifaacabado.comment') ?>*
</label>
<textarea
id="comment"
name="comment"
rows="5"
cols="10"
placeholder="<?= lang('Tarifaacabado.comment_placeholder') ?>"
class="form-control"><?= old('comment', $tarifaacabadoEntity->comment) ?></textarea>
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<label for="mostrar_en_presupuesto" class="form-check-label">
@ -32,7 +56,6 @@
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<label for="acabado_cubierta" class="form-check-label">

View File

@ -17,6 +17,7 @@
<thead>
<tr>
<th><?= lang('Tarifaacabado.nombre') ?></th>
<th><?= lang('Tarifaacabado.code') ?></th>
<th><?= lang('Tarifaacabado.precioMin') ?></th>
<th><?= lang('Tarifaacabado.importeFijo') ?></th>
<th><?= lang('Tarifaacabado.mostrar_en_presupuesto') ?></th>
@ -90,6 +91,7 @@
],
columns : [
{ 'data': 'nombre' },
{ 'data': 'code' },
{ 'data': 'precio_min' },
{ 'data': 'importe_fijo' },
{ 'data': 'mostrar_en_presupuesto' },

View File

@ -1,58 +1,58 @@
<div class="row">
<div class="col-md-12 col-lg-12 px-4">
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifamanipulado.nombre') ?>*
</label>
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?=old('nombre', $tarifaManipuladoEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code" class="form-label">
<?= lang('Tarifamanipulado.code') ?>*
</label>
<input
type="text"
id="code"
name="code"
required
maxLength="5"
class="form-control"
value="<?= old('code', $tarifaManipuladoEntity->code) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifamanipulado.importeMinimo') ?>*
<?= lang('Tarifamanipulado.nombre') ?>*
</label>
<input type="text" id="precio_min" name="precio_min" class="form-control" value="<?=old('precio_min', $tarifaManipuladoEntity->precio_min) ?>">
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?= old('nombre', $tarifaManipuladoEntity->nombre) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="code" class="form-label">
<?= lang('Tarifamanipulado.code') ?>*
</label>
<input
type="text"
id="code"
name="code"
required
maxLength="5"
class="form-control"
value="<?= old('code', $tarifaManipuladoEntity->code) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?= lang('Tarifamanipulado.importeMinimo') ?>*
</label>
<input type="text" id="precio_min" name="precio_min" class="form-control" value="<?= old('precio_min', $tarifaManipuladoEntity->precio_min) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="nombre" class="form-label">
<?=lang('Tarifamanipulado.importeFijo') ?>*
<?= lang('Tarifamanipulado.importeFijo') ?>*
</label>
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control" value="<?=old('importe_fijo', $tarifaManipuladoEntity->importe_fijo) ?>">
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control" value="<?= old('importe_fijo', $tarifaManipuladoEntity->importe_fijo) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="comment" class="form-label">
<?= lang('Tarifamanipulado.comment') ?>*
</label>
<textarea
id="comment"
name="comment"
rows="5"
cols="10"
placeholder="<?= lang('Tarifamanipulado.comment_placeholder') ?>"
class="form-control"><?= old('comment', $tarifaManipuladoEntity->comment) ?></textarea>
</div><!--//.mb-3 -->
<label for="comment" class="form-label">
<?= lang('Tarifamanipulado.comment') ?>*
</label>
<textarea
id="comment"
name="comment"
rows="5"
cols="10"
placeholder="<?= lang('Tarifamanipulado.comment_placeholder') ?>"
class="form-control"><?= old('comment', $tarifaManipuladoEntity->comment) ?></textarea>
</div><!--//.mb-3 -->
<div class="mb-3">
<div class="form-check">
<div class="form-check">
<label for="mostrar_en_presupuesto" class="form-check-label">
<input type="checkbox" id="mostrar_en_presupuesto" name="mostrar_en_presupuesto" value="1" class="form-check-input" <?= $tarifaManipuladoEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>>
<?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<label for="mostrar_en_presupuesto" class="form-check-label">
<input type="checkbox" id="mostrar_en_presupuesto" name="mostrar_en_presupuesto" value="1" class="form-check-input" <?= $tarifaManipuladoEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>>
<?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->