mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'bug/presupuestos_jm' into 'main'
Bug/presupuestos jm See merge request jjimenez/safekat!94
This commit is contained in:
4
ci4/.env
4
ci4/.env
@ -22,8 +22,8 @@ CI_ENVIRONMENT = development
|
||||
# APP
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
#app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
# app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
# app.baseURL = "http://safekat.test/"
|
||||
# app.forceGlobalSecureRequests = false
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@ class Presupuestodirecciones extends \App\Controllers\GoBaseResourceController
|
||||
$email = $reqData['email'] ?? "";
|
||||
$direccion = $reqData['direccion'] ?? "";
|
||||
$pais_id = $reqData['paisId'] ?? -1;
|
||||
$ccaa_id = $reqData['ccaaId'] ?? -1;
|
||||
$provincia = $reqData['provincia'] ?? "";
|
||||
$municipio = $reqData['municipio'] ?? "";
|
||||
$cp = $reqData['cp'] ?? "";
|
||||
@ -54,6 +53,7 @@ class Presupuestodirecciones extends \App\Controllers\GoBaseResourceController
|
||||
$margen = $reqData['margen'] ?? "";
|
||||
$proveedor = $reqData['proveedor'] ?? "";
|
||||
$proveedor_id = $reqData['proveedor_id'] ?? "";
|
||||
$entregaPieCalle = $reqData['entregaPieCalle'] ?? 0;
|
||||
|
||||
$data = [
|
||||
"presupuesto_id" => $presupuesto_id,
|
||||
@ -64,7 +64,6 @@ class Presupuestodirecciones extends \App\Controllers\GoBaseResourceController
|
||||
"email" => $email,
|
||||
"direccion" => $direccion,
|
||||
"pais_id" => $pais_id,
|
||||
"ccaa_id" => $ccaa_id,
|
||||
"provincia" => $provincia,
|
||||
"municipio" => $municipio,
|
||||
"cp" => $cp,
|
||||
@ -73,6 +72,7 @@ class Presupuestodirecciones extends \App\Controllers\GoBaseResourceController
|
||||
"margen" => $margen,
|
||||
"proveedor" => $proveedor,
|
||||
"proveedor_id" => $proveedor_id,
|
||||
"entregaPieCalle" => $entregaPieCalle,
|
||||
];
|
||||
$response = $this->model->insert($data);
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ class ClienteDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"email" => null,
|
||||
"direccion" => null,
|
||||
"pais_id" => null,
|
||||
"ccaa_id" => null,
|
||||
"provincia" => null,
|
||||
"municipio" => null,
|
||||
"cp" => null,
|
||||
@ -22,7 +21,6 @@ class ClienteDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
protected $casts = [
|
||||
"cliente_id" => "int",
|
||||
"pais_id" => "int",
|
||||
"ccaa_id" => "int",
|
||||
"cp" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ class PresupuestoDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"proveedor" => null,
|
||||
"proveedor_id" => null,
|
||||
"margen" => null,
|
||||
"entregaPieCalle" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"presupuesto_id" => "int",
|
||||
@ -36,6 +37,7 @@ class PresupuestoDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"precio" => "float",
|
||||
"margen" => "float",
|
||||
"proveedor_id" => "int",
|
||||
"entregaPieCalle" => "int",
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -16,8 +16,9 @@ return [
|
||||
'cantidad' => 'Quantity',
|
||||
'proveedor' => 'Supplier',
|
||||
'precio' => 'Price',
|
||||
'saveDirection' => 'Save to client addresses',
|
||||
'saveDirection' => 'Save to client addresses (shipped on pallets)',
|
||||
'validation' => [
|
||||
'ejemplares_envio' => 'The number of copies sent does not match the print run'
|
||||
'max_length' => 'Max. length ',
|
||||
'required' => 'Field required',
|
||||
'valid_email' => 'The email is not valid',
|
||||
|
||||
@ -19,8 +19,9 @@ return [
|
||||
'proveedor' => 'Proveedor',
|
||||
'precio' => 'Precio',
|
||||
'saveDirection' => 'Guardar en direcciones de cliente',
|
||||
'entregaPieCalle' => 'Entrega a pie de calle',
|
||||
'entregaPieCalle' => 'Entrega a pie de calle (enviado en palets)',
|
||||
'validation' => [
|
||||
'ejemplares_envio' => 'El número de ejemplares enviados no coincide con la tirada',
|
||||
'max_length' => 'Max. valor caracteres alcanzado',
|
||||
'required' => 'Campo obligatorio',
|
||||
'valid_email' => 'El email introducido no es válido',
|
||||
|
||||
@ -36,7 +36,6 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
"email",
|
||||
"direccion",
|
||||
"pais_id",
|
||||
"ccaa_id",
|
||||
"provincia",
|
||||
"municipio",
|
||||
"cp",
|
||||
@ -45,6 +44,7 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
'margen',
|
||||
"proveedor_id",
|
||||
"proveedor",
|
||||
"entregaPieCalle",
|
||||
];
|
||||
|
||||
protected $returnType = "App\Entities\Clientes\ClienteDireccionesEntity";
|
||||
@ -67,15 +67,13 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
->select(
|
||||
"t1.id AS id, t1.presupuesto_id AS presupuesto_id, t1.tarifa_id AS tarifa_id, t1.att AS att,
|
||||
t1.email AS email, t1.direccion AS direccion, t1.pais_id AS pais_id, t2.nombre AS pais,
|
||||
t1.ccaa_id AS ccaa_id, t3.nombre AS ccaa_nombre,
|
||||
t1.municipio AS municipio, t1.provincia AS provincia, t1.cp AS cp, t1.telefono AS telefono,
|
||||
t1.peso AS peso, t1.cantidad AS cantidad, t1.precio AS precio, t1.margen AS margen,
|
||||
t1.proveedor_id AS proveedor_id, t1.proveedor AS proveedor"
|
||||
t1.proveedor_id AS proveedor_id, t1.proveedor AS proveedor, t1.entregaPieCalle AS entregaPieCalle"
|
||||
);
|
||||
|
||||
$builder->where('t1.presupuesto_id', $presupuesto_id);
|
||||
$builder->join("lg_paises t2", "t1.pais_id = t2.id", "left");
|
||||
$builder->join("lg_comunidades_autonomas t3", "t1.ccaa_id = t3.id", "left");
|
||||
|
||||
return empty($search)
|
||||
? $builder
|
||||
@ -85,7 +83,6 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
->orLike("t1.email", $search)
|
||||
->orLike("t1.direccion", $search)
|
||||
->orLike("t2.nombre", $search)
|
||||
->orLike("t3.nombre", $search)
|
||||
->orLike("t1.municipio", $search)
|
||||
->orLike("t1.provincia", $search)
|
||||
->orLike("t1.cp", $search)
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
<div id="accordionEnviosTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEnvios">
|
||||
<div class="accordion-body">
|
||||
|
||||
<div id='alert-envios'></div>
|
||||
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_presupuestoDireccionesForm") ?>
|
||||
<div id='rowTable' class='row'>
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable px-4" style="width: 95%;">
|
||||
<table id="tableOfDireccionesEnvio" class="table dt-responsive dataTable px-2" style="width: 95%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="lp-header">Tarifa_id</th>
|
||||
@ -23,14 +23,14 @@
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.cp') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.municipio') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.provincia') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.ccaa') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.pais') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.telefono') ?></th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.proveedor') ?></th>
|
||||
<th>Proveedor_id</th>
|
||||
<th class="lp-header"><?= lang('PresupuestosDirecciones.precio') ?></th>
|
||||
<th>Margen</th>
|
||||
<th class="lp-header"><?= lang('Basic.global.Action') ?></th>
|
||||
<th>Entrega a pie</th>
|
||||
<th style="min-width:120px !important;" class="lp-header"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -75,7 +75,7 @@ $('#insertar_direccion').on('click', function(){
|
||||
cantidad_total = 0
|
||||
tableEnvios.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
var data = this.data();
|
||||
cantidad_total += data.cantidad
|
||||
cantidad_total += parseInt(data.cantidad)
|
||||
} );
|
||||
$('#add_cantidad').attr('max-value', parseInt($('#tirada').val())-cantidad_total)
|
||||
$('#add_cantidad').val(parseInt($('#tirada').val())-cantidad_total)
|
||||
@ -86,6 +86,7 @@ const lastColNr_direcciones = $('#tableOfDireccionesEnvio').find("tr:first th").
|
||||
|
||||
const actionBtns_direcciones = function(data) {
|
||||
return `
|
||||
<span class="edit-add"><a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit-add mx-2" data-id="${data.id}"></i></a></span>
|
||||
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm delete-add-row mx-2"></i></a>
|
||||
`;
|
||||
};
|
||||
@ -98,8 +99,50 @@ $(document).on('click', '.delete-add-row', function(e) {
|
||||
checkInsertar()
|
||||
})
|
||||
|
||||
$(document).on('click', '.btn-edit-add', function(e) {
|
||||
const row = $(this).closest('tr');
|
||||
var data = tableEnvios.row( row ).data()
|
||||
|
||||
$("#addressForm").attr('action','edit')
|
||||
$("#addressForm").attr('row', row[0]._DT_RowIndex)
|
||||
$("#addressForm").attr('presupuestodireccion_id', $(this).attr('data-id'))
|
||||
var $newAddDialog = $("#addressForm")
|
||||
var maximaCantidad = parseInt($('#tirada').val())
|
||||
$("#add_cantidad").attr("max" , maximaCantidad);
|
||||
$("#add_cantidad").val( maximaCantidad);
|
||||
$("#add_cantidad").on('change', function(){
|
||||
$("#add_cantidad").val(parseInt($("#add_cantidad").val())>maximaCantidad ? maximaCantidad : $("#add_cantidad").val())
|
||||
})
|
||||
|
||||
cantidad_total = 0
|
||||
tableEnvios.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
var data2 = this.data();
|
||||
cantidad_total += parseInt(data2.cantidad)
|
||||
} );
|
||||
cantidad_total += parseInt(data.cantidad) // Si es editar tienes que sumar los de la linea actual
|
||||
$('#add_cantidad').attr('max-value', parseInt($('#tirada').val())-cantidad_total)
|
||||
$('#add_cantidad').val(parseInt($('#tirada').val())-cantidad_total)
|
||||
|
||||
$('#add_att').val(data.att)
|
||||
$('#add_direccion').val(data.direccion)
|
||||
$('#add_email').val(data.email)
|
||||
$('#add_cp').val(data.cp)
|
||||
$('#add_municipio').val(data.municipio)
|
||||
$('#add_provincia').val(data.provincia)
|
||||
$('#add_pais_id').val(data.paisId)
|
||||
$('#add_telefono').val(data.telefono)
|
||||
$('#add_cantidad').val(data.cantidad)
|
||||
$('#add_entregaPieCalle').prop('checked', data.entregaPieCalle==1?true:false)
|
||||
|
||||
$newAddDialog.modal('show')
|
||||
|
||||
|
||||
console.log(data)
|
||||
console.log()
|
||||
})
|
||||
|
||||
|
||||
const paisList = <?php echo json_encode($paisList); ?>;
|
||||
const ccaaList = <?php echo json_encode($ccaaList); ?>;
|
||||
|
||||
|
||||
$('#recoger_en_taller').change(function(){
|
||||
@ -140,12 +183,6 @@ var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
{ 'data': 'cp' },
|
||||
{ 'data': 'municipio' },
|
||||
{ 'data': 'provincia' },
|
||||
{ 'data': 'ccaaId' ,
|
||||
render: function(data, type, row, meta) {
|
||||
var value = ccaaList.find(element => element.id === data);
|
||||
return value['nombre'];
|
||||
},
|
||||
},
|
||||
{ 'data': 'paisId' ,
|
||||
render: function(data, type, row, meta) {
|
||||
var value = paisList.find(element => element.id === data);
|
||||
@ -157,6 +194,7 @@ var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
{ 'data': 'proveedor_id'},
|
||||
{ 'data': 'precio' },
|
||||
{ 'data': 'margen' },
|
||||
{ 'data': 'entregaPieCalle' },
|
||||
{
|
||||
data: actionBtns_direcciones,
|
||||
className: 'row-edit dt-center'
|
||||
@ -173,7 +211,7 @@ var tableEnvios = $('#tableOfDireccionesEnvio').DataTable( {
|
||||
],
|
||||
columnDefs: [
|
||||
{
|
||||
target: [0,13,15],
|
||||
target: [0,12,14,15],
|
||||
visible: false,
|
||||
searchable: false
|
||||
},
|
||||
@ -189,14 +227,28 @@ function checkInsertar(){
|
||||
cantidad_total = 0
|
||||
tableEnvios.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
var data = this.data();
|
||||
cantidad_total += data.cantidad
|
||||
cantidad_total += parseInt(data.cantidad )
|
||||
} );
|
||||
htmlString = ''
|
||||
if(cantidad_total < parseInt($('#tirada').val())){
|
||||
$('#rowInsertar').css('display', 'flex')
|
||||
}
|
||||
else{
|
||||
$('#rowInsertar').css('display', 'none')
|
||||
}
|
||||
|
||||
if(cantidad_total != parseInt($('#tirada').val())){
|
||||
htmlString = `
|
||||
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
||||
<span class="alert-icon alert-icon-lg text-primary me-2">
|
||||
<i class="ti ti-bell ti-sm"></i>
|
||||
</span>
|
||||
<div class="d-flex flex-column ps-1">
|
||||
<h5 class="alert-heading mb-2"><?= lang("PresupuestosDirecciones.validation.ejemplares_envio") ?></h5>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
$('#alert-envios').html(htmlString)
|
||||
}
|
||||
|
||||
function save_datos_envios(){
|
||||
@ -220,7 +272,6 @@ function save_datos_envios(){
|
||||
email : data.email,
|
||||
direccion : data.direccion,
|
||||
paisId : data.paisId,
|
||||
ccaaId : data.ccaaId,
|
||||
provincia : data.provincia,
|
||||
municipio : data.municipio,
|
||||
cp : data.cp,
|
||||
@ -229,6 +280,7 @@ function save_datos_envios(){
|
||||
margen : data.margen,
|
||||
proveedor : data.proveedor,
|
||||
proveedor_id : data.proveedor_id,
|
||||
entregaPieCalle : data.entregaPieCalle,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v,
|
||||
})
|
||||
});
|
||||
@ -261,23 +313,24 @@ function load_datos_envios(){
|
||||
'cp': linea.cp,
|
||||
'municipio': linea.municipio,
|
||||
'provincia': linea.provincia,
|
||||
'ccaaId': linea.ccaa_id,
|
||||
'paisId': linea.pais_id,
|
||||
'telefono': linea.telefono,
|
||||
'proveedor': linea.proveedor,
|
||||
'proveedor_id': linea.proveedor_id,
|
||||
'precio': linea.precio,
|
||||
'margen': linea.margen,
|
||||
'entregaPieCalle': linea.entregaPieCalle,
|
||||
'actionBtns_direcciones': actionBtns_direcciones,
|
||||
})
|
||||
.draw();
|
||||
updateTotales()
|
||||
checkInsertar()
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
checkInsertar()
|
||||
|
||||
load_datos_envios()
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -292,6 +292,7 @@ $('#paginas').on("change", function () {
|
||||
$('#tirada').on("change", function () {
|
||||
|
||||
update_servicios(false)
|
||||
checkInsertar()
|
||||
})
|
||||
|
||||
$('#papelFormatoId').select2({
|
||||
|
||||
@ -459,28 +459,30 @@
|
||||
$('#manipulado_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||
});
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
}).then(
|
||||
fetch(domain + "/presupuestos/presupuestopreimpresiones/update/" + id , {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
datos: datosPreimpresion,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8"
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
}).then(function(){
|
||||
if(update_preimpresion){
|
||||
data.lines.forEach((line) => {
|
||||
$('#precio_preimpresion_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
||||
$('#preimpresion_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||
});
|
||||
fetch(domain + "/presupuestos/presupuestopreimpresiones/update/" + id , {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
datos: datosPreimpresion,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
}),
|
||||
headers: {
|
||||
"Content-type": "application/json; charset=UTF-8"
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
|
||||
data.lines.forEach((line) => {
|
||||
$('#precio_preimpresion_' + line[0].tarifa_id).val(parseFloat(line[0].total).toFixed(2))
|
||||
$('#preimpresion_margen_' + line[0].tarifa_id).val(parseFloat(line[0].margen).toFixed(2))
|
||||
});
|
||||
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
})
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@ -41,11 +41,14 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr id="lp_bn" class="lp-interior lp_bn" style="display: none;">
|
||||
<input type="hidden" name="lp_bn_tarifa_impresion_id" id="lp_bn_tarifa_impresion_id" class="form-control" value="0"></input><input type="hidden" name="lp_bn_maquina_ancho" id="lp_bn_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_tarifa_impresion_id" id="lp_bn_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_maquina_ancho" id="lp_bn_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_maquina_alto" id="lp_bn_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_maquina_impresion_ancho" id="lp_bn_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_maquina_impresion_alto" id="lp_bn_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_formas" id="lp_bn_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_formas_v" id="lp_bn_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_formas_h" id="lp_bn_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bn_formas_orientacion" id="lp_bn_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-bn-input" type="text" value="0"></td>
|
||||
@ -91,7 +94,15 @@
|
||||
</tr>
|
||||
|
||||
<tr id="lp_bnhq" class="lp-interior lp_bnhq" style="display: none;">
|
||||
<input type="hidden" name="lp_bnhq_tarifa_impresion_id" id="lp_bnhq_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_tarifa_impresion_id" id="lp_bnhq_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_bnhq_maquina_ancho" id="lp_bnhq_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_maquina_alto" id="lp_bnhq_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_maquina_impresion_ancho" id="lp_bnhq_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_maquina_impresion_alto" id="lp_bnhq_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_formas" id="lp_bnhq_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_formas_v" id="lp_bnhq_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_formas_h" id="lp_bnhq_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_bnhq_formas_orientacion" id="lp_bnhq_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-bnhq-input" type="text" value="0"></td>
|
||||
<td class="lp-td">
|
||||
@ -136,7 +147,15 @@
|
||||
</tr>
|
||||
|
||||
<tr id="lp_color" class="lp-interior lp_color" style="display: none;">
|
||||
<input type="hidden" name="lp_color_tarifa_impresion_id" id="lp_color_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_tarifa_impresion_id" id="lp_color_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_color_maquina_ancho" id="lp_color_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_maquina_alto" id="lp_color_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_maquina_impresion_ancho" id="lp_color_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_maquina_impresion_alto" id="lp_color_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_formas" id="lp_color_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_formas_v" id="lp_color_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_formas_h" id="lp_color_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_color_formas_orientacion" id="lp_color_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-color-input" type="text" value="0"></td>
|
||||
<td class="lp-td">
|
||||
@ -182,7 +201,15 @@
|
||||
|
||||
|
||||
<tr id="lp_colorhq" class="lp-interior lp_colorhq" style="display: none;">
|
||||
<input type="hidden" name="lp_colorhq_tarifa_impresion_id" id="lp_colorhq_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_tarifa_impresion_id" id="lp_colorhq_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_colorhq_maquina_ancho" id="lp_colorhq_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_maquina_alto" id="lp_colorhq_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_maquina_impresion_ancho" id="lp_colorhq_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_maquina_impresion_alto" id="lp_colorhq_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_formas" id="lp_colorhq_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_formas_v" id="lp_colorhq_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_formas_h" id="lp_colorhq_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_colorhq_formas_orientacion" id="lp_colorhq_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-colorhq-input" type="text" value="0"></td>
|
||||
<td class="lp-td">
|
||||
@ -227,7 +254,15 @@
|
||||
</tr>
|
||||
|
||||
<tr id="lp_rot_bn" class="lp-rot lp_rot_bn" style="border-bottom-color: white; display: none;" >
|
||||
<input type="hidden" name="lp_rot_bn_tarifa_impresion_id" id="lp_rot_bn_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_tarifa_impresion_id" id="lp_rot_bn_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_rot_bn_maquina_ancho" id="lp_rot_bn_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_maquina_alto" id="lp_rot_bn_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_maquina_impresion_ancho" id="lp_rot_bn_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_maquina_impresion_alto" id="lp_rot_bn_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_formas" id="lp_rot_bn_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_formas_v" id="lp_rot_bn_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_formas_h" id="lp_rot_bn_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_bn_formas_orientacion" id="lp_rot_bn_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-rotbn-input" type="text" value="0"></td>
|
||||
<td class="lp-td">
|
||||
@ -479,7 +514,15 @@
|
||||
|
||||
|
||||
<tr id="lp_rot_color" class="lp-rot lp_rot_color" style="border-bottom-color: white; display:none;">
|
||||
<input type="hidden" name="lp_rot_color_tarifa_impresion_id" id="lp_rot_color_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_tarifa_impresion_id" id="lp_rot_color_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_rot_color_maquina_ancho" id="lp_rot_color_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_maquina_alto" id="lp_rot_color_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_maquina_impresion_ancho" id="lp_rot_color_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_maquina_impresion_alto" id="lp_rot_color_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_formas" id="lp_rot_color_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_formas_v" id="lp_rot_color_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_formas_h" id="lp_rot_color_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_rot_color_formas_orientacion" id="lp_rot_color_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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 lp-rotcolor-input" type="text" value="0"></td>
|
||||
<td class="lp-td">
|
||||
@ -731,6 +774,15 @@
|
||||
|
||||
<tr id="lp_cubierta" class="lp_cubierta" style="display: none;">
|
||||
<input type="hidden" name="lp_cubierta_tarifa_impresion_id" id="lp_cubierta_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_tarifa_impresion_id" id="lp_cubierta_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_cubierta_maquina_ancho" id="lp_cubierta_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_maquina_alto" id="lp_cubierta_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_maquina_impresion_ancho" id="lp_cubierta_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_maquina_impresion_alto" id="lp_cubierta_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_formas" id="lp_cubierta_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_formas_v" id="lp_cubierta_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_formas_h" id="lp_cubierta_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_cubierta_formas_orientacion" id="lp_cubierta_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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">
|
||||
<select id="lp_cubierta_paginas" name="comp_paginas_cubierta" class="form-control form-select-sm lp-cell lp-select" style="min-width:50px;">
|
||||
@ -785,6 +837,15 @@
|
||||
|
||||
<tr id="lp_sobrecubierta" style="display: none;">
|
||||
<input type="hidden" name="lp_sobrecubierta_tarifa_impresion_id" id="lp_sobrecubierta_tarifa_impresion_id" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_tarifa_impresion_id" id="lp_sobrecubierta_tarifa_impresion_id" class="form-control" value="0">
|
||||
<input type="hidden" name="lp_sobrecubierta_maquina_ancho" id="lp_sobrecubierta_maquina_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_maquina_alto" id="lp_sobrecubierta_maquina_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_maquina_impresion_ancho" id="lp_sobrecubierta_maquina_impresion_ancho" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_maquina_impresion_alto" id="lp_sobrecubierta_maquina_impresion_alto" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_formas" id="lp_sobrecubierta_formas" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_formas_v" id="lp_sobrecubierta_formas_v" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_formas_h" id="lp_sobrecubierta_formas_h" class="form-control" value="0"></input>
|
||||
<input type="hidden" name="lp_sobrecubierta_formas_orientacion" id="lp_sobrecubierta_formas_orientacion" class="form-control" value="0"></input>
|
||||
<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">
|
||||
@ -1030,7 +1091,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_bn').css('display', 'flex')
|
||||
$('#lp_bn').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_bnhq':
|
||||
@ -1040,7 +1101,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_bnhq').css('display', 'flex')
|
||||
$('#lp_bnhq').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_color':
|
||||
@ -1050,7 +1111,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_color').css('display', 'flex')
|
||||
$('#lp_color').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_colorhq':
|
||||
@ -1060,7 +1121,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_colorhq').css('display', 'flex')
|
||||
$('#lp_colorhq').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_rot_bn':
|
||||
@ -1070,7 +1131,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_rot_bn').css('display', 'flex')
|
||||
$('#lp_rot_bn').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_rot_color':
|
||||
@ -1080,12 +1141,12 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
}
|
||||
else{
|
||||
$('.lp_rot_color').css('display', 'flex')
|
||||
$('#lp_rot_color').css('display', 'table-row')
|
||||
}
|
||||
break
|
||||
case 'lp_cubierta':
|
||||
if($('#lp_cubierta').css('display') == 'none'){
|
||||
$('#lp_cubierta').css('display', 'flex')
|
||||
$('#lp_cubierta').css('display', 'table-row')
|
||||
}
|
||||
else{
|
||||
popErrorAlert('<?=lang('Presupuestos.errores.lineaDuplicada') ?>', 'divAlarmasLineasPresupuesto');
|
||||
@ -1094,6 +1155,7 @@ $('#addLineasPresupuesto').on("change", function (e) {
|
||||
default:
|
||||
break
|
||||
}
|
||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||
})
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -1323,6 +1385,8 @@ function fill_lp_bn(row, fromComparator=false){
|
||||
$('#lp_bn_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_bn_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_bn_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_bn_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
@ -1553,6 +1617,15 @@ function fill_lp_color(row, fromComparator=false){
|
||||
$('#lp_color_totalClicks').val(isNaN(parseFloat(row.precio_click_pedido)) ? "" : parseFloat(row.precio_click_pedido).toFixed(2))
|
||||
|
||||
$('#lp_color_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_color_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_color_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_color_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_color_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_color_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_color_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
|
||||
@ -1780,6 +1853,14 @@ function fill_lp_bnhq(row, fromComparator=false){
|
||||
$('#lp_bnhq_totalClicks').val(isNaN(parseFloat(row.precio_click_pedido)) ? "" : parseFloat(row.precio_click_pedido).toFixed(2))
|
||||
|
||||
$('#lp_bnhq_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_bnhq_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_bnhq_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_bnhq_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_bnhq_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_bnhq_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_bnhq_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_bnhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_bnhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
@ -2010,6 +2091,14 @@ function fill_lp_colorhq(row, fromComparator=false){
|
||||
$('#lp_colorhq_totalClicks').val(isNaN(parseFloat(row.precio_click_pedido)) ? "" : parseFloat(row.precio_click_pedido).toFixed(2))
|
||||
|
||||
$('#lp_colorhq_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_colorhq_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_colorhq_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_colorhq_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_colorhq_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_colorhq_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_colorhq_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_colorhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_colorhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
@ -2346,6 +2435,14 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
||||
$('#lp_rot_bn_gTintaAmarilloPed').val(isNaN(parseFloat(row.peso_gotas_amarillo_pedido)) ? "" : parseFloat(row.peso_gotas_amarillo_pedido).toFixed(2))
|
||||
|
||||
$('#lp_rot_bn_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_rot_bn_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_rot_bn_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_rot_bn_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_rot_bn_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_rot_bn_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_rot_bn_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_rot_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_rot_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
@ -2692,6 +2789,14 @@ function fill_lp_rot_color(row, fromComparador=false){
|
||||
$('#lp_rot_color_numPagColor').val(row.paginas_color)
|
||||
|
||||
$('#lp_rot_color_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_rot_color_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_rot_color_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_rot_color_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_rot_color_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_rot_color_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_rot_color_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_rot_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_rot_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
@ -2964,6 +3069,15 @@ function fill_lp_cubierta(row, fromComparador=false){
|
||||
$('#lp_cubierta_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id))) ? "" : parseInt(row.tarifa_impresion_id)
|
||||
|
||||
$('#lp_cubierta_tarifa_impresion_id').val(isNaN(parseInt(row.tarifa_impresion_id)) ? "" : parseInt(row.tarifa_impresion_id))
|
||||
$('#lp_cubierta_maquina_ancho').val(isNaN(parseFloat(row.dimensiones_maquina[0])) ? "" : parseFloat(row.dimensiones_maquina[0]))
|
||||
$('#lp_cubierta_maquina_alto').val(isNaN(parseFloat(row.dimensiones_maquina[1])) ? "" : parseFloat(row.dimensiones_maquina[1]))
|
||||
$('#lp_cubierta_maquina_impresion_ancho').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[0])) ? "" : parseFloat(row.dimensiones_maquina_impresion[0]))
|
||||
$('#lp_cubierta_maquina_impresion_alto').val(isNaN(parseFloat(row.dimensiones_maquina_impresion[1])) ? "" : parseFloat(row.dimensiones_maquina_impresion[1]))
|
||||
$('#lp_cubierta_formas').val(isNaN(parseInt(row.num_formas.value)) ? "" : parseInt(row.num_formas.value))
|
||||
$('#lp_cubierta_formas_h').val(isNaN(parseInt(row.num_formas.num_formas_horizontales)) ? "" : parseInt(row.num_formas.num_formas_horizontales))
|
||||
$('#lp_cubierta_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
||||
$('#lp_cubierta_formas_orientacion').val(row.num_formas.posicion_formas)
|
||||
|
||||
updateTotales()
|
||||
}
|
||||
|
||||
@ -2991,6 +3105,8 @@ function fill_lp_from_bbdd(){
|
||||
var date = new Date(0);
|
||||
date.setSeconds(lp.tiempo_maquina); // specify value for SECONDS here
|
||||
var timeString = date.toISOString().substring(11, 19);
|
||||
const formas = JSON.parse(lp.formas)
|
||||
|
||||
$('#lp_' + lp.tipo + '_tiempo').val(timeString)
|
||||
|
||||
$('#lp_' + lp.tipo + '_numeroPliegos').val(isNaN(parseFloat(lp.pliegos_libro)) ? "" : parseFloat(lp.pliegos_libro).toFixed(2))
|
||||
@ -3008,7 +3124,16 @@ function fill_lp_from_bbdd(){
|
||||
$('#lp_' + lp.tipo + '_checkClicks').prop('checked', lp.check_impresion_total==0?false:true)
|
||||
|
||||
$('#lp_' + lp.tipo + '_tarifa_impresion_id').val(isNaN(parseInt(lp.tarifa_impresion_id)) ? "" : parseInt(lp.tarifa_impresion_id))
|
||||
|
||||
$('#lp_' + lp.tipo + '_maquina_ancho').val(formas.maquina_ancho)
|
||||
$('#lp_' + lp.tipo + '_maquina_alto').val(formas.maquina_alto)
|
||||
$('#lp_' + lp.tipo + '_maquina_impresion_ancho').val(formas.maquina_impresion_ancho)
|
||||
$('#lp_' + lp.tipo + '_maquina_impresion_alto').val(formas.maquina_impresion_alto)
|
||||
$('#lp_' + lp.tipo + '_formas').val(formas.formas)
|
||||
$('#lp_' + lp.tipo + '_formas_v').val(formas.formas_v)
|
||||
$('#lp_' + lp.tipo + '_formas_h').val(formas.formas_h)
|
||||
$('#lp_' + lp.tipo + '_formas_orientacion').val(formas.formas_orientacion)
|
||||
|
||||
|
||||
if(lp.tipo == 'rot_bn' ||lp.tipo == 'rot_color'){
|
||||
|
||||
$('#lp_' + lp.tipo + '_numPagColor').val(isNaN(parseFloat(lp.rotativa_pag_color)) ? "" : parseFloat(lp.rotativa_pag_color).toFixed(0))
|
||||
@ -3075,12 +3200,25 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
||||
|
||||
if($('#lp_' + tipo_lp).css('display') != 'none'){
|
||||
|
||||
const formas = {
|
||||
maquina_ancho: $('#lp_' + tipo_lp + '_maquina_ancho').val(),
|
||||
maquina_alto: $('#lp_' + tipo_lp + '_maquina_alto').val(),
|
||||
maquina_impresion_ancho: $('#lp_' + tipo_lp + '_maquina_impresion_ancho').val(),
|
||||
maquina_impresion_alto: $('#lp_' + tipo_lp + '_maquina_impresion_alto').val(),
|
||||
formas: $('#lp_' + tipo_lp + '_formas').val(),
|
||||
formas_v: $('#lp_' + tipo_lp + '_formas_v').val(),
|
||||
formas_h: $('#lp_' + tipo_lp + '_formas_h').val(),
|
||||
formas_orientacion: $('#lp_' + tipo_lp + '_formas_orientacion').val(),
|
||||
}
|
||||
|
||||
let t_maq_str = $('#lp_' + tipo_lp + '_tiempo').val().split(':'); // split it at the colons
|
||||
let t_maq = 0
|
||||
var t_maq_str = $('#lp_' + tipo_lp + '_tiempo').val().split(':'); // split it at the colons
|
||||
var t_maq = 0
|
||||
|
||||
if(t_maq_str.length == 3)
|
||||
t_maq = (+t_maq_str[0]) * 3600 + (+t_maq_str[1]) * 60 + (+t_maq_str[2]);
|
||||
|
||||
|
||||
|
||||
linea_data = {
|
||||
presupuesto_id: presupuesto_id,
|
||||
tipo: tipo_lp,
|
||||
@ -3104,6 +3242,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
||||
check_impresion_total: $('#lp_' + tipo_lp + '_checkClicks').is(":checked")?1:0,
|
||||
tarifa_impresion_id: $('#lp_' + tipo_lp + '_tarifa_impresion_id').val(),
|
||||
isActiva: 1,
|
||||
formas: JSON.stringify(formas)
|
||||
}
|
||||
|
||||
if(tipo_lp == 'rot_bn' || tipo_lp == 'rot_color'){
|
||||
|
||||
@ -41,41 +41,22 @@
|
||||
<input type="text" id="add_direccion" tabindex="3" maxLength="255" class="form-control new-address">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class='row'>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="add_pais_id" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.pais') ?>*
|
||||
</label>
|
||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs new-address" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectPais') ?></option>
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>"<?=$item->id==1 ? ' selected':'' ?>>
|
||||
<?=$item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div id='divPais' class="col-md-12 col-lg-12 pl-4">
|
||||
<div class="mb-3">
|
||||
<label for="add_pais_id" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.pais') ?>*
|
||||
</label>
|
||||
<select id="add_pais_id" tabindex="4" class="form-control select2bs new-address" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectPais') ?></option>
|
||||
<?php foreach ($paisList as $item) : ?>
|
||||
<option value="<?=$item->id ?>">
|
||||
<?=$item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-lg-6 pl-4 spain-data" style="display: none;">
|
||||
<div class="mb-3">
|
||||
<label for="add_ccaa" class="form-label">
|
||||
<?=lang('PresupuestosDirecciones.ccaa') ?>*
|
||||
</label>
|
||||
<select id="add_ccaa" tabindex="5" class="form-control select2bs new-address" style="width: 100%;" >
|
||||
<option value="" disabled selected><?=lang('PresupuestosDirecciones.selectCcaa') ?></option>
|
||||
<?php foreach ($ccaaList as $item) : ?>
|
||||
<option value="<?=$item->id ?>">
|
||||
<?=$item->nombre ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
</div>
|
||||
|
||||
</div> <!-- //.row -->
|
||||
|
||||
|
||||
<div class='row'>
|
||||
|
||||
@ -175,10 +156,17 @@ $('#saveDireccionEnvio').on('click', function(){
|
||||
|
||||
if(validate_fields()){
|
||||
|
||||
if($('#addressForm').attr('action')=='edit'){
|
||||
tableEnvios.row( $("#addressForm").attr('row') )
|
||||
.remove()
|
||||
.draw();
|
||||
}
|
||||
var peso_total_libro = 0
|
||||
|
||||
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
||||
peso_total_libro += parseFloat($('#' + this.id + '_peso').val())
|
||||
// No se incluyen las lineas de datos de rotativa
|
||||
if(!this.id.includes("_data") )
|
||||
peso_total_libro += parseFloat($('#' + this.id + '_peso').val())
|
||||
})
|
||||
const peso_envio = peso_total_libro*parseInt($('#add_cantidad').val())/1000.0
|
||||
|
||||
@ -194,6 +182,7 @@ $('#saveDireccionEnvio').on('click', function(){
|
||||
})
|
||||
.done(function( data ) {
|
||||
if(data.length >0){
|
||||
//console.log(data)
|
||||
var precios = []
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if(peso_envio>data[i].peso_max){
|
||||
@ -226,13 +215,13 @@ $('#saveDireccionEnvio').on('click', function(){
|
||||
'cp': $('#add_cp').val(),
|
||||
'municipio': $('#add_municipio').val(),
|
||||
'provincia': $('#add_provincia').val(),
|
||||
'ccaaId': $('#add_ccaa').val(),
|
||||
'paisId': $('#add_pais_id').val(),
|
||||
'telefono': $('#add_telefono').val(),
|
||||
'proveedor': tarifa_final.proveedor,
|
||||
'proveedor_id': tarifa_final.proveedor_id,
|
||||
'precio': tarifa_final.precio,
|
||||
'margen': tarifa_final.margen,
|
||||
'entregaPieCalle': $('#add_entregaPieCalle').is(":checked")?1:0,
|
||||
'actionBtns_direcciones': actionBtns_direcciones,
|
||||
})
|
||||
.draw();
|
||||
@ -250,7 +239,6 @@ $('#saveDireccionEnvio').on('click', function(){
|
||||
'cp': $('#add_cp').val(),
|
||||
'municipio': $('#add_municipio').val(),
|
||||
'provincia': $('#add_provincia').val(),
|
||||
'ccaaId': $('#add_ccaa').val(),
|
||||
'paisId': $('#add_pais_id').val(),
|
||||
'telefono': $('#add_telefono').val(),
|
||||
'alias': $('#add_alias').val(),
|
||||
@ -361,7 +349,6 @@ $('#add_clientedAdd').on('select2:select', function (e) {
|
||||
$('#add_telefono').val(data[0].telefono)
|
||||
$('#add_email').val(data[0].email)
|
||||
$('#add_pais_id').val(data[0].pais_id).change();
|
||||
$('#add_ccaa').val(data[0].ccaa_id).change();
|
||||
}
|
||||
yeniden(data.<?= csrf_token() ?>);
|
||||
|
||||
@ -383,20 +370,6 @@ $('.new-address').on('change', function(e){
|
||||
|
||||
})
|
||||
|
||||
$('#add_pais_id').on('change', function(){
|
||||
var nombre_pais = $("#add_pais_id option:selected" ).text().trim();
|
||||
if(nombre_pais.localeCompare('España')==0){
|
||||
$('#divPais').removeClass('col-lg-12').addClass('col-lg-6')
|
||||
$('#divMunicipio').removeClass('col-lg-12').addClass('col-lg-6')
|
||||
$('.spain-data').css('display', 'inline')
|
||||
}
|
||||
else{
|
||||
$('.spain-data').css('display', 'none')
|
||||
$('#divPais').removeClass('col-lg-6').addClass('col-lg-12')
|
||||
$('#divMunicipio').removeClass('col-lg-6').addClass('col-lg-12')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// clear modal items when close
|
||||
$('#addressForm').on('hidden.bs.modal', function () {
|
||||
@ -404,14 +377,14 @@ $('#addressForm').on('hidden.bs.modal', function () {
|
||||
$('#add_att').val("")
|
||||
$('#add_email').val("")
|
||||
$('#add_direccion').val("")
|
||||
$("#add_pais_id").val("").change()
|
||||
$("#add_pais_id").val(1).change()
|
||||
$("#add_clientedAdd").val("").change()
|
||||
$("#add_ccaa").val("").change()
|
||||
$('#add_municipio').val("")
|
||||
$('#add_provincia').val("")
|
||||
$('#add_cp').val("")
|
||||
$('#add_telefono').val("")
|
||||
$('#add_saveDirection').prop('checked', false)
|
||||
$('#add_entregaPieCalle').prop('checked', false)
|
||||
})
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
@ -166,8 +166,8 @@ function updateTotales(){
|
||||
if ( typeof tableEnvios !== 'undefined' && tableEnvios.rows().count() > 0){
|
||||
tableEnvios.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
||||
var data = this.data()
|
||||
totalEnvios += data.precio
|
||||
margenEnvios += (data.precio)*data.margen/100
|
||||
totalEnvios += parseFloat(data.precio)
|
||||
margenEnvios += parseFloat((data.precio)*data.margen/100)
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ if (!empty($token) && $tfa == false) {
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav
|
||||
class="layout-navbar container-xxl navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme"
|
||||
class="layout-navbar container-fluid navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme"
|
||||
id="layout-navbar"
|
||||
>
|
||||
<div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 d-xl-none">
|
||||
@ -277,7 +277,7 @@ if (!empty($token) && $tfa == false) {
|
||||
<div class="content-wrapper">
|
||||
<!-- Content -->
|
||||
|
||||
<div class="container-xxl flex-grow-1 container-p-y">
|
||||
<div class="container-fluid flex-grow-1 container-p-y">
|
||||
<h5 class="py-3 mb-4">
|
||||
<?php include "breadcrumbs.php" ?>
|
||||
</h5>
|
||||
@ -289,7 +289,7 @@ if (!empty($token) && $tfa == false) {
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="content-footer footer bg-footer-theme">
|
||||
<div class="container-xxl">
|
||||
<div class="container-fluid">
|
||||
<div class="footer-container d-flex align-items-center justify-content-between py-2 flex-md-row flex-column">
|
||||
<div>
|
||||
<a href="#" target="_blank" class="fw-semibold">Safekat</a> © <?= date('Y'); ?>
|
||||
|
||||
@ -21,15 +21,15 @@ table.dataTable.table-hover>tbody>tr.selected:hover>* {
|
||||
|
||||
|
||||
.comparator-table td {
|
||||
font-size: 0.65em;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.comparator-table th {
|
||||
font-size: 0.6em;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.comparator-table td.dt-result {
|
||||
font-size: 0.9em;
|
||||
font-size: 0.7em;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
@ -60,7 +60,7 @@ table.dataTable.table-hover>tbody>tr.selected:hover>* {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 100%;
|
||||
font-size:0.7rem !important;
|
||||
font-size:0.8rem !important;
|
||||
}
|
||||
|
||||
.lp-td {
|
||||
|
||||
Reference in New Issue
Block a user