Package org.internna.ossmoney.model

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


    @RequestMapping("/pay/{id}")
    public String pay(@PathVariable Long id, ModelMap modelMap) {
      UserDetails user = UserDetails.findCurrentUser();
      Bill bill = Bill.findBill(id);
      if (bill.belongsTo(user)) {
        modelMap.addAttribute("bill", bill);
        modelMap.addAttribute("origin", user.getBankAccounts(bill.getCurrency()));
        modelMap.addAttribute("currency", Currency.getInstance(bill.getCurrency()).getCurrencyCode());
      }
      return "bills/pay";
View Full Code Here


    @RequestMapping(value = "/pay", method = RequestMethod.POST)
    public String pay(Long id, Long origin, Double amount, Date operationDate, ModelMap modelMap) {
      UserDetails user = UserDetails.findCurrentUser();
      Bill bill = Bill.findBill(id);
      if (bill.belongsTo(user)) {
        accountService.payBill(user, bill, origin, amount, operationDate);
      }
      return dashboard.index(modelMap);
    }
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.