jorgebooks / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

error on costs page #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
in january there is a wrong data index that raise a js error on the prices page

Original issue reported on code.google.com by lalelu...@gmail.com on 12 Jan 2013 at 2:02

GoogleCodeExporter commented 9 years ago
Will be fixed in the next version.

To fix it manually you had to edit 2 files

measureit_functions.php

in function sensor_values_now_get change one line
from
$month = @date( 'n', $ts )-1;

to
$month = @date( 'n', $ts );

in js/measureit.js change the function function month_get

from
function month_get(date){
    var month=new Array(12);
    month[0]=lng.january;
    month[1]=lng.february;
    month[2]=lng.march;
    month[3]=lng.april;
    month[4]=lng.may;
    month[5]=lng.june;
    month[6]=lng.july;
    month[7]=lng.august;
    month[8]=lng.september;
    month[9]=lng.october;
    month[10]=lng.november;
    month[11]=lng.december;
    return month[date];
}

to
function month_get(date){
    var month=new Array(13);
    month[1]=lng.january;
    month[2]=lng.february;
    month[3]=lng.march;
    month[4]=lng.april;
    month[5]=lng.may;
    month[6]=lng.june;
    month[7]=lng.july;
    month[8]=lng.august;
    month[9]=lng.september;
    month[10]=lng.october;
    month[11]=lng.november;
    month[12]=lng.december;
    return month[date];
}

to not use the current files from checkput. they will not work with the current 
version!

Original comment by lalelu...@gmail.com on 12 Jan 2013 at 5:05

GoogleCodeExporter commented 9 years ago
fixed with version 114

Original comment by lalelu...@gmail.com on 17 Feb 2013 at 3:30

GoogleCodeExporter commented 9 years ago
Was not fixed with the last commit. 
Now it is fixed and will be online in the next version.

Original comment by lalelu...@gmail.com on 9 Mar 2013 at 9:56