18 package org.turro.financials.model.asset;
20 import java.util.Collection;
21 import java.util.Date;
22 import java.util.Iterator;
24 import org.turro.financials.db.FinancialsPU;
25 import org.turro.financials.entity.*;
26 import org.turro.financials.model.document.DocumentWrapper;
27 import org.turro.jpa.Dao;
28 import org.turro.jpa.entity.XMLSerializer;
29 import org.turro.log.SystemLogType;
30 import org.turro.log.SystemLogger;
48 if(!(it.next().isValid())) {
63 public boolean delete() {
90 investment += dl.getTaxable();
98 depreciated += re.getDebit();
109 dm.put(fad.getDepreciationDate(), de);
112 double toDepreciate = 0.0;
117 toDepreciate += dm.
getToDepreciate(dl.getTaxable(), dl.getDocument().getReceiptDate(), date);
121 Date regDate = re.getRegister().getRegisterDate();
122 if(regDate.before(date) || regDate.equals(date)) {
123 depreciated += re.getDebit();
126 return toDepreciate - depreciated;
131 return dao.getResultList(
132 "select re from RegisterEntry as re " +
134 "order by re.account, re.register.registerDate");
139 return dao.find(
LineType.class, 4L);
149 return dao.getResultList(
"select fa from FixedAsset as fa where unsubscribed = FALSE order by fa.name");
static String getObjectPath(Object object)
void setDocumentLines(Set< DocumentLine > documentLines)
Set< FixedAssetDepreciation > getDepreciations()
Set< DocumentLine > getDocumentLines()
ContractPreference getInvestmentPreference()
void setPercent(double percent)
double getToDepreciate(double investment, Date initialDate, Date finalDate)
static DocumentDefinition getInvestmentProviderModel()
double getToDepreciate(Date date)
static LineType getBuyLineType()
FixedAssetWrapper(FixedAsset asset)
void keepRelations(Set< DocumentLine > docLines)
static Collection< FixedAsset > getAssets()
Collection< RegisterEntry > getEntries()
void deleteObject(Object obj)
static ISystemLogger getInstance()
void doLog(SystemLogType type, Object entity, String comment, Serializable data)