Skip to content

Commit

Permalink
Merge pull request #1796 from frappe/version-15-hotfix
Browse files Browse the repository at this point in the history
chore: release v15
  • Loading branch information
ruchamahabal authored May 22, 2024
2 parents 204d04d + cef40bd commit 603a1ad
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
steps:
- name: Update notes
run: |
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' )
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/generate-notes -f tag_name=$RELEASE_TAG \
| jq -r '.body' \
| sed -E '/^\* (chore|ci|test|docs|style)/d' \
| sed -E 's/by @mergify //'
)
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/tags/$RELEASE_TAG | jq -r '.id')
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/$RELEASE_ID -f body="$NEW_NOTES"
Expand Down
2 changes: 1 addition & 1 deletion hrms/hr/doctype/interview_feedback/interview_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def calculate_average_rating(self):
total_rating = 0
for d in self.skill_assessment:
if d.rating:
total_rating += d.rating
total_rating += flt(d.rating)

self.average_rating = flt(
total_rating / len(self.skill_assessment) if len(self.skill_assessment) else 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_average_ratings_on_feedback_submission_and_cancellation(self):
total_rating = 0
for d in feedback_1.skill_assessment:
if d.rating:
total_rating += d.rating
total_rating += flt(d.rating)

avg_rating = flt(
total_rating / len(feedback_1.skill_assessment) if len(feedback_1.skill_assessment) else 0
Expand Down
14 changes: 11 additions & 3 deletions hrms/overrides/employee_payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ def set_missing_ref_details(
continue

ref_details = get_payment_reference_details(
d.reference_doctype, d.reference_name, self.party_account_currency
d.reference_doctype,
d.reference_name,
self.party_account_currency,
self.party_type,
self.party,
)

# Only update exchange rate when the reference is Journal Entry
Expand Down Expand Up @@ -201,11 +205,15 @@ def get_paid_amount_and_received_amount(


@frappe.whitelist()
def get_payment_reference_details(reference_doctype, reference_name, party_account_currency):
def get_payment_reference_details(
reference_doctype, reference_name, party_account_currency, party_type=None, party=None
):
if reference_doctype in ("Expense Claim", "Employee Advance", "Gratuity"):
return get_reference_details_for_employee(reference_doctype, reference_name, party_account_currency)
else:
return get_reference_details(reference_doctype, reference_name, party_account_currency)
return get_reference_details(
reference_doctype, reference_name, party_account_currency, party_type, party
)


@frappe.whitelist()
Expand Down

0 comments on commit 603a1ad

Please sign in to comment.