correct mistake in stock controller

This commit is contained in:
zebardy 2019-11-18 07:28:52 +00:00
parent 75367598ea
commit 75a3c6c62e

View File

@ -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)