code refactoring
This commit is contained in:
parent
db11b0cf83
commit
c445d73765
@ -278,44 +278,28 @@ abstract class Report
|
||||
case 'yearly':
|
||||
$start->addYear();
|
||||
|
||||
$date = $this->getFormattedDate($start);
|
||||
|
||||
$this->dates[$j] = $date;
|
||||
|
||||
foreach ($this->tables as $table) {
|
||||
$this->footer_totals[$table][$date] = 0;
|
||||
}
|
||||
|
||||
$j += 11;
|
||||
|
||||
break;
|
||||
case 'quarterly':
|
||||
$start->addQuarter();
|
||||
|
||||
$date = $this->getFormattedDate($start);
|
||||
|
||||
$this->dates[$j] = $date;
|
||||
|
||||
foreach ($this->tables as $table) {
|
||||
$this->footer_totals[$table][$date] = 0;
|
||||
}
|
||||
|
||||
$j += 2;
|
||||
|
||||
break;
|
||||
default:
|
||||
$start->addMonth();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$date = $this->getFormattedDate($start);
|
||||
|
||||
$this->dates[$j] = $date;
|
||||
$this->dates[] = $date;
|
||||
|
||||
foreach ($this->tables as $table) {
|
||||
$this->footer_totals[$table][$date] = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user