Skip to content

Commit

Permalink
koelleChristian#34: divide rest among blanks - should not consider ze…
Browse files Browse the repository at this point in the history
…ro as blank

0 payment means, the participant should not be considered for that specific payment. Split evenly should hence skip this entry as well and only split among the actual blanks aka "" or null.
  • Loading branch information
pokulo authored Nov 24, 2021
1 parent 287b843 commit f3dcbe0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public void divideRest(View view) {
int countBlanks = 0;
List<Participant> participantsWithBlanks = new ArrayList<>();
for (Entry<Participant, Amount> entry : payment.getParticipantToSpending().entrySet()) {
if (entry.getValue().getValue() == null || entry.getValue().getValue() == 0) {
if (entry.getValue().getValue() == null) {
countBlanks = countBlanks + 1;
participantsWithBlanks.add(entry.getKey());
}
Expand Down

0 comments on commit f3dcbe0

Please sign in to comment.