diff --git a/.mergify.yml b/.mergify.yml index c8831174..8887d367 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,4 +1,16 @@ pull_request_rules: + - name: Auto-close PRs on stable branch + conditions: + - author!=aakvatech + - author!=av-dev2 + - author!=mergify[bot] + - base=version-14 + actions: + close: + comment: + message: | + @{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch. + - name: Assign author to review conflict and add label of 'conflict' conditions: - conflict @@ -12,9 +24,32 @@ pull_request_rules: - "{{author}}" comment: message: "@{{author}} this pull request is now in conflict 😩" - - - name: Automatic merge after review to version-14-hotfix + - name: Automatic merge pull request to develop + conditions: + - and: + - and: + - base = develop + - label != conflict + - or: + - author = aakvatech + - author = av-dev2 + actions: + merge: + method: merge + + - name: backport to version-14-hotfix + conditions: + - label = version-14-hotfix + actions: + backport: + branches: + - version-14-hotfix + assignees: + - aakvatech + - "{{author}}" + + - name: Automatic merge after review to version-14-hotfix conditions: - base = version-14-hotfix - label != conflict diff --git a/hms_tz/nhif/doctype/nhif_patient_claim/nhif_patient_claim.py b/hms_tz/nhif/doctype/nhif_patient_claim/nhif_patient_claim.py index d993b94d..22d9d52e 100644 --- a/hms_tz/nhif/doctype/nhif_patient_claim/nhif_patient_claim.py +++ b/hms_tz/nhif/doctype/nhif_patient_claim/nhif_patient_claim.py @@ -584,7 +584,6 @@ def set_patient_claim_item(self, inpatient_record=None, called_method=None): for row in encounter_doc.get(child.get("table")): if row.prescribe or row.is_cancelled: continue - item_code = frappe.get_value( child.get("doctype"), row.get(child.get("item")), @@ -597,9 +596,10 @@ def set_patient_claim_item(self, inpatient_record=None, called_method=None): row.get("quantity_returned") or 0 ) elif row.get("doctype") == "Therapy Plan Detail": - delivered_quantity = ( - row.get("no_of_sessions") or 0 - ) - (row.get("sessions_cancelled") or 0) + + delivered_quantity = (row.get("no_of_sessions") or 0) - ( + row.get("sessions_cancelled") or 0 + ) else: delivered_quantity = 1