fix: minor linting issues (#27314)

* fix: syntax error in gratuity

* fix: unpacking None into three variables

* fix: unexpected kwarg for delete_accounting_dimensions

(cherry picked from commit eec40513be)

# Conflicts:
#	erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
#	erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py
This commit is contained in:
Ankush Menat
2021-09-02 17:42:45 +05:30
committed by Mergify
parent f5160dc83d
commit b95d61b39d
3 changed files with 20 additions and 0 deletions

View File

@@ -56,7 +56,11 @@ class AccountingDimension(Document):
if frappe.flags.in_test:
delete_accounting_dimension(doc=self)
else:
<<<<<<< HEAD
frappe.enqueue(delete_accounting_dimension, doc=self, queue="long")
=======
frappe.enqueue(delete_accounting_dimension, doc=self, queue='long')
>>>>>>> eec40513be (fix: minor linting issues (#27314))
def set_fieldname_and_label(self):
if not self.label:

View File

@@ -1839,10 +1839,14 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
}
)
<<<<<<< HEAD
def get_amounts_based_on_reference_doctype(
reference_doctype, ref_doc, party_account_currency, company_currency, reference_name
):
=======
def get_amounts_based_on_reference_doctype(reference_doctype, ref_doc, party_account_currency, company_currency, reference_name):
>>>>>>> eec40513be (fix: minor linting issues (#27314))
total_amount = outstanding_amount = exchange_rate = None
if reference_doctype == "Fees":
total_amount = ref_doc.get("grand_total")
@@ -1864,10 +1868,14 @@ def get_amounts_based_on_reference_doctype(
return total_amount, outstanding_amount, exchange_rate
<<<<<<< HEAD
def get_amounts_based_on_ref_doc(
reference_doctype, ref_doc, party_account_currency, company_currency
):
=======
def get_amounts_based_on_ref_doc(reference_doctype, ref_doc, party_account_currency, company_currency):
>>>>>>> eec40513be (fix: minor linting issues (#27314))
total_amount = outstanding_amount = exchange_rate = None
if ref_doc.doctype == "Expense Claim":
total_amount = flt(ref_doc.total_sanctioned_amount) + flt(ref_doc.total_taxes_and_charges)
@@ -1916,10 +1924,14 @@ def get_total_amount_exchange_rate_base_on_currency(
return total_amount, exchange_rate
<<<<<<< HEAD
def get_bill_no_and_update_amounts(
reference_doctype, ref_doc, total_amount, exchange_rate, party_account_currency, company_currency
):
=======
def get_bill_no_and_update_amounts(reference_doctype, ref_doc, total_amount, exchange_rate, party_account_currency, company_currency):
>>>>>>> eec40513be (fix: minor linting issues (#27314))
outstanding_amount = bill_no = None
if reference_doctype in ("Sales Invoice", "Purchase Invoice"):
outstanding_amount = ref_doc.get("outstanding_amount")

View File

@@ -11,6 +11,7 @@ class GratuityRule(Document):
def validate(self):
for current_slab in self.gratuity_rule_slabs:
if (current_slab.from_year > current_slab.to_year) and current_slab.to_year != 0:
<<<<<<< HEAD
frappe.throw(
_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx)
)
@@ -21,6 +22,9 @@ class GratuityRule(Document):
frappe.throw(
_("You can not define multiple slabs if you have a slab with no lower and upper limits.")
)
=======
frappe.throw(_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx))
>>>>>>> eec40513be (fix: minor linting issues (#27314))
def get_gratuity_rule(name, slabs, **args):