From 75a3c6c62e10f79169b18064c7eecc2ba85163f6 Mon Sep 17 00:00:00 2001 From: zebardy Date: Mon, 18 Nov 2019 07:28:52 +0000 Subject: [PATCH] correct mistake in stock controller --- controllers/StockController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/controllers/StockController.php b/controllers/StockController.php index 25a3f9c3..fb0cb468 100644 --- a/controllers/StockController.php +++ b/controllers/StockController.php @@ -51,15 +51,16 @@ class StockController extends BaseController public function Consume(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) { - $fp = fopen('/www/data/sql.log', 'a'); - fwrite($fp, "???executing consume stock"); - $time_start = microtime(true); + #$fp = fopen('/www/data/sql.log', 'a'); + #fwrite($fp, "???executing consume stock"); + #$time_start = microtime(true); $result = $this->AppContainer->view->render($response, 'consume', [ 'products' => $this->Database->products()->orderBy('name'), 'recipes' => $this->Database->recipes()->orderBy('name') ]); - fwrite($fp, "???Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n"); - fclose($fp); + #fwrite($fp, "???Total execution time in seconds: " . round((microtime(true) - $time_start),6) . "\n"); + #fclose($fp); + return $result; } public function Inventory(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)