calcular = ""
while(calcular !="no"){
var n = prompt("oprima 1 si trae su moto por garantia o 2 si la trae para un mantenimiento general");
if(n == 1){
n_motos_garant = 0
recaudo_g = 0
var km = prompt("ingrese kilometros recorridos");
var km = parseFloat(km);
if(km <= 2000){
alert("su moto cumple con las condiciones para la garantia, RECUERDA QUE EL MANTENIMIETO SERA GRATUITO, pero se cobraran los repuestos y el aceite");
var marca = prompt("ingrese marca de la moto, yamaha, akt, auteco");
if(marca == "yamaha"){
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
descuento = repuesto*0.3
total_mant = repuesto-descuento+13000
alert("El 30% de descuento sobre el valor de los repuestos es de:"+""+descuento);
alert("valor de cambio de aceite es de $13.000");
alert("EL TOTAL A PAGAR SERA DE:"+""+total_mant");
}
else{
if(marca=="akt"){
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
descuento = repuesto*0.25
total_mant = repuesto-descuento+12000
alert("El 25% de descuento sobre el valor de los repuestos es de:"+""+descuento);
alert("valor de cambio de aceite es de $12.000");
alert("EL TOTAL A PAGAR SERA DE:"+""+total_mant");
}}
else{
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
descuento = repuesto*0.2
total_mant = repuesto-descuento+10000
alert("El 20% de descuento sobre el valor de los repuestos es de:"+""+descuento);
alert("valor de cambio de aceite es de $10.000");
alert("EL TOTAL A PAGAR SERA DE:"+""+total_mant");
}}}
else{
alert("su moto no esta en condiciones de realizarle una garantia. Recuerde que el valor del mantenimiento es de $20.000 más el valor del aceite y los repuestos");
var mante = prompt("DESEA REALIZAR EL MANTENIMIENTO?");
if(mante !="no"){
var marca = prompt("ingrese marca de la moto, yamaha, akt, auteco");
if(marca == "yamaha"){
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
alert("valor de cambio de aceite es de $13.000");
total_mant = repuesto+20000+13000
alert("EL TOTAL APGAR SERA DE :"+""+ total_mant);
}
else{
if(marca == "akt"){
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
alert("valor de cambio de aceite es de $12.000");
total_mant = repuesto+20000+12000
alert("EL TOTAL APGAR SERA DE :"+""+ total_mant);
}
else{
var repuesto = prompt("INGRESE VALOR TOTAL DE COSTO DE TODOS LOS REPUESTO REQUERIDOS");
alert("valor de cambio de aceite es de $10.000");
total_mant = repuesto+20000+10000
alert("EL TOTAL APGAR SERA DE :"+""+ total_mant);
}}
}
n_motos_garant = n_motos_garant + 1
recaudo_g = recaudo_g+total_mant
else{
alert("el valor mantenimiento = $50.000 más valor de repuestos requeridos");
n_motos_mant = 0
recaudo_m = 0
var repuestos = prompt("ingresar el valor de los repuestos cambiados");
total_mant = repuestos+50000
alert("EL TOTAL A PAGAR SERA DE :"+""+total_mant);
n_motos_mant = n_motos_mant + 1
recaudo_m = recaudo_m + total_mant
}
var calcular = prompt("¿DESEA CALCULAR EL INGRESO DE OTRA MOTO?");
}
total_recaudo = recaudo_m+recaudo_g
total_motos = n_motos_mant+n_motos_garant
document.write("RESUMEN DEL DIA"+"
");
document.write("mantenimiento general"+""+n_motos_mant+""+"motos"+" = "+recaudo_m);
document.write("mantenimiento garantia+""+n_motos_garant+""+"motos"+" = "+recaudo_g);
document.write("total "+""+total_motos+"motos" en el dia por un valor de:"+total_recaudo);
document.write("EL TALLER RIVERMOTOS ESTA A SU SERVICIO VUELVA PRONTO");
No hay comentarios:
Publicar un comentario