Added the payment options to the summary and enhanced usability handling with delivery options

This commit is contained in:
Dennis Nemec
2026-01-08 14:11:01 +01:00
parent ffdd7fa0ff
commit 6eafb0fab0
4 changed files with 42 additions and 20 deletions

View File

@ -267,14 +267,17 @@ class Delivery implements Comparable<Delivery> {
}
Article? findArticleWithNoteId(String noteId) {
Article? filteredArticle =
articles.where((article) => article.removeNoteId == noteId).firstOrNull;
if (filteredArticle == null && discount?.article != null) {
filteredArticle = discount?.article;
if (discount != null && discount?.noteId == noteId) {
return discount?.article;
}
return filteredArticle;
int index = articles.indexWhere((article) => article.removeNoteId == noteId);
// If no article with an according remove note id is found, skip this step.
if (index == -1) {
return null;
}
return articles[index];
}
double getGrossPrice() {