Package org.internna.ossmoney.model

Examples of org.internna.ossmoney.model.Bill.persist()


      bill.setDescription(description);
      bill.setPayee(Payee.findPayee(payee));
      bill.setOwner(UserDetails.findCurrentUser());
      bill.setCurrency(new Locale(locale[0], locale[1], ""));
      bill.setCategory(Subcategory.findSubcategory(subcategory));
      bill.persist();
    }

    @RequestMapping("/pay/{id}")
    public String pay(@PathVariable Long id, ModelMap modelMap) {
      UserDetails user = UserDetails.findCurrentUser();
View Full Code Here


      bill.setLastTrigger(new Date());
      bill.setPayee(Payee.findMySelf(user));
      bill.setPeriod(RECURRING_INTERVAL.MONTHLY);
      bill.setCategory(Subcategory.findSubcategory(1L));
      bill.setDescription("a bill");
      bill.persist();
      Account account = Account.findAccount(3L);
      int transactions = account.getTransactions().size();
      accountService.payBill(user, bill, 3L, 101D, new Date());
      assertNotNull("Bill updated", bill.getLastPayment());
      assertTrue("Transaction created", (transactions + 1) == account.getTransactions().size());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.