Skip to content

Commit

Permalink
Merge pull request #304 from fiterlatam/Bug/FBR-44
Browse files Browse the repository at this point in the history
BAC-52/Feature: Add Daily Journal Posting Report
  • Loading branch information
BrianMuhimbura authored Nov 28, 2023
2 parents cb09d7b + 680e0b0 commit 4a92047
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 4a92047

Please sign in to comment.