fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] fineract git commit: collection sheet
Date Fri, 09 Jun 2017 05:24:13 GMT
Repository: fineract
Updated Branches:
  refs/heads/develop cfd02e918 -> 5473e3713


collection sheet


Project: http://git-wip-us.apache.org/repos/asf/fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/fineract/commit/e5f1e909
Tree: http://git-wip-us.apache.org/repos/asf/fineract/tree/e5f1e909
Diff: http://git-wip-us.apache.org/repos/asf/fineract/diff/e5f1e909

Branch: refs/heads/develop
Commit: e5f1e9093df7b845ec1cce88796379725801d37e
Parents: 3f0d653
Author: nazeer1100126 <nazeer.shaik@confluxtechnologies.com>
Authored: Tue May 23 16:34:35 2017 +0530
Committer: nazeer1100126 <nazeer.shaik@confluxtechnologies.com>
Committed: Tue May 23 16:34:35 2017 +0530

----------------------------------------------------------------------
 .../service/CenterReadPlatformServiceImpl.java  | 24 --------------------
 1 file changed, 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/fineract/blob/e5f1e909/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
index f400843..34350c2 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
@@ -564,9 +564,6 @@ public class CenterReadPlatformServiceImpl implements CenterReadPlatformService
         LocalDate localDate = new LocalDate(meetingDate);
         final CenterCalendarDataMapper centerCalendarMapper = new CenterCalendarDataMapper();
         String passeddate = formatter.print(localDate);
-        if (!isCentersHavingMeetingFrequencyBasedOnOfficeIdAndMeetingDate(officeId, passeddate,
staffId)) { throw new GeneralPlatformDomainRuleException(
-                "error.msg.collection.sheet.can.not.be.selected.meeting.date.not.attached.to.any.center",
-                "Collection sheet can not be generated without meeting date " + passeddate
+ " attached to any center ", passeddate); }
         String sql = centerCalendarMapper.schema();
         Collection<CenterData> centerDataArray = null;
         if (staffId != null) {
@@ -617,27 +614,6 @@ public class CenterReadPlatformServiceImpl implements CenterReadPlatformService
         return staffCenterDataArray;
     }
 
-    @SuppressWarnings("deprecation")
-    private boolean isCentersHavingMeetingFrequencyBasedOnOfficeIdAndMeetingDate(final Long
officeId, final String passeddate,
-            final Long staffId) {
-        final StringBuilder sb = new StringBuilder(100);
-        sb.append("SELECT COUNT(*) ");
-        sb.append("FROM m_calendar c ");
-        sb.append("JOIN m_calendar_instance ci ON ci.calendar_id=c.id AND ci.entity_type_enum=4
");
-        sb.append("JOIN m_group ce ON ce.id = ci.entity_id ");
-        sb.append("JOIN m_group g ON g.parent_id = ce.id ");
-        sb.append("WHERE c.start_date = ? AND g.office_id= ? ");
-        int i = 0;
-        if (staffId != null) {
-            sb.append(" AND g.staff_id = ? ");
-            i = this.jdbcTemplate.queryForInt(sb.toString(), new Object[] { passeddate, officeId,
staffId });
-        } else {
-            i = this.jdbcTemplate.queryForInt(sb.toString(), new Object[] { passeddate, officeId
});
-        }
-        if (i > 0) { return true; }
-        return false;
-    }
-
     public void validateForGenerateCollectionSheet(final Long staffId) {
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
 


Mime
View raw message