use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class BillBean method getRectifiedBillCategory.
public List<SelectItem> getRectifiedBillCategory() {
ArrayList<SelectItem> ret = new ArrayList<>();
List<RectifiedBillCategory> refs = RectifiedBillCategoryManager.getDefault().getAllEntities(new SortCriteria("id"));
for (RectifiedBillCategory ref : refs) {
ret.add(new SelectItem(ref, ref.getCode() + " - " + ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class BillBean method getIVAType.
public List<SelectItem> getIVAType() {
ArrayList<SelectItem> ret = new ArrayList<>();
List<IVAType> refs = IVATypeManager.getDefault().getAllEntities(new SortCriteria("id"));
for (IVAType ref : refs) {
ret.add(new SelectItem(ref.getIva(), ref.getIva().toString() + " - " + ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class NOFBean method getAllNOFIssuedCreditTitle.
/**
* Recover a list of issued credit titles that has to be paid in the period
*/
public List<GenericNOF> getAllNOFIssuedCreditTitle() {
int years = ConfigurationUtil.getDefault().getYearsBackSearchNotPaidBillsNOF();
creditTitleSearch.setCreditTitleType(CreditTitleType.ISSUED);
creditTitleSearch.setCreditTitleState(CreditTitleState.EMITTED);
creditTitleSearch.setStartExpirationDate(calculateStartEndByPassedYear(years));
List<CreditTitle> creditTitles = creditTitleManager.getAllEntities(creditTitleSearch, new SortCriteria("issueDate", true), new GregorianCalendar(1900, 1, 1).getTime(), getEndDate());
return convertFromCreditTitleToGenericNOF(creditTitles);
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class NOFBean method getAllNOFReceivedBills.
public List<GenericNOF> getAllNOFReceivedBills() {
/**
** Facturas emitidas impagadas que vencen en el periodo ***
*/
/**
** Facturas emitidas impagadas ya vencidas ***
*/
/**
** Facturas recibidas impagadas que vencen en el periodo ***
*/
/**
** Facturas recibidas impagadas ya vencidas ***
*/
int years = ConfigurationUtil.getDefault().getYearsBackSearchNotPaidBillsNOF();
List<BillType> billTypes = new ArrayList<BillType>();
billTypes.add(BillType.RECIEVED);
billSearch.setBillTypes(billTypes);
billSearch.setState(BillState.EMITTED);
billSearch.setStartEndBillDate(calculateStartEndByPassedYear(years));
List<Bill> total = billManager.getAllEntities(billSearch, new SortCriteria("creationDate", true), new GregorianCalendar(1900, 1, 1).getTime(), getEndDate());
return convertFromBillToGenericNOF(total);
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class PeriodicalAccountEntryBean method getOrganizations.
/**
* Get the list of all organizations
* @return the list of all organizations
*/
public List<SelectItem> getOrganizations() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ret.add(new SelectItem(null, FacesUtils.formatMessage("organization.unknown")));
for (Organization ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
Aggregations