depositsFor function
Pfandangaben, wirksam fuer einen Artikel: Artikel vor Gruppe, [] = kein
Pfand, null/fehlend = wie die Gruppe. Ein Fremdgutschein-Artikel traegt nie
Pfand, auch nicht von der Gruppe.
Implementation
List<DepositEntry> depositsFor(PosArticle? article, ArticleGroup? group) {
if (article == null) return const [];
if (article.externalVoucher != null) return const [];
final eigene = article.deposits;
if (eigene != null) return eigene;
return group?.deposits ?? const [];
}