From ba6ff6e2270302c83416d74ec13a3513ef3cc892 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Wed, 2 Dec 2020 13:32:02 +0530 Subject: [PATCH] fix: conflict --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- erpnext/payroll/doctype/gratuity/test_gratuity.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 123db7ee9c..8d2907e0fb 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1036,7 +1036,7 @@ def get_total_amount_exchange_rate_base_on_currency(party_account_currency, comp def get_bill_no_and_update_amounts(reference_doctype, ref_doc, total_amount, exchange_rate, party_account_currency, company_currency): outstanding_amount, bill_no = None -if reference_doctype in ("Sales Invoice", "Purchase Invoice"): + if reference_doctype in ("Sales Invoice", "Purchase Invoice"): outstanding_amount = ref_doc.get("outstanding_amount") bill_no = ref_doc.get("bill_no") elif reference_doctype == "Expense Claim": diff --git a/erpnext/payroll/doctype/gratuity/test_gratuity.py b/erpnext/payroll/doctype/gratuity/test_gratuity.py index 571eef4a6c..f32e0eb74e 100644 --- a/erpnext/payroll/doctype/gratuity/test_gratuity.py +++ b/erpnext/payroll/doctype/gratuity/test_gratuity.py @@ -137,8 +137,7 @@ def get_gratuity_rule(name): rule = frappe.db.exists("Gratuity Rule", name) if not rule: create_gratuity_rule() - else: - rule = frappe.get_doc("Gratuity Rule", name) + rule = frappe.get_doc("Gratuity Rule", name) rule.applicable_earnings_component = [] rule.append("applicable_earnings_component", { "salary_component": "Basic Salary"