mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arraglado solapas en servicios manipulado por defecto
This commit is contained in:
@ -346,6 +346,7 @@ $("#solapas").on("click", function () {
|
||||
else {
|
||||
e.style.display = "none";
|
||||
}
|
||||
get_tarifas_enc('default');
|
||||
|
||||
$('#serv_default').click()
|
||||
});
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
@ -11,6 +11,11 @@
|
||||
<div id="accordionDatosServiciosTip" class="accordion-collapse collapse show"
|
||||
data-bs-parent="#accordionDatosServicios">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-4 py-4">
|
||||
<button id="serv_default" type="button" class="btn btn-secondary waves-effect waves-light float-start"><?= lang("Presupuestos.serviciosDefault")?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-align-top mb-4">
|
||||
<ul class="nav nav-pills mb-3 nav-servicios" role="tablist">
|
||||
<li class="nav-item">
|
||||
@ -140,11 +145,6 @@
|
||||
</div>
|
||||
<div id="serv-enc-error">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-4 px-4">
|
||||
<button id="serv_enc_default" type="button" class="btn btn-secondary waves-effect waves-light float-start"><?= lang("Presupuestos.serviciosEncDefault")?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="tableOfServiciosEncuadernacion" class="table dt-responsive dataTable" style="width: 100%;">
|
||||
<thead>
|
||||
@ -247,6 +247,12 @@
|
||||
|
||||
const POD = <?php echo $POD; ?>;
|
||||
|
||||
$('#serv_default').on('click', function(){
|
||||
get_tarifas_enc('default').then(
|
||||
get_tarifas_manipulado('default')
|
||||
)
|
||||
})
|
||||
|
||||
// Delete row
|
||||
$(document).on('click', '.btn-delete-serv', function(e) {
|
||||
const dataId = $(this).attr('data-id');
|
||||
@ -749,7 +755,7 @@
|
||||
}
|
||||
|
||||
|
||||
function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
async function get_tarifas_enc(tipo=null, tarifa_id = -1){
|
||||
const dimension = getDimensionLibro();
|
||||
|
||||
if(parseInt($('#tirada').val())>0){
|
||||
@ -850,10 +856,6 @@
|
||||
}
|
||||
|
||||
|
||||
$('#serv_enc_default').on('click', function(){
|
||||
get_tarifas_enc('default');
|
||||
})
|
||||
|
||||
$('#insertar_serv_enc').on('click', function(){
|
||||
const tarifa_text = $('#add_servicio_enc_list').select2('data')[0].text.trim()
|
||||
|
||||
@ -965,7 +967,7 @@
|
||||
$('#serv-manipulado-error').html(htmlString)
|
||||
}
|
||||
|
||||
function get_tarifas_manipulado(tarifa_id = -1){
|
||||
async function get_tarifas_manipulado(tipo=null, tarifa_id = -1){
|
||||
|
||||
if(parseInt($('#tirada').val())>0){
|
||||
var tirada = parseInt($('#tirada').val())
|
||||
@ -981,6 +983,12 @@
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
|
||||
if(tipo != null){
|
||||
datos['tipo'] = tipo;
|
||||
datos['solapas'] = $('#solapas').is(':checked')?1:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@ -988,6 +996,9 @@
|
||||
data: datos,
|
||||
success: function (data) {
|
||||
|
||||
if(tipo=='default')
|
||||
tableServiciosManipulado.clear().draw()
|
||||
|
||||
data.values.forEach((row) => {
|
||||
|
||||
tableServiciosManipulado.row.add([
|
||||
|
||||
Reference in New Issue
Block a user