lots of smaller improvements
This commit is contained in:
parent
c3b17fbb8b
commit
84f71ea056
13 changed files with 49 additions and 24 deletions
|
@ -24,7 +24,8 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
|||
case 0:
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
[[fallthrough]];
|
||||
myFont.setFamily("monospace");
|
||||
return myFont;
|
||||
case 2:
|
||||
return myFont;
|
||||
case 3:
|
||||
|
@ -45,7 +46,7 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
|||
case 0:
|
||||
return article->getUuidAsString().c_str();
|
||||
case 1:
|
||||
return article->getArticleNo();
|
||||
return article->getCompleteArticleNo().c_str();
|
||||
case 2:
|
||||
return article->getSeller()->getSellerNo();
|
||||
case 3:
|
||||
|
@ -96,7 +97,10 @@ void BasketModel::addArticle(Seller* seller, int price)
|
|||
void BasketModel::finishSale()
|
||||
{
|
||||
emit beginRemoveRows(QModelIndex(), 0, marketplace_->getBasket().size() - 1);
|
||||
marketplace_->finishCurrentSale();
|
||||
auto sale = std::make_unique<Sale>();
|
||||
sale->createUuid();
|
||||
sale->setSourceNo(QSettings().value("global/cashPointNo").toInt());
|
||||
marketplace_->finishCurrentSale(std::move(sale));
|
||||
emit endRemoveRows();
|
||||
emit basketDataChanged();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue