mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminadas modificaciones en tarifas acabado
This commit is contained in:
@ -5,6 +5,9 @@ use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
|
|||||||
use App\Models\Collection;
|
use App\Models\Collection;
|
||||||
use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
|
use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
|
||||||
|
|
||||||
|
use App\Models\Compras\ProveedorModel;
|
||||||
|
use App\Models\Compras\ProveedorTipoModel;
|
||||||
|
|
||||||
class TarifaAcabados extends BaseResourceController
|
class TarifaAcabados extends BaseResourceController
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -219,6 +222,7 @@ class TarifaAcabados extends BaseResourceController
|
|||||||
$this->viewData['tarifaacabadoEntity'] = $tarifaacabadoEntity;
|
$this->viewData['tarifaacabadoEntity'] = $tarifaacabadoEntity;
|
||||||
|
|
||||||
$this->viewData['formAction'] = route_to('updateTarifaAcabado', $id);
|
$this->viewData['formAction'] = route_to('updateTarifaAcabado', $id);
|
||||||
|
$this->viewData['proveedores'] = $this->getProveedores();
|
||||||
|
|
||||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Tarifaacabado.moduleTitle') . ' ' . lang('Basic.global.edit3');
|
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Tarifaacabado.moduleTitle') . ' ' . lang('Basic.global.edit3');
|
||||||
|
|
||||||
@ -305,4 +309,12 @@ class TarifaAcabados extends BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getProveedores(){
|
||||||
|
$provTipoModel = new ProveedorTipoModel();
|
||||||
|
$provModel = new ProveedorModel();
|
||||||
|
|
||||||
|
$tipoId = $provTipoModel->getTipoId("Acabados");
|
||||||
|
return $provModel->getProvList($tipoId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -213,13 +213,14 @@ class TarifaAcabadosLineas extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
$id_TA = $reqData['id_tarifaacabado'] ?? -1;
|
$id_TA = $reqData['id_tarifaacabado'] ?? -1;
|
||||||
|
|
||||||
|
$searchValues = get_filter_datatables_columns($reqData);
|
||||||
|
|
||||||
$resourceData = $this->model->getResource("", $id_TA)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
$resourceData = $this->model->getResource($searchValues, $id_TA)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
|
||||||
|
|
||||||
return $this->respond(Collection::datatable(
|
return $this->respond(Collection::datatable(
|
||||||
$resourceData,
|
$resourceData,
|
||||||
$this->model->getResource()->countAllResults(),
|
$this->model->getResource()->countAllResults(),
|
||||||
$this->model->getResource($search, $id_TA)->countAllResults()
|
$this->model->getResource($searchValues, $id_TA)->countAllResults()
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
return $this->failUnauthorized('Invalid request', 403);
|
return $this->failUnauthorized('Invalid request', 403);
|
||||||
@ -280,6 +281,7 @@ class TarifaAcabadosLineas extends \App\Controllers\BaseResourceController
|
|||||||
->validator('Validate::notEmpty', array(
|
->validator('Validate::notEmpty', array(
|
||||||
'message' => lang('TarifaAcabadoLineas.validation.margen.required'))
|
'message' => lang('TarifaAcabadoLineas.validation.margen.required'))
|
||||||
),
|
),
|
||||||
|
Field::inst('proveedor_id'),
|
||||||
Field::inst('tarifa_acabado_id'),
|
Field::inst('tarifa_acabado_id'),
|
||||||
Field::inst('user_created_id'),
|
Field::inst('user_created_id'),
|
||||||
Field::inst('created_at'),
|
Field::inst('created_at'),
|
||||||
@ -297,6 +299,7 @@ class TarifaAcabadosLineas extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
$process_data['tirada_min'] = $data['data'][$pkey]['tirada_min'];
|
$process_data['tirada_min'] = $data['data'][$pkey]['tirada_min'];
|
||||||
$process_data['tirada_max'] = $data['data'][$pkey]['tirada_max'];
|
$process_data['tirada_max'] = $data['data'][$pkey]['tirada_max'];
|
||||||
|
$process_data['proveedor_id'] = $data['data'][$pkey]['proveedor_id'];
|
||||||
$response = $this->model->checkIntervals($process_data, $pkey, $data['data'][$pkey]['tarifa_acabado_id']);
|
$response = $this->model->checkIntervals($process_data, $pkey, $data['data'][$pkey]['tarifa_acabado_id']);
|
||||||
// No se pueden duplicar valores al crear o al editar
|
// No se pueden duplicar valores al crear o al editar
|
||||||
if (!empty($response)) {
|
if (!empty($response)) {
|
||||||
|
|||||||
@ -8,6 +8,7 @@ class TarifaAcabadoLineaEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
"id" => null,
|
"id" => null,
|
||||||
"tarifa_acabado_id" => 0,
|
"tarifa_acabado_id" => 0,
|
||||||
|
"proveedor_id" => 0,
|
||||||
"tirada_min" => 0,
|
"tirada_min" => 0,
|
||||||
"tirada_max" => 0,
|
"tirada_max" => 0,
|
||||||
"precio_min" => 0,
|
"precio_min" => 0,
|
||||||
@ -21,6 +22,7 @@ class TarifaAcabadoLineaEntity extends \CodeIgniter\Entity\Entity
|
|||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"tarifa_acabado_id" => "int",
|
"tarifa_acabado_id" => "int",
|
||||||
|
"proveedor_id" => "int",
|
||||||
"tirada_min" => "int",
|
"tirada_min" => "int",
|
||||||
"tirada_max" => "int",
|
"tirada_max" => "int",
|
||||||
"precio_min" => "float",
|
"precio_min" => "float",
|
||||||
|
|||||||
@ -6,6 +6,7 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Finish rates Lines',
|
'moduleTitle' => 'Finish rates Lines',
|
||||||
'deleteLine' => 'the selected register',
|
'deleteLine' => 'the selected register',
|
||||||
|
'proveedor' => 'Provider',
|
||||||
'precioMax' => 'Max Price',
|
'precioMax' => 'Max Price',
|
||||||
'precioMin' => 'Min Price',
|
'precioMin' => 'Min Price',
|
||||||
'precioUnidad' => 'Price Unit',
|
'precioUnidad' => 'Price Unit',
|
||||||
|
|||||||
@ -6,6 +6,7 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Tarifa Acabado Líneas',
|
'moduleTitle' => 'Tarifa Acabado Líneas',
|
||||||
'deleteLine' => 'el registro seleccionado',
|
'deleteLine' => 'el registro seleccionado',
|
||||||
|
'proveedor' => 'Proveedor',
|
||||||
'precioMax' => 'Precio T. Mín',
|
'precioMax' => 'Precio T. Mín',
|
||||||
'precioMin' => 'Precio T. Máx',
|
'precioMin' => 'Precio T. Máx',
|
||||||
'precioUnidad' => 'Precio Unidad',
|
'precioUnidad' => 'Precio Unidad',
|
||||||
|
|||||||
@ -13,6 +13,7 @@ return [
|
|||||||
'precioMax' => 'Precio T. Mín',
|
'precioMax' => 'Precio T. Mín',
|
||||||
'precioMin' => 'Precio T. Máx',
|
'precioMin' => 'Precio T. Máx',
|
||||||
'importeFijo' => 'Importe Fijo',
|
'importeFijo' => 'Importe Fijo',
|
||||||
|
'importeMin' => 'Importe mínimo',
|
||||||
'tarifaencuadernacion' => 'Tarifa Encuadernación',
|
'tarifaencuadernacion' => 'Tarifa Encuadernación',
|
||||||
'tarifaencuadernacionList' => 'Lista Tarifas Encuadernación',
|
'tarifaencuadernacionList' => 'Lista Tarifas Encuadernación',
|
||||||
'tarifasencuadernacion' => 'Tarifas Encuadernación',
|
'tarifasencuadernacion' => 'Tarifas Encuadernación',
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Models\Tarifas\Acabados;
|
namespace App\Models\Tarifas\Acabados;
|
||||||
|
|
||||||
|
use function PHPUnit\Framework\isNan;
|
||||||
|
use function PHPUnit\Framework\isNull;
|
||||||
|
|
||||||
class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
||||||
{
|
{
|
||||||
protected $table = "tarifa_acabado_lineas";
|
protected $table = "tarifa_acabado_lineas";
|
||||||
@ -13,14 +16,16 @@ class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
|||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
|
|
||||||
const SORTABLE = [
|
const SORTABLE = [
|
||||||
0 => "t1.tirada_min",
|
0 => "t3.nombre",
|
||||||
1 => "t1.tirada_max",
|
1 => "t1.tirada_min",
|
||||||
2 => "t1.precio_min",
|
2 => "t1.precio_min",
|
||||||
3 => "t1.precio_max",
|
3 => "t1.tirada_max",
|
||||||
4 => "t1.margen",
|
4 => "t1.precio_max",
|
||||||
|
5 => "t1.margen",
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
|
"proveedor_id",
|
||||||
"tirada_min",
|
"tirada_min",
|
||||||
"tirada_max",
|
"tirada_max",
|
||||||
"precio_min",
|
"precio_min",
|
||||||
@ -126,12 +131,12 @@ class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
|||||||
*
|
*
|
||||||
* @return \CodeIgniter\Database\BaseBuilder
|
* @return \CodeIgniter\Database\BaseBuilder
|
||||||
*/
|
*/
|
||||||
public function getResource(string $search = "", $tarifa_acabado_id = -1)
|
public function getResource($search = [], $tarifa_acabado_id = -1)
|
||||||
{
|
{
|
||||||
$builder = $this->db
|
$builder = $this->db
|
||||||
->table($this->table . " t1")
|
->table($this->table . " t1")
|
||||||
->select(
|
->select(
|
||||||
"t1.id AS id, t1.tirada_min AS tirada_min, t1.tirada_max AS tirada_max, t1.precio_min AS precio_min, t1.precio_max AS precio_max, t1.margen AS margen, t2.id AS tarifa_acabado"
|
"t1.id AS id, t1.proveedor_id AS proveedor_id, t3.nombre AS proveedor_nombre, t1.tirada_min AS tirada_min, t1.tirada_max AS tirada_max, t1.precio_min AS precio_min, t1.precio_max AS precio_max, t1.margen AS margen, t2.id AS tarifa_acabado"
|
||||||
);
|
);
|
||||||
|
|
||||||
//JJO
|
//JJO
|
||||||
@ -139,21 +144,42 @@ class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
|||||||
$builder->where("t1.is_deleted", 0);
|
$builder->where("t1.is_deleted", 0);
|
||||||
|
|
||||||
$builder->join("lg_tarifa_acabado t2", "t1.tarifa_acabado_id = t2.id", "left");
|
$builder->join("lg_tarifa_acabado t2", "t1.tarifa_acabado_id = t2.id", "left");
|
||||||
|
$builder->join("lg_proveedores t3", "t1.proveedor_id = t3.id", "left");
|
||||||
|
|
||||||
|
|
||||||
return empty($search)
|
if (empty($search))
|
||||||
? $builder
|
return $builder;
|
||||||
: $builder
|
else {
|
||||||
->groupStart()
|
$builder->groupStart();
|
||||||
->like("t1.tirada_min", $search)
|
foreach ($search as $col_search) {
|
||||||
->orLike("t1.tirada_max", $search)
|
if($col_search[0] != 0){
|
||||||
->orLike("t1.precio_min", $search)
|
$values = explode(",",$col_search[2]);
|
||||||
->orLike("t1.precio_max", $search)
|
$min_val = floatval($values[0]);
|
||||||
->orLike("t1.tirada_min", $search)
|
$max_val = floatval($values[1]);
|
||||||
->orLike("t1.tirada_max", $search)
|
if(!is_nan($min_val) && !is_null($min_val) && strlen($values[0]) > 0){
|
||||||
->orLike("t1.precio_min", $search)
|
$builder->where(self::SORTABLE[$col_search[0]] . " >=", $min_val);
|
||||||
->orLike("t1.precio_max", $search)
|
}
|
||||||
->groupEnd();
|
if(!is_nan($max_val) && !is_null($max_val) && strlen($values[1]) > 0){
|
||||||
|
$builder->where(self::SORTABLE[$col_search[0]] . " <", $max_val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$values = explode(",",$col_search[2]);
|
||||||
|
if(count($values) > 1){
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$builder->orWhere("t1.proveedor_id", $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$builder->where("t1.proveedor_id", $col_search[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$builder->groupEnd();
|
||||||
|
|
||||||
|
return $builder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findLineasForTarifaAcabado(int $tarifaacabado_id){
|
public function findLineasForTarifaAcabado(int $tarifaacabado_id){
|
||||||
@ -181,6 +207,7 @@ class TarifaAcabadoLineaModel extends \App\Models\BaseModel
|
|||||||
->select("id, tirada_min, tirada_max")
|
->select("id, tirada_min, tirada_max")
|
||||||
->where("is_deleted", 0)
|
->where("is_deleted", 0)
|
||||||
->where("tarifa_acabado_id", $id_tarifa_acabado)
|
->where("tarifa_acabado_id", $id_tarifa_acabado)
|
||||||
|
->where("proveedor_id", $data["proveedor_id"])
|
||||||
->get()->getResultObject();
|
->get()->getResultObject();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -45,12 +45,13 @@
|
|||||||
<table id="tableOfTarifaacabadolineas" class="table table-striped table-hover" style="width: 100%;">
|
<table id="tableOfTarifaacabadolineas" class="table table-striped table-hover" style="width: 100%;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th><?= lang('TarifaAcabadoLineas.proveedor') ?></th>
|
||||||
<th><?= lang('TarifaAcabadoLineas.tiradaMin') ?></th>
|
<th><?= lang('TarifaAcabadoLineas.tiradaMin') ?></th>
|
||||||
<th><?= lang('TarifaAcabadoLineas.precioMax') ?></th>
|
<th><?= lang('TarifaAcabadoLineas.precioMax') ?></th>
|
||||||
<th><?= lang('TarifaAcabadoLineas.tiradaMax') ?></th>
|
<th><?= lang('TarifaAcabadoLineas.tiradaMax') ?></th>
|
||||||
<th><?= lang('TarifaAcabadoLineas.precioMin') ?></th>
|
<th><?= lang('TarifaAcabadoLineas.precioMin') ?></th>
|
||||||
<th><?= lang('TarifaAcabadoLineas.margen') ?></th>
|
<th><?= lang('TarifaAcabadoLineas.margen') ?></th>
|
||||||
<th style="min-width:100px"></th>
|
<th class="noFilter" style="min-width:100px"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -85,7 +86,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
editor = new $.fn.dataTable.Editor( {
|
var editor = new $.fn.dataTable.Editor( {
|
||||||
ajax: {
|
ajax: {
|
||||||
url: "<?= route_to('tarifaAcabadoLineasDTE') ?>",
|
url: "<?= route_to('tarifaAcabadoLineasDTE') ?>",
|
||||||
headers: {
|
headers: {
|
||||||
@ -94,7 +95,11 @@
|
|||||||
},
|
},
|
||||||
table : "#tableOfTarifaacabadolineas",
|
table : "#tableOfTarifaacabadolineas",
|
||||||
idSrc: 'id',
|
idSrc: 'id',
|
||||||
fields: [ {
|
fields: [
|
||||||
|
{
|
||||||
|
name: "proveedor_id",
|
||||||
|
type: "select",
|
||||||
|
}, {
|
||||||
name: "tirada_min"
|
name: "tirada_min"
|
||||||
}, {
|
}, {
|
||||||
name: "precio_max"
|
name: "precio_max"
|
||||||
@ -107,6 +112,9 @@
|
|||||||
}, {
|
}, {
|
||||||
"name": "tarifa_acabado_id",
|
"name": "tarifa_acabado_id",
|
||||||
"type": "hidden"
|
"type": "hidden"
|
||||||
|
},{
|
||||||
|
name: "proveedor_nombre",
|
||||||
|
"type": "hidden"
|
||||||
},{
|
},{
|
||||||
"name": "deleted_at",
|
"name": "deleted_at",
|
||||||
"type": "hidden"
|
"type": "hidden"
|
||||||
@ -117,6 +125,10 @@
|
|||||||
]
|
]
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Generación de la lista de proveedores (id, nombre) para encuadernación
|
||||||
|
const suppliersList = <?php echo json_encode($proveedores); ?>;
|
||||||
|
editor.field( 'proveedor_id' ).update( suppliersList );
|
||||||
|
|
||||||
editor.on( 'preSubmit', function ( e, d, type ) {
|
editor.on( 'preSubmit', function ( e, d, type ) {
|
||||||
if ( type === 'create'){
|
if ( type === 'create'){
|
||||||
d.data[0]['tarifa_acabado_id'] = id;
|
d.data[0]['tarifa_acabado_id'] = id;
|
||||||
@ -141,18 +153,94 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function searchProviders(){
|
||||||
|
var values = [];
|
||||||
|
$('#select_Proveedor').find(':selected').each(function () {
|
||||||
|
values.push($(this).val());
|
||||||
|
});
|
||||||
|
theTable.column(0).search(values).draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Setup - add a text input to each footer cell
|
||||||
|
$('#tableOfTarifaacabadolineas thead tr').clone(true).appendTo('#tableOfTarifaacabadolineas thead');
|
||||||
|
$('#tableOfTarifaacabadolineas thead tr:eq(1) th').each(function (i) {
|
||||||
|
if (!$(this).hasClass("noFilter")) {
|
||||||
|
var title = $(this).text();
|
||||||
|
title = title.replace(/ /g, "_").replace(/\./g, "_");
|
||||||
|
|
||||||
|
|
||||||
|
if(i==0){
|
||||||
|
|
||||||
|
// Agregar un selector en la primera columna
|
||||||
|
$(this).html(`<select id=select_${title} class="form-control select2" style="min-width:100px;max-width:120px;font-size:0.8rem !important;"></select>`);
|
||||||
|
|
||||||
|
// Agregar opciones al selector
|
||||||
|
var selector = $('select', this);
|
||||||
|
const suppliersList = <?php echo json_encode($proveedores); ?>;
|
||||||
|
//selector.append('<option value="">Todos</option>'); // Opción vacía
|
||||||
|
for (j = 0; j < suppliersList.length; j++) {
|
||||||
|
selector.append('<option value="' + suppliersList[j].value + '">' + suppliersList[j].label + '</option>');
|
||||||
|
};
|
||||||
|
|
||||||
|
$('#select_' + title).select2({
|
||||||
|
multiple: true,
|
||||||
|
placeholder: ""
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
selector.bind('select2:select', searchProviders);
|
||||||
|
selector.bind('select2:unselect', searchProviders);
|
||||||
|
|
||||||
|
$('#select_' + title).val("").trigger('change');
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
|
||||||
|
$(this).html(`
|
||||||
|
<div class='d-flex'>
|
||||||
|
<input name=min_${title} id=min_${title} class="form-control" type='text' min='0' placeholder='Min' style='width: 80px;'/>
|
||||||
|
<input name=max_${title} id=max_${title} class="form-control ml-1" type='text' min='0' placeholder='Max' style='width: 80px;'/>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('input', this).on('change clear', function () {
|
||||||
|
var minInputValue = parseFloat($(`#min_${title}`).val()) || "";
|
||||||
|
var maxInputValue = parseFloat($(`#max_${title}`).val()) || "";
|
||||||
|
|
||||||
|
|
||||||
|
if (theTable.column(i).search() !== [minInputValue,maxInputValue]) {
|
||||||
|
theTable
|
||||||
|
.column(i)
|
||||||
|
.search([minInputValue,maxInputValue])
|
||||||
|
.draw();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).html('<span></span>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var theTable = $('#tableOfTarifaacabadolineas').DataTable( {
|
var theTable = $('#tableOfTarifaacabadolineas').DataTable( {
|
||||||
serverSide: true,
|
orderCellsTop: true,
|
||||||
|
serverSide: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
autoWidth: true,
|
autoWidth: true,
|
||||||
responsive: true,
|
responsive: true,
|
||||||
|
fixedHeader: true,
|
||||||
lengthMenu: [ 5, 10, 25],
|
lengthMenu: [ 5, 10, 25],
|
||||||
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
order: [[ 0, "asc" ], [ 1, "asc" ]],
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
lengthChange: true,
|
lengthChange: true,
|
||||||
searching: false,
|
|
||||||
paging: true,
|
paging: true,
|
||||||
info: false,
|
info: false,
|
||||||
|
stateSave: false,
|
||||||
dom: '<"mt-4"><"float-end"B><"float-start"l><t><"mt-4 mb-3"p>',
|
dom: '<"mt-4"><"float-end"B><"float-start"l><t><"mt-4 mb-3"p>',
|
||||||
ajax : $.fn.dataTable.pipeline( {
|
ajax : $.fn.dataTable.pipeline( {
|
||||||
url: '<?= route_to('tarifaAcabadoLineasDT') ?>',
|
url: '<?= route_to('tarifaAcabadoLineasDT') ?>',
|
||||||
@ -164,6 +252,12 @@
|
|||||||
async: true,
|
async: true,
|
||||||
}),
|
}),
|
||||||
columns: [
|
columns: [
|
||||||
|
{ 'data': 'proveedor_id',
|
||||||
|
render: function(data, type, row, meta) {
|
||||||
|
var value = suppliersList.find(element => element.value === data);
|
||||||
|
return value['label'];
|
||||||
|
},
|
||||||
|
},
|
||||||
{ 'data': 'tirada_min' },
|
{ 'data': 'tirada_min' },
|
||||||
{ 'data': 'precio_max' },
|
{ 'data': 'precio_max' },
|
||||||
{ 'data': 'tirada_max' },
|
{ 'data': 'tirada_max' },
|
||||||
@ -180,7 +274,6 @@
|
|||||||
searchable: false,
|
searchable: false,
|
||||||
targets: [lastColNr]
|
targets: [lastColNr]
|
||||||
},
|
},
|
||||||
{"orderData": [ 0, 1 ], "targets": 0 },
|
|
||||||
|
|
||||||
],
|
],
|
||||||
language: {
|
language: {
|
||||||
@ -244,6 +337,7 @@
|
|||||||
<?=$this->section('css') ?>
|
<?=$this->section('css') ?>
|
||||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
|
||||||
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||||
|
<link rel="stylesheet" href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/fixedheader/fixedHeader.dataTables.min.css") ?>">
|
||||||
<?=$this->endSection() ?>
|
<?=$this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,11 +49,11 @@
|
|||||||
<th><?= lang('TarifaEncuadernacionTiradas.proveedor') ?></th>
|
<th><?= lang('TarifaEncuadernacionTiradas.proveedor') ?></th>
|
||||||
<th><?= lang('TarifaEncuadernacionTiradas.tiradaMin') ?></th>
|
<th><?= lang('TarifaEncuadernacionTiradas.tiradaMin') ?></th>
|
||||||
<th><?= lang('TarifaEncuadernacionTiradas.tiradaMax') ?></th>
|
<th><?= lang('TarifaEncuadernacionTiradas.tiradaMax') ?></th>
|
||||||
<th><?= lang('Tarifaencuadernacion.precioMin') ?></th>
|
<th><?= lang('Tarifaencuadernacion.importeMin') ?></th>
|
||||||
<th><?= lang('Tarifaencuadernacion.importeFijo') ?></th>
|
<th><?= lang('Tarifaencuadernacion.importeFijo') ?></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -75,6 +75,13 @@ if (
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php if (auth()->user()->can('proveedores.menu')) { ?>
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="<?= route_to("proveedorList") ?>" class="menu-link">
|
||||||
|
<?= lang("App.menu_proveedores") ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
<?php if (auth()->user()->can('ubicaciones.menu')) { ?>
|
<?php if (auth()->user()->can('ubicaciones.menu')) { ?>
|
||||||
<li class="menu-item">
|
<li class="menu-item">
|
||||||
<a href="<?= route_to("ubicacionesList") ?>" class="menu-link">
|
<a href="<?= route_to("ubicacionesList") ?>" class="menu-link">
|
||||||
|
|||||||
Reference in New Issue
Block a user