Search in sources :

Example 1 with BillType

use of com.autentia.tnt.businessobject.BillType 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);
}
Also used : BillType(com.autentia.tnt.businessobject.BillType) SortCriteria(com.autentia.tnt.dao.SortCriteria) ArrayList(java.util.ArrayList) Bill(com.autentia.tnt.businessobject.Bill) GregorianCalendar(java.util.GregorianCalendar)

Example 2 with BillType

use of com.autentia.tnt.businessobject.BillType in project TNTConcept by autentia.

the class NOFBean method getAllNOFIssuedBills.

public List<GenericNOF> getAllNOFIssuedBills() {
    /**
     ** 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.ISSUED);
    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);
}
Also used : BillType(com.autentia.tnt.businessobject.BillType) SortCriteria(com.autentia.tnt.dao.SortCriteria) ArrayList(java.util.ArrayList) Bill(com.autentia.tnt.businessobject.Bill) GregorianCalendar(java.util.GregorianCalendar)

Aggregations

Bill (com.autentia.tnt.businessobject.Bill)2 BillType (com.autentia.tnt.businessobject.BillType)2 SortCriteria (com.autentia.tnt.dao.SortCriteria)2 ArrayList (java.util.ArrayList)2 GregorianCalendar (java.util.GregorianCalendar)2