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,17 @@ class productsRoute
|
||||
$user = (new authentication())->get_user();
|
||||
// Check if the request was successful
|
||||
if ($user) {
|
||||
// Check if the id is set in the request
|
||||
if (self::isParametersSet(['id'])) {
|
||||
// Log the incident
|
||||
(new logs_o())->add('products', 'global', 1, $user->id, 'LIST_PRODUCTS', 'Successfully listed product with id ' . $response->getRequestParameter('id'));
|
||||
// Return the product
|
||||
$response->success(
|
||||
parseProduct(
|
||||
(new products_o())->select((int)self::getParameter('id'))->asArray()
|
||||
)
|
||||
);
|
||||
}
|
||||
// Check if the category is set in the request
|
||||
$data = $_GET ?? [];
|
||||
// Check if the category is set
|
||||
|
||||
Reference in New Issue
Block a user