Teste conteúdo
Ambiente de teste
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
JavaScript
//EVENTO A ////////////////////////////////////////////////////////
$("input[name=situacao]").on('change', function() {
if ($(this).val() == "S") {
$("#data_ini").attr("readonly", true);
$("#data_ini").attr("disabled", true);
$('#tab-kmUsado').hide();
} else if ($(this).val() == "C") {
$("#data_fim").attr("readonly", true);
$("#data_fim").attr("disabled", true);
$("#situacao_saida").attr("disabled", false);
$("#data_fim").val(str_data + " " + str_hora);
$("#tab_cliente").mouseover();
$('#tab-avisoKmUsado').hide();
$('#tab-kmUsado').show();
if ($("#selectPlano").val() == "KL") {
$("#planoDia").html($("#dias").val());
$("#planoValor").html($("#valor_dia_kmlivre").val());
planoTotal = $("#dias").val() * $("#valor_dia_kmlivre").val();
$("#planoTotal").html(planoTotal.toFixed(2));
$(".planoTotal").val(planoTotal.toFixed(2));
}
if ($("#selectPlano").val() == "KMC") {
$("#planoDia").html($("#dias").val());
$("#planoValor").html($("#valor_diaria_controlada").val());
planoTotal = $("#dias").val() * $("#valor_diaria_controlada").val();
$("#planoTotal").html(planoTotal.toFixed(2));
$(".planoTotal").val(planoTotal.toFixed(2));
}
if ($("#selectPlano").val() == "DI") {
$("#planoDia").html($("#dias").val());
$("#planoValor").html($("#valor_diaria").val());
planoTotal = $("#dias").val() * $("#valor_diaria").val();
$("#planoTotal").html(planoTotal.toFixed(2));
$(".planoTotal").val(planoTotal.toFixed(2));
}
if ($("input[type=radio][name='seguroCarro']:checked").val() == "S") {
$("#SegCarroS2").html($("#dias").val());
$("#SegCarroS3").html($("#val_seguro_carro").val());
seguroV = $("#dias").val() * $("#val_seguro_carro").val();
$("#SegCarroS4").html(seguroV.toFixed(2));
$(".SegCarroS4").val(seguroV.toFixed(2));
} else {
$("#SegCarroS2").html("0");
...