Browse Source

handle case that user changed source_no while there are items in basket

allow_new_sellers
Martin Brodbeck 4 years ago
parent
commit
e45143abc1
  1. 4
      src/core/marketplace.cpp

4
src/core/marketplace.cpp

@ -106,7 +106,9 @@ void Marketplace::finishCurrentSale(std::unique_ptr<Sale> sale)
return;
for (auto iter = basket_.begin(); iter != basket_.end(); ++iter) {
sale->addArticle((*iter).get());
iter->get()->setSourceNo(sale->getSourceNo()); // update source_no for article in the case
// the user has changed it in the meanwhile
sale->addArticle(iter->get());
(*iter)->getSeller()->addArticle(std::move(*iter));
}

Loading…
Cancel
Save