Add weekly department results route, enhance date handling in invoicing and statistics logic, and improve Slack notification configuration
This commit is contained in:
@@ -62,7 +62,11 @@ class InvoicingPeriodRoute
|
||||
self::requireDateFormat($dateFrom, 'Y-m-d');
|
||||
self::requireDateFormat($dateTo, 'Y-m-d');
|
||||
// Add a day to the dateTo parameter to include the end date in the range
|
||||
$dateTo = date('Y-m-d', strtotime($dateTo . ' +1 day'));
|
||||
$dateFrom = date('Y-m-d 00:00:00', strtotime($dateFrom));
|
||||
$dateTo = date('Y-m-d 23:59:59', strtotime($dateTo));
|
||||
// Add date from and date to to the response meta
|
||||
$response->add_meta('date_from', $dateFrom);
|
||||
$response->add_meta('date_to', $dateTo);
|
||||
// Get the invoicing period for the user
|
||||
$response->success([...self::getInvoicingPeriod($dateFrom, $dateTo)]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user