Package uk.org.woodcraft.bookings.datamodel

Examples of uk.org.woodcraft.bookings.datamodel.Transaction


      String discountComment = String.format("%.2f received prior to deadline", qualifyingPaymentTotal);
      if (unpaidBookings.size() > 0)
        discountComment += String.format("; There were %d additional bookings with insufficient funds received to qualify for the discount",
                    unpaidBookings.size());
     
      discount = new Transaction(unit.getKeyCheckNotNull(), event.getKeyCheckNotNull(),
          timestamp, TransactionType.Discount, discountName, discountComment, amountToDiscount);
     
    }
View Full Code Here


      pm.makePersistentAll(bookings);
     
     
      // Transactions
      List<Transaction> transactions = new ArrayList<Transaction>();
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 1", "Comment 1", 23.32d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 2", "", 12.00d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 3", "", 130.00d));
     
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Adjustment, "Refund 1", "Refund test", -23.32d));
     
      transactions.add(new Transaction(unit2.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Unit 2 payment", "", 70.00d));
     
      // after earlybird deadline
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Payment, "Payment after earlybird", "", 10.00d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Discount, "Discount for early payment", "", 5.00d));
      pm.makePersistentAll(transactions);
     
      // Users
      User user1 = new User(TestConstants.USER_ADMIN_EMAIL, "Global Admin 1", "password", Accesslevel.GLOBAL_ADMIN);
      user1.setOrganisationKey(orgWcf.getKeyCheckNotNull());
View Full Code Here

   
    int transNumber = 0;
    for(Unit unit : testUnits)
    {
      String transName = "Test Trans "+transNumber++;
      testTransactions.add(new Transaction(unit.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), clock.getTime(),
                        TransactionType.Payment,  transName, null, 1.0d));
      testTransNames.add(transName);
    }
    CannedQueries.save(testTransactions);
   
View Full Code Here

    Key key = getWebKeyAsKey();
    if (key != null)
    {
      setModel(CannedQueries.TransactionByKey(key));
    } else {
      setModel(new Transaction(getCurrentUnit().getKeyCheckNotNull(), getCurrentEvent().getKeyCheckNotNull(), getCurrentTime()));
    }
  }
View Full Code Here

TOP

Related Classes of uk.org.woodcraft.bookings.datamodel.Transaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.