18 package org.turro.financials.model.register;
20 import java.util.Date;
21 import org.turro.financials.entity.Account;
22 import org.turro.financials.entity.Register;
23 import org.turro.financials.entity.RegisterEntry;
24 import org.turro.financials.entity.RegisterView;
25 import org.turro.math.Zero;
26 import org.turro.util.CompareUtil;
38 private double balance, accountBalance;
39 private boolean newRegister;
44 if(
register !=
null) {
46 register.getRegisterEntries().add(entry);
47 date =
register.getRegisterDate();
48 view =
register.getView();
54 if(this.entry ==
null) {
72 return accountBalance;
76 this.accountBalance = accountBalance;
84 this.balance = balance;
132 this.newRegister = newRegister;
152 return view !=
null &&
160 if(
register !=
null) {
175 return !newRegister &&
176 newEntry.
getDate().equals(date) &&
182 int result = CompareUtil.compare(order, o.order);
187 result = CompareUtil.compare(date, o.date);
190 result = CompareUtil.compare(view.
getId(), o.view.
getId());
205 result = CompareUtil.compare(entry.
getId(), o.entry.
getId());
void setAccount(Account account)
void setCredit(double credit)
void setRegister(Register register)
void setConcept(String concept)
void setDebit(double debit)
Set< RegisterEntry > getRegisterEntries()
void setAccount(Account account)
void setNewRegister(boolean newRegister)
void setBalance(double balance)
void setDebit(double debit)
double getAccountBalance()
void setView(RegisterView view)
boolean isSameRegister(MultiRegisterEntry newEntry)
int compareTo(MultiRegisterEntry o)
MultiRegisterEntry(RegisterEntry entry)
MultiRegisterEntry(Register register)
void setAccountBalance(double accountBalance)
void setEntry(RegisterEntry entry)
void setCredit(double credit)
void setConcept(String concept)
void checkValues(int cellIndex)
static boolean near(double value, int digits)