Fix production view for initial display.
This commit is contained in:
@@ -30,8 +30,9 @@ if (isset($_POST['action']) && $_POST['action'] == 'set_values') {
|
||||
$local_db->query($query);
|
||||
}
|
||||
|
||||
$actual = new DateTime();
|
||||
$dates = get_month($local_db, $table_aggregation);
|
||||
$chosen_date = (isset($_POST['date'])) ? $_POST['date'] : $dates[0];
|
||||
$chosen_date = (isset($_POST['date'])) ? $_POST['date'] : $actual->format('Y-m');
|
||||
$production_values = get_production_values_for_month($local_db, $table_aggregation, $chosen_date);
|
||||
$month_production = get_month_production($local_db, $table_production, $chosen_date);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user