Skip to content

fix(inpatient-record): restore inpatient billable generation on version-16#1046

Open
md-umair-21 wants to merge 1 commit into
earthians:version-16-hotfixfrom
md-umair-21:generate-billables-hotfix
Open

fix(inpatient-record): restore inpatient billable generation on version-16#1046
md-umair-21 wants to merge 1 commit into
earthians:version-16-hotfixfrom
md-umair-21:generate-billables-hotfix

Conversation

@md-umair-21

Copy link
Copy Markdown
Contributor

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.

image

Fix applied:-
Updated healthcare/healthcare/doctype/inpatient_record/inpatient_record.py to:

  • restore currency in the ItemDetailsCtx used by add_service_unit_rent_to_billable_items()
  • restore safer admission behavior by using:
    inpatient_record.currency = currency or inpatient_record.currency

Result:-

  • Generate Billables should now correctly resolve item pricing/details
  • billable rows should populate again in the Inpatient Billables tab on version-16
  • behavior is aligned back with the working develop branch

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