Exemplo n.º 1
0
    @Before
    public void setUpParentInvoices() throws Exception {
      inv1 = new Invoice();
      inv2 = new Invoice();

      inv1.setInvoiceNumber("000001");
      inv2.setInvoiceNumber("000002");

      chg1 = new Charge();
      chg2 = new Charge();

      chg1.setReference("ABC");
      chg2.setReference("DEF");
    }
Exemplo n.º 2
0
 public String validateChangeCharge(final Charge charge) {
   if (charge.equals(null)) {
     return "Charge can't be empty";
   }
   if (budgetItemRepository.findByBudgetAndCharge(budget, charge) != null) {
     return "There is already an item with this charge.";
   }
   return null;
 }