diff --git a/src/core/sale.cpp b/src/core/sale.cpp index 1da00fc..ade50b5 100644 --- a/src/core/sale.cpp +++ b/src/core/sale.cpp @@ -24,6 +24,8 @@ void Sale::removeArticle(const Article* articlePtr) [&articlePtr](auto art) { return art.get() == articlePtr; }); if (it != articles_.end()) { (*it)->setSale(nullptr); + (*it)->setState( + Article::State::DELETE); // since we only have ad-hoc articles, that have all been sold articles_.erase(it); } }