Swal.fire({ title: "You Want To Access Our Inventory's Data", showDenyButton: true, showCancelButton: false, confirmButtonText: 'Yes', denyButtonText: `No`, }).then((result) => { /* Read more about isConfirmed, isDenied below */ if (result.isConfirmed) { $('#modaldemo2').modal('show'); } else if (result.isDenied) { var services_id = $('#services_id').val(); var get_inquiry_id = $('#inquiry_id').val(); $.ajax({ // alert(count) url: "{{ url('get_quotations_sub_services') }}/" + sub_services_id + '/' + services_id + '/' + get_inquiry_id + '/' + count, type: 'GET', success: function(data) { alert(count); if (data.services_name == "VISA") { $('#feild_1' + count).html( "No Of Adults"); $('#feild_2' + count).html( "No Of Children"); $('#feild_3' + count).html( "No Of Infants"); $('#feild_4' + count).html( "Cost Price"); $('#feild_5' + count).html( "Selling Price"); // $('#feild_6').html("No Of Infants"); $('#feild_6' + count).html("Sub Total"); $('#feild_7' + count).html("Discount"); $('#feild_8' + count).html("Total"); $('#feild_9' + count).html( ''); $('#feild_10' + count).html( ''); $('#input_feild_1' + count).html( '' ); $('#input_feild_2' + count).html( '' ); $('#input_feild_3' + count).html( '' ); $('#input_feild_4' + count).html( '' ); $('#input_feild_5' + count).html( '' ); $('#input_feild_6' + count).html( '' ); $('#input_feild_7' + count).html( '' ); $('#input_feild_8' + count).html( '' ); $('#input_feild_9' + count).html( ''); $('#input_feild_10' + count).html( ''); } if (data.services_name == "Hotel") { $('#feild_1').html("Name"); $('#feild_2').html("Beds"); $('#feild_3').html("Check In"); $('#feild_4').html("Check Out"); $('#input_feild_1').html( '' ); $('#input_feild_2').html( '' ); $('#input_feild_3').html( '' ); $('#input_feild_4').html( '' ); $('#input_feild_5').html( '' ); $('#input_feild_6').html( '' ); $('#input_feild_7').html( ''); } count = count + 1; $('#append_table').append(data .table_details); } }); // Swal.fire('Changes are not saved', '', 'info') } })