Commits

Alejandro Villanueva committed f1209c4

fixing Bug in js calculating days

Comments (0)

Files changed (2)

 *.pyc
 *.db
 local_settings.py
+.DS_Store

static/assets/js/sales.js

     // Calculate days between two dates
     $("#id_fecha_entrada").change(function(){
         num_days = daydiff(parseDate($('#id_fecha_salida').val()), parseDate($('#id_fecha_entrada').val()));
-        $("#id_dias").val(num_days);
-        $("#dias").text(num_days);
+        $("#id_dias").val(num_days.toPrecision(1));
+        $("#dias").text(num_days.toPrecision(1));
     });
     
     // Get price of car