fully support special seller "Sonderkonto"

This commit is contained in:
Martin Brodbeck 2018-08-07 09:27:15 +02:00
parent a3b832b087
commit a7a83ba3b9
6 changed files with 24 additions and 4 deletions

View file

@ -81,12 +81,13 @@ QVariant BasketModel::headerData(int section, Qt::Orientation orientation, int r
return "";
}
void BasketModel::addArticle(Seller* seller, int price)
void BasketModel::addArticle(Seller* seller, int price, const std::string& desc)
{
emit beginInsertRows(QModelIndex(), marketplace_->getBasket().size(),
marketplace_->getBasket().size());
auto article = std::make_unique<Article>(price);
article->createUuid();
article->setDescription(desc);
article->setArticleNo(marketplace_->getNextArticleNo());
article->setSourceNo(QSettings().value("global/cashPointNo").toInt());
article->setSeller(seller);