try {
Map<String, Registration> registrations = (Map<String, Registration>) system.query(new GetRegistration());
for (Registration registration : registrations.values()) {
List<Parcel> parcels = registration.getParcels();
MergeSortAlgorithm sort = new MergeSortAlgorithm();
sort.sortParcelByDate(parcels);
for (Parcel parcel : parcels) {
final GDDate parcelDate = new GDDate(parcel.getDate());
if(!parcel.isPayed() && parcelDate.beforeOrEqualsDay(finalDate) && parcelDate.afterOrEqualsDay(initialDate) && parcelDate.beforeDay(today)){
Person person = (Person) system.query(new GetPerson(registration.getIdPerson()));