use of com.autentia.tnt.businessobject.OfferRole in project TNTConcept by autentia.
the class DuplicateOfferTest method insertOfferRoles.
/**
* Inserta costes imputables a personal en la ofertas
*/
private void insertOfferRoles() {
final Set<OfferRole> offerRoles = new LinkedHashSet<OfferRole>(2);
final OfferRole chapista = new OfferRole();
chapista.setCostPerHour(new BigDecimal(30));
chapista.setExpectedHours(10);
chapista.setIva(new BigDecimal(16));
chapista.setName("chapista");
chapista.setOffer(offer);
final OfferRole pintor = new OfferRole();
pintor.setCostPerHour(new BigDecimal(25));
pintor.setExpectedHours(30);
pintor.setIva(new BigDecimal(16));
pintor.setName("pintor");
pintor.setOffer(offer);
offerRoles.add(chapista);
offerRoles.add(pintor);
offer.setRoles(offerRoles);
}
use of com.autentia.tnt.businessobject.OfferRole in project TNTConcept by autentia.
the class FromOfferToBillTest method insertOfferRoles.
/**
* Inserta costes imputables a personal en la ofertas
*/
private void insertOfferRoles() {
final Set<OfferRole> offerRoles = new LinkedHashSet<OfferRole>(2);
final OfferRole chapista = new OfferRole();
chapista.setCostPerHour(new BigDecimal(30));
chapista.setExpectedHours(10);
chapista.setIva(new BigDecimal(16));
chapista.setName("chapista");
chapista.setOffer(offer);
final OfferRole pintor = new OfferRole();
pintor.setCostPerHour(new BigDecimal(25));
pintor.setExpectedHours(30);
pintor.setIva(new BigDecimal(16));
pintor.setName("pintor");
pintor.setOffer(offer);
offerRoles.add(chapista);
offerRoles.add(pintor);
offer.setRoles(offerRoles);
}
use of com.autentia.tnt.businessobject.OfferRole in project TNTConcept by autentia.
the class OfferBean method getRoless.
/**
* Get the list of all roless
*
* @return the list of all roless
*/
public List<SelectItem> getRoless() {
List<OfferRole> refs = OfferRoleManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (OfferRole ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.OfferRole in project TNTConcept by autentia.
the class OfferBeanTest method createRolesInFirstDayOf18Test.
@Test
public void createRolesInFirstDayOf18Test() {
OfferBean offerBean = new OfferBean();
offerBean.create();
final GregorianCalendar calendar = new GregorianCalendar(2010, 6, 1);
offerBean.setCreationDate(calendar.getTime());
offerBean.createRoles();
for (OfferRole offerRole : offerBean.getRoles()) {
assertEquals(IVA18, offerRole.getIva());
}
}
Aggregations