Search in sources :

Example 1 with Payment

use of com.github.drbookings.model.Payment in project drbookings by DrBookings.

the class BookingDetailsController method addNewPayment.

static void addNewPayment(String paymentString, BookingBean be) {
    if (StringUtils.isBlank(paymentString)) {
        return;
    }
    double paymentAmount = Double.parseDouble(paymentString);
    LocalDate paymentDate = LocalDate.now();
    Payment payment = new Payment(paymentDate, paymentAmount);
    be.getPayments().add(payment);
}
Also used : Payment(com.github.drbookings.model.Payment) LocalDate(java.time.LocalDate)

Aggregations

Payment (com.github.drbookings.model.Payment)1 LocalDate (java.time.LocalDate)1