Commit 33cfafaf authored by Alexander Rehnman's avatar Alexander Rehnman

Fixed bug in stock value display

Caused by total_price not being initialized to 0.
parent 752270f8
......@@ -803,7 +803,7 @@ void MainWindow::clear_stockDiffTemp()
*/
QVariant MainWindow::get_acquistion_stock_value()
{
qlonglong total_price;
qlonglong total_price = 0;
QSqlQuery tQuery("SELECT s.product_id as id, s.active as active, p.name "
"FROM stock s INNER JOIN products p "
"ON s.product_id = p.id");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment