mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'bug/cubierta_con_solapas'
# Conflicts: # ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_lineasPresupuestoItems.php
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" tabindex="6" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapasCubierta') ?></label>
|
||||
<label class="form-check-label" for="solapas"><?= lang('Presupuestos.solapasCubierta') ?></label>
|
||||
</div>
|
||||
|
||||
</div><!--//.mb-3 -->
|
||||
@ -70,13 +70,13 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none" type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
|
||||
<div class="col-md-12 col-lg-6">
|
||||
<div class="mb-3">
|
||||
<input style="display: none" type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
<div class="mb-3">
|
||||
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
</div><!--//.col -->
|
||||
</div>
|
||||
@ -341,6 +341,13 @@ $('#papelFormatoId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
let initTamanioPersonalizado = <?php echo ($presupuestoEntity->papel_formato_personalizado==true?1:0); ?>;
|
||||
if(initTamanioPersonalizado != null){
|
||||
if ( initTamanioPersonalizado){
|
||||
$('#papelFormatoId').next(".select2-container").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$('#papelFormatoPersonalizado').on("click",function(){
|
||||
var checkbox = document.getElementById('papelFormatoPersonalizado');
|
||||
if(checkbox.checked == true){
|
||||
|
||||
@ -1083,6 +1083,10 @@
|
||||
$('#compPaginasNegrohq').val('0');
|
||||
$('#compPaginasNegro').val($('#paginas').val())
|
||||
|
||||
if($('#tipoImpresion').select2('data')[0].id == 'negro'){
|
||||
$('#compGramajeColor').val('').trigger('change')
|
||||
$('#compPapelColor').val(0).trigger('change')
|
||||
}
|
||||
|
||||
if( $('#tableCompIntPlana').DataTable().rows().count() > 0 &&
|
||||
$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
|
||||
@ -1102,6 +1106,11 @@
|
||||
$('#compPaginasColor').val('0')
|
||||
$('#compPaginasNegro').val('0')
|
||||
$('#compPaginasNegrohq').val($('#paginas').val())
|
||||
|
||||
if($('#tipoImpresion').select2('data')[0].id == 'negrohq'){
|
||||
$('#compGramajeColorhq').val('').trigger('change')
|
||||
$('#compPapelColorhq').val(0).trigger('change')
|
||||
}
|
||||
|
||||
if($('#tableCompIntPlana').DataTable().rows().count() > 0 &&
|
||||
!$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
|
||||
@ -1118,7 +1127,7 @@
|
||||
})
|
||||
|
||||
|
||||
function checkComparadorInt(is_color, is_hq, actualizarLinea=false) {
|
||||
function checkComparadorInt(is_color, is_hq, actualizarLineaPlana=false, actualizarLineaRot=false) {
|
||||
|
||||
try{
|
||||
|
||||
@ -1135,11 +1144,11 @@
|
||||
checkDatosPedidoForComp()) {
|
||||
|
||||
|
||||
getLineasIntPlana(is_color, is_hq, actualizarLinea).then((result) =>{
|
||||
getLineasIntPlana(is_color, is_hq, actualizarLineaPlana).then((result) =>{
|
||||
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
|
||||
if(!is_color)
|
||||
{
|
||||
getLineasIntRot(is_hq, actualizarLinea);
|
||||
getLineasIntRot(is_hq, actualizarLineaRot);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1150,7 +1159,7 @@
|
||||
if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
|
||||
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
|
||||
{
|
||||
getLineasIntRot(is_hq, actualizarLinea);
|
||||
getLineasIntRot(is_hq, actualizarLineaRot);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -37,10 +37,10 @@
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
<?php if (str_contains($formAction, 'edit')): ?>
|
||||
<?= anchor(route_to("presupuestoToPdf"), lang("Basic.global.Print"), ["class" => "btn btn-dark float-start me-sm-3 me-1",]) ?>
|
||||
<?= anchor(route_to("presupuestoToPdf", $presupuestoId), lang("Basic.global.Print"), ["class" => "btn btn-dark float-start me-sm-3 me-1",'target' => '_blank']) ?>
|
||||
<?= anchor(route_to("#"), lang("Basic.global.Clone"), ["class" => "btn btn-info float-start me-sm-3 me-1",]) ?>
|
||||
<?php endif; ?>
|
||||
<?= anchor(route_to("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
||||
<?= anchor(route_to("cosidotapablandaList", $tipo_impresion_id), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -120,38 +120,42 @@ const url_parts = url.split('/');
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
if(url_parts[url_parts.length-2] == 'edit'){
|
||||
id = url_parts[url_parts.length-1];
|
||||
id = url_parts[url_parts.length-1];
|
||||
}
|
||||
else{
|
||||
id = -1;
|
||||
id = -1;
|
||||
}
|
||||
|
||||
$('#presupuestoForm').on( "submit", function( event ) {
|
||||
event.preventDefault();
|
||||
save_servicios();
|
||||
save_datos_envios();
|
||||
|
||||
event.preventDefault();
|
||||
save_servicios();
|
||||
save_datos_envios();
|
||||
|
||||
|
||||
$.when(fill_bbdd_from_lp(id).then(function (data, textStatus, jqXHR){
|
||||
generateCompJSON()
|
||||
form = $('#presupuestoForm').serialize()
|
||||
form += getValuesResumenForm()
|
||||
$.when(fill_bbdd_from_lp(id).then(function (data, textStatus, jqXHR){
|
||||
generateCompJSON()
|
||||
form = $('#presupuestoForm').serialize()
|
||||
form += getValuesResumenForm()
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo $formAction; ?>",
|
||||
data: form,
|
||||
success: function (data) {
|
||||
yeniden(data.<?= csrf_token() ?>)
|
||||
popSuccessAlert(data.mensaje)
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, error) {
|
||||
// Handle error here
|
||||
console.log(jqXHR)
|
||||
});;
|
||||
}))
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo $formAction; ?>",
|
||||
data: form,
|
||||
success: function (data) {
|
||||
yeniden(data.<?= csrf_token() ?>)
|
||||
if('errorMensaje' in data)
|
||||
popErrorAlert(data.errorMensaje)
|
||||
else
|
||||
popSuccessAlert(data.mensaje)
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, error) {
|
||||
// Handle error here
|
||||
console.log(jqXHR)
|
||||
});;
|
||||
}))
|
||||
|
||||
return false; //stop the actual form post !important!
|
||||
return false; //stop the actual form post !important!
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user