double total = 0.0;
for (PaymentInfo p : payments) {
total += p.getTotal();
}
payments.add(new PaymentInfoTicket(-total, "debtpaid"));
ticket.setPayments(payments);
ticket.setUser(m_App.getAppUserView().getUser().getUserInfo());
ticket.setActiveCash(m_App.getActiveCashIndex());
ticket.setDate(new Date());
ticket.setCustomer(currentCustomer);