budaidev commented on code in PR #5612:
URL: https://github.com/apache/fineract/pull/5612#discussion_r2919298727


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyBucketParseAndValidator.java:
##########
@@ -70,7 +75,42 @@ private DelinquencyBucketData validateAndParseUpdate(final 
DataValidatorBuilder
                 
ranges.add(DelinquencyRangeData.reference(Long.parseLong(rangeId)));
             }
         }
-        return dataValidator.hasError() ? null : new 
DelinquencyBucketData(null, name, ranges);
+
+        final Long bucketTypeParam = 
jsonHelper.extractLongNamed(DelinquencyApiConstants.BUCKET_TYPE_PARAM_NAME, 
element);
+        
dataValidator.reset().parameter(DelinquencyApiConstants.BUCKET_TYPE_PARAM_NAME).value(rangeIds)

Review Comment:
   isn't this bucketTypeParam instead of rangeIds?



##########
fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/BucketTypeConverter.java:
##########
@@ -17,15 +17,20 @@
  * under the License.
  */
 
-package org.apache.fineract.infrastructure.jobs.filter;
+package org.apache.fineract.portfolio.delinquency.domain;
 
-import org.apache.fineract.cob.conditions.LoanCOBEnabledCondition;
-import org.springframework.context.annotation.Conditional;
+import jakarta.persistence.AttributeConverter;
+import jakarta.persistence.Converter;
 
-@Conditional(LoanCOBEnabledCondition.class)
-public class WorkingCapitalLoanCOBApiFilter extends COBApiFilter {
+@Converter(autoApply = true)
+public class BucketTypeConverter  implements AttributeConverter<BucketType, 
Long> {
+    @Override
+    public Long convertToDatabaseColumn(BucketType minimumPayment) {

Review Comment:
   lets use bucketType variable name for consistency



##########
fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/MinimumPayment.java:
##########
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**

Review Comment:
   duplicated license on the top (had the same issue before with spotless for 
some reason)



##########
fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRule.java:
##########
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.fineract.portfolio.delinquency.domain;
+
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Enumerated;
+import jakarta.persistence.FetchType;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToOne;
+import jakarta.persistence.Table;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import 
org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom;
+import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType;
+
+import java.io.Serial;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@Entity
+@Table(name = "m_delinquency_payment_rule")
+public class DelinquencyMinimumPaymentPeriodAndRule extends 
AbstractAuditableWithUTCDateTimeCustom<Long> {

Review Comment:
   I see we store the following values: frequency, frequency type, minimum 
payment type
   My question: where do we store the actual value of minimum payment? Like the 
amount and not the type of it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to