Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for creating fees shedule with fee structure without amount variation #320

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kponsakthivel
Copy link

@kponsakthivel kponsakthivel commented Mar 6, 2025

This PR fixes an issue in the make_fee_schedule function where per_component_amount was not always properly formatted as a dictionary. The function now correctly handles cases where:
Fee_structure.py
per_component_amount is received as a JSON string.
per_component_amount is a list instead of a dictionary.
Changes Made
Ensured per_component_amount is converted to a dictionary if it is received as a JSON string or a list.
Added a missing field map for Fee Component during get_mapped_doc.
Ensured discount has a default value of 0 if not provided.
Corrected the calculation for amount using total and discount.
Impact
Fixes potential errors when per_component_amount is not formatted correctly.
Ensures accurate fee distribution based on the selected fee plan.
Improves data consistency when mapping fee components to the Fee Schedule.
Testing
Tested with different formats of per_component_amount (JSON string, list, dictionary).
Verified that the Fee Schedule is generated correctly for different fee plans.
Ensured no errors occur when processing discounts.
.

Fee_schedule.py

Refrence image:
Fee_structure:
Screenshot from 2025-03-06 20-30-51

Fee_schedule
Screenshot from 2025-03-06 20-30-19

In this the amount takes correctly what in fee_structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant