Skip to content

Commit

Permalink
BAC-52/Feature: Add Daily Journal Posting Report (#301)
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Peter Oketayot <[email protected]>
  • Loading branch information
fiter-julius-oketayot and Julius Peter Oketayot authored Nov 27, 2023
1 parent 50de5cc commit 387b1f4
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.fineract.organisation.monetary.service.CurrencyReadPlatformService;
import org.apache.fineract.organisation.office.data.OfficeData;
import org.apache.fineract.organisation.office.data.OfficeTransactionData;
import org.apache.fineract.organisation.office.domain.OfficeHierarchyLevel;
import org.apache.fineract.organisation.office.exception.OfficeNotFoundException;
import org.apache.fineract.useradministration.domain.AppUser;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -273,17 +272,10 @@ public OfficeTransactionData retrieveNewOfficeTransactionDetails() {
@Override
public Collection<OfficeData> retrieveOfficesByHierarchyLevel(Long hierarchyLevel) {
final AppUser currentUser = this.context.authenticatedUser();

final String hierarchy = currentUser.getOffice().getHierarchy();
String hierarchySearchString = hierarchy + "%";

if (hierarchyLevel.compareTo(Long.valueOf(OfficeHierarchyLevel.GERENCIA.getValue())) == 0) {
hierarchySearchString = hierarchy;
}

final OfficeDropdownMapper rm = new OfficeDropdownMapper();
final String sql = "select " + rm.schema() + "where o.hierarchy like ? order by o.hierarchy";

return this.jdbcTemplate.query(sql, rm, new Object[] { hierarchySearchString }); //
}

Expand Down

0 comments on commit 387b1f4

Please sign in to comment.