fix(inpatient-record): restore inpatient billable generation on version-16#1046
Open
md-umair-21 wants to merge 1 commit into
Open
fix(inpatient-record): restore inpatient billable generation on version-16#1046md-umair-21 wants to merge 1 commit into
md-umair-21 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:-
In version-16, the Generate Billables action in Patient/Inpatient Record was not populating the billable items table under the Inpatient Billables tab, even though the same flow was working in develop.
The UI button and tab were already present, so the problem was in the backend billing flow.
Root cause:-
While comparing develop and version-16, the regression was found in Inpatient Record billable generation:
version-16 was missing the currency key in the ItemDetailsCtx passed to get_item_details() during inpatient billable generation.
version-16 also set inpatient_record.currency = currency during admission, which could overwrite/clear the existing document currency unnecessarily.
Because of this, item detail resolution for generated billables could fail on v16, causing the button to appear non-working and the billables table to remain empty.
Fix applied:-
Updated healthcare/healthcare/doctype/inpatient_record/inpatient_record.py to:
inpatient_record.currency = currency or inpatient_record.currency
Result:-