use of com.autentia.tnt.businessobject.Project in project TNTConcept by autentia.
the class InteractionBean method getOpenprojects.
/**
* Get the list of all projects
* @return the list of all projects
*/
public List<SelectItem> getOpenprojects() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Project> refs = ProjectManager.getDefault().getOpenProjects(new SortCriteria("name"));
for (Project proy : refs) {
ret.add(new SelectItem(proy, proy.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Project in project TNTConcept by autentia.
the class CommissioningBean method getProjects.
/**
* Get the list of all projects
*
* @return the list of all projects
*/
public List<SelectItem> getProjects() {
List<Project> refs = ProjectManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Project ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Project in project TNTConcept by autentia.
the class BillManagerTest method getAllBitacoreBreakDownsHaveCorrectIvaFirstDayOf21IvaTest.
@Test
public void getAllBitacoreBreakDownsHaveCorrectIvaFirstDayOf21IvaTest() {
final Project project = insertProjectIntoContext(firstDateFor21Iva);
ProjectCost projectCost = createProjectCost(project);
final GregorianCalendar calendarEnd = new GregorianCalendar(2012, 10, 1);
final List<BillBreakDown> billBreakDownList = billManager.getAllBitacoreBreakDowns(firstDateFor21Iva, calendarEnd.getTime(), project);
assertEquals(IVA21, billBreakDownList.get(0).getIva());
assertEquals(IVA21, billBreakDownList.get(1).getIva());
deleteProjectCostFromContext(projectCost);
deleteProjectFromContext(project);
}
use of com.autentia.tnt.businessobject.Project in project TNTConcept by autentia.
the class BillManagerTest method getAllBitacoreBreakDownsHaveCorrectIvaForJune2009Test.
@Test
public void getAllBitacoreBreakDownsHaveCorrectIvaForJune2009Test() {
final Project project = insertProjectIntoContext(dateFor16Iva);
ProjectCost projectCost = createProjectCost(project);
final GregorianCalendar calendarEnd = new GregorianCalendar(2009, 10, 21);
final List<BillBreakDown> billBreakDownList = billManager.getAllBitacoreBreakDowns(dateFor16Iva, calendarEnd.getTime(), project);
assertEquals(IVA16, billBreakDownList.get(0).getIva());
assertEquals(IVA16, billBreakDownList.get(1).getIva());
deleteProjectCostFromContext(projectCost);
deleteProjectFromContext(project);
}
use of com.autentia.tnt.businessobject.Project in project TNTConcept by autentia.
the class BillManagerTest method getAllBitacoreBreakDownsHaveCorrectIvaFirstDayOf18IvaTest.
@Test
public void getAllBitacoreBreakDownsHaveCorrectIvaFirstDayOf18IvaTest() {
final Project project = insertProjectIntoContext(firstDateFor18Iva);
ProjectCost projectCost = createProjectCost(project);
final GregorianCalendar calendarEnd = new GregorianCalendar(2010, 10, 1);
final List<BillBreakDown> billBreakDownList = billManager.getAllBitacoreBreakDowns(firstDateFor18Iva, calendarEnd.getTime(), project);
assertEquals(IVA18, billBreakDownList.get(0).getIva());
assertEquals(IVA18, billBreakDownList.get(1).getIva());
deleteProjectCostFromContext(projectCost);
deleteProjectFromContext(project);
}
Aggregations