}
# recalculate
- $amount = $form->{amount};
+
+ # Modified from $amount = $form->{amount} by J.Zach to update amount to total
+ # payment amount in Zahlungsausgang
+ $amount = 0;
for $i (1 .. $form->{rowcount}) {
map {
$form->{"paid_$i"} = $form->{"due_$i"};
}
- $amount -= $form->{"paid_$i"};
+ # Modified by J.Zach, see abovev
+ $amount += $form->{"paid_$i"};
+
} else {
$form->{"paid_$i"} = "";
}
}
+ # Line added by J.Zach, see above
+ $form->{amount}=$amount;
+
&form_header;
&list_invoices;
&form_footer;