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

   Tax group updates could never actually carry a start date change through to  
                                                                    
     an existing component mapping, and a JSON-key bug made updates fail        
                                                                      
     unnecessarily:                                                             
                                                                      
                                                                                
                                                                      
     - validateForTaxGroupUpdate extracted a submitted mapping's id using the   
                                                                      
       taxComponentId JSON key instead of id. Since taxComponentId is           
                                                                      
       immutable and normally omitted on update, this misclassified a           
                                                                      
       legitimate "update existing mapping" request as "add a new component"    
                                                                      
       and wrongly demanded a taxComponentId.                                   
                                                                      
     - TaxAssembler/TaxGroupMappings/TaxGroup always discarded any              
                                                                      
       submitted startDate on update — only endDate was ever applied, even      
                                                                      
       though startDate was already an accepted request parameter.              
                                                                      
     - Adding a brand-new tax component to an existing group via update never   
                                                                      
       set the new mapping's taxGroup relationship, which would violate the     
                                                                      
       tax_group_id NOT NULL constraint on insert.
         This PR:                                                               
                                                                          
                                                                                
                                                                      
     - Fixes the JSON-key bug.                                                  
                                                                      
     - Lets an existing component's start date be edited, but only while it     
                                                                      
       hasn't taken effect yet (i.e. its current start date is still in the     
                                                                      
       future) — once a start date is on or before today it's locked, and only  
                                                                      
       the end date remains editable.                                           
                                                                      
     - Fixes the missing taxGroup FK assignment for newly-added components.     
                                                                      
     - Exposes groupEditable (on GET /taxes/group/{id}?template=true) and       
                                                                      
       per-component componentEditable so clients can tell which fields are     
                                                                      
       still open for editing: a group linked to charge products is only        
                                                                      
       editable if at least one of its components hasn't taken effect yet.
       PR:(https://issues.apache.org/jira/browse/FINERACT-2769)


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