You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/11/13 14:41:09 UTC

[GitHub] [fineract] rrpawar96 opened a new pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

rrpawar96 opened a new pull request #1969:
URL: https://github.com/apache/fineract/pull/1969


   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [ ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
   
   - [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
   
   - [ ] Create/update unit or integration tests for verifying the changes made.
   
   - [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes
   
   - [ ] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)
   
   FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 commented on a change in pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on a change in pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#discussion_r748731070



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
##########
@@ -1076,16 +1076,19 @@ private void payWithdrawalFee(final BigDecimal transactionAmount, final LocalDat
         for (SavingsAccountCharge charge : this.charges()) {
 
             if (charge.isWithdrawalFee() && charge.isActive()) {
-                if (charge.getFreeWithdrawalCount() == null) {
-                    charge.setFreeWithdrawalCount(0);
-                }
 
-                if (charge.isEnableFreeWithdrawal()) {
-                    resetFreeChargeDaysCount(charge, transactionAmount, transactionDate, user);
+                if (paymentDetail.getPaymentType().getPaymentName().equals(charge.getCharge().getPaymentType().getPaymentName())) {

Review comment:
       condition 1: if the charge has both condition of specific paymentType and discountType (FINERACT-1374)
   condition 2 : charge is assigned to specific payment type but normal charge(no discount Type)
   condition 3:  discount charge but no condition of paymentType.
   condition 4 : normal withdraw charges 




-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] ptuomola merged pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
ptuomola merged pull request #1969:
URL: https://github.com/apache/fineract/pull/1969


   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 commented on a change in pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on a change in pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#discussion_r748691035



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
##########
@@ -1076,16 +1076,19 @@ private void payWithdrawalFee(final BigDecimal transactionAmount, final LocalDat
         for (SavingsAccountCharge charge : this.charges()) {
 
             if (charge.isWithdrawalFee() && charge.isActive()) {
-                if (charge.getFreeWithdrawalCount() == null) {
-                    charge.setFreeWithdrawalCount(0);
-                }
 
-                if (charge.isEnableFreeWithdrawal()) {
-                    resetFreeChargeDaysCount(charge, transactionAmount, transactionDate, user);
+                if (paymentDetail.getPaymentType().getPaymentName().equals(charge.getCharge().getPaymentType().getPaymentName())) {

Review comment:
       The logic of this PR is to allow withdrawal transactions by checking whether the payment type assigned to the charge is equal to the payment Type of the withdrawal transaction.




-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 closed pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 closed pull request #1969:
URL: https://github.com/apache/fineract/pull/1969


   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] awasum commented on pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
awasum commented on pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#issuecomment-970445787


   This looks good.. Is there a way you could add a unit test to test the new paymentName parameter?


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 commented on pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#issuecomment-971433065


   > This looks good.. Is there a way you could add a unit test to test the new paymentName parameter?
   
   Yes, I will write a unit test for 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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 commented on pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#issuecomment-974289474


   @awasum @ptuomola  I have added a testcase for paymentType


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] rrpawar96 closed pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
rrpawar96 closed pull request #1969:
URL: https://github.com/apache/fineract/pull/1969


   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [fineract] francisguchie commented on pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

Posted by GitBox <gi...@apache.org>.
francisguchie commented on pull request #1969:
URL: https://github.com/apache/fineract/pull/1969#issuecomment-970209113


   @rrpawar96  I have tested this functionality and it works for me. Tried to put it in "live" production


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org