Add department daily reports feature and improve product handling
Introduced functionality for managing department daily reports, including endpoints for creating, updating, listing, and viewing product sales data. Enhanced product handling in reports by adding support for water usage, notes, and detailed product sales metrics. These changes improve tracking and reporting accuracy across departments.
This commit is contained in:
@@ -39,6 +39,15 @@ trait route_t
|
||||
return true;
|
||||
}
|
||||
|
||||
public function requireDateFormat(string $date, string $format): void
|
||||
{
|
||||
global $response;
|
||||
$d = \DateTime::createFromFormat($format, $date);
|
||||
if (!$d || $d->format($format) !== $date) {
|
||||
$response->error('Invalid date format. Expected: ' . $format . ' Got: ' . $date, 400);
|
||||
}
|
||||
}
|
||||
|
||||
public function requireMinValue(int $value, int $min): void
|
||||
{
|
||||
global $response;
|
||||
|
||||
Reference in New Issue
Block a user