store sales

This commit is contained in:
Martin Brodbeck 2018-07-25 09:31:17 +02:00
parent 1ce329b99b
commit bc67018c1c
8 changed files with 196 additions and 7 deletions

View file

@ -90,6 +90,8 @@ void MainWindow::on_sellerNoEdit_checkSellerNo()
if (dialogResult == QDialog::Accepted) {
int price = priceDialog.getPrice();
dynamic_cast<BasketModel*>(ui_.basketView->model())->addArticle(seller, price);
std::string sumStr = "Gesamt: " + marketplace_->getBasketSumAsString();
ui_.basketSumLabel->setText(sumStr.c_str());
}
}

View file

@ -30,7 +30,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<widget class="QLabel" name="basketSumLabel">
<property name="font">
<font>
<pointsize>18</pointsize>
@ -42,7 +42,7 @@
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string>Gesamt: -,--</string>
<string>Gesamt: ---</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>