[ 
http://mifosforge.jira.com/browse/MIFOS-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57191#action_57191
 ] 

Udai Gupta commented on MIFOS-2622:
-----------------------------------

After investigating in the code I found AccountPaymentEntity constructor has an 
argument called paymentDate which is responsible for payement_date in 
account_payment table. This argument is being passed as "transaction date" at 
some places and "current date" at others (total 14 places).

A) "transaction date" as payment date
1. org.mifos.accounts.loan.business.LoanBO#disburseLoan
2. org.mifos.accounts.loan.business.LoanBO#makePayment
3. 
org.mifos.application.servicefacade.SaveCollectionSheetAssembler#accountPaymentAssemblerFromDto
4. 
org.mifos.application.servicefacade.SaveCollectionSheetAssembler#buildModelForSavingsAccounts
5. 
org.mifos.application.servicefacade.SaveCollectionSheetAssembler#loanAccountAssemblerFromDto

B) "current date" as payment date
1. org.mifos.accounts.loan.business.LoanBO#makeEarlyRepayment
2. org.mifos.accounts.loan.business.LoanBO#reschedule
3. org.mifos.accounts.loan.business.LoanBO#writeOff
4. org.mifos.accounts.savings.business.SavingsBO#makePayment (can be changed to 
transaction date)
5. org.mifos.accounts.savings.business.SavingsBO#withdraw (can be changed to 
transaction date)
6. org.mifos.accounts.savings.struts.action.SavingsClosureAction#load
7. org.mifos.accounts.savings.struts.action.SavingsClosureAction#preview
8. 
org.mifos.accounts.savings.util.helpers.SavingsHelper#createAccountPayment(can 
be changed to transaction date)
9. org.mifos.customers.business.CustomerAccountBO#makePayment(can be changed to 
transaction date)

This explains why CollectionSheet is entering "transaction date" while Account 
detail page is not for savings.

I think that the right behavior is to have "transaction date" as payment date. 
Going to decide which way to move after discussion with Kay.

> Savings transactions set account_payment.payment_date to the date of the 
> entry into the database and not the transaction date
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MIFOS-2622
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2622
>             Project: mifos
>          Issue Type: Bug
>          Components: Savings Account
>    Affects Versions: Release 1.3.1
>            Reporter: Ryan Whitney
>            Assignee: Udai Gupta
>             Fix For: Gazelle C
>
>
> For all savings deposits and withdrawals, the account_payment.payment_date is 
> set to the date the record is created and not the actual date entered for the 
> transaction. (ie, not equal to account_trxn.action_date).  for other 
> transaction types, the payment date is equal to the account_trxn.action_date
> This query can help find examples in a sample database
> SELECT account_payment.account_id, 
>     account.global_account_num, 
>     account_trxn.account_trxn_id,
>     account_payment.payment_id,
>     account_payment.amount AS payment_amount, 
>     account_trxn.amount AS trxn_amount, 
>     account_payment.receipt_number, 
>     account_payment.payment_date, 
>     account_trxn.action_date,
>     account_trxn.created_date,
>     SUBSTR(lookup_value.LOOKUP_NAME,15) AS Acct_Action
> FROM account_trxn
> INNER JOIN account_payment ON account_trxn.payment_id = 
> account_payment.payment_id
> INNER JOIN account ON account_trxn.account_id = account.account_id
> INNER JOIN account_action ON account_action.account_action_id = 
> account_trxn.account_action_id
> INNER JOIN lookup_value ON lookup_value.lookup_id = account_action.lookup_id
> WHERE account_trxn.customer_id = <enter customer id>
> Also, John Woodlock discovered this works correctly when entering in 
> transactions with the collection sheet, but you can replicate the issue if 
> you are enter in the savings transaction through the account detail page. 
> (this was on Mifos 1.4).
> Not sure this affects Mifos functionality, but can affect reporting efforts.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to