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