Changeset 1739


Ignore:
Timestamp:
Nov 20, 2012, 4:20:29 PM (9 years ago)
Author:
olle
Message:

Refs #421. JSP script samplereportgenerator.jsp in reggie/resources/ updated in function createSampleCountReport(report) to calculate the number of columns correctly for quarterly view, when the start and end dates lie in the same year (this could never happen in the original version, where quarterly view was used only for time periods between 13 months and 3 years). The original calculation assumed that the start and end years where different, and therefore resulted in 4 extra quarter columns.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/samplereportgenerator.jsp

    r1738 r1739  
    305305    else if (viewType == 'QUARTER')
    306306    {
    307       //First year
     307      // First year (from start quarter to end of year)
    308308      numCols = 4 - Math.floor(periodStartDate.getMonth()/3);
     309      // Last year (from start of year to end quarter)
    309310      numCols += Math.floor(endDate.getMonth()/3)+1;
     311      // If first and last year is the same, subtract 4 quarters
     312      if (endDate.getFullYear() - periodStartDate.getFullYear() == 0)
     313      {
     314        numCols -= 4;
     315      }
     316      // Full years between start and end dates
    310317      if((endDate.getFullYear() - periodStartDate.getFullYear()) > 1)
    311318      {
Note: See TracChangeset for help on using the changeset viewer.