rymghosn opened a new pull request, #6253:
URL: https://github.com/apache/fineract/pull/6253

     When creating a charge with chargeAppliesTo = Client and selecting an item 
from the "Income from Charge" (GL income account) list, editing that  
     charge afterwards showed the previously selected income account as 
missing, and reopening the dropdown showed fewer available options than       
     before.                                                                    
                                                                      
                                                                                
                                                                      
     Root cause: ChargeWritePlatformServiceJpaRepositoryImpl#updateCharge 
persisted the updated charge with a plain chargeRepository.save(). This     
     defers the actual flush to Hibernate's own timing, so when the same 
request cycle immediately re-read the charge to build the response (or to    
     populate the edit-mode dropdown), it could still see the pre-update state 
— making the income account selection look reverted or absent.         
                                                                                
                                                                      
     Fix:                                                                       
                                                                      
     - updateCharge now calls chargeRepository.saveAndFlush() instead of 
save(), so the change is flushed before the charge is re-read.               
     - Added the missing incomeAccountId field to ChargeRequest so the API 
request DTO accurately reflects the incomeAccountId parameter the service  
     already accepts (ChargesApiConstants.glAccountIdParamName).
     PR:(https://issues.apache.org/jira/browse/FINERACT-2752)


-- 
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