mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
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:
@@ -56,7 +56,11 @@ class AccountingDimension(Document):
|
|||||||
if frappe.flags.in_test:
|
if frappe.flags.in_test:
|
||||||
delete_accounting_dimension(doc=self)
|
delete_accounting_dimension(doc=self)
|
||||||
else:
|
else:
|
||||||
|
<<<<<<< HEAD
|
||||||
frappe.enqueue(delete_accounting_dimension, doc=self, queue="long")
|
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):
|
def set_fieldname_and_label(self):
|
||||||
if not self.label:
|
if not self.label:
|
||||||
|
|||||||
@@ -1839,10 +1839,14 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
def get_amounts_based_on_reference_doctype(
|
def get_amounts_based_on_reference_doctype(
|
||||||
reference_doctype, ref_doc, party_account_currency, company_currency, reference_name
|
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
|
total_amount = outstanding_amount = exchange_rate = None
|
||||||
if reference_doctype == "Fees":
|
if reference_doctype == "Fees":
|
||||||
total_amount = ref_doc.get("grand_total")
|
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
|
return total_amount, outstanding_amount, exchange_rate
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
def get_amounts_based_on_ref_doc(
|
def get_amounts_based_on_ref_doc(
|
||||||
reference_doctype, ref_doc, party_account_currency, company_currency
|
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
|
total_amount = outstanding_amount = exchange_rate = None
|
||||||
if ref_doc.doctype == "Expense Claim":
|
if ref_doc.doctype == "Expense Claim":
|
||||||
total_amount = flt(ref_doc.total_sanctioned_amount) + flt(ref_doc.total_taxes_and_charges)
|
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
|
return total_amount, exchange_rate
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
def get_bill_no_and_update_amounts(
|
def get_bill_no_and_update_amounts(
|
||||||
reference_doctype, ref_doc, total_amount, exchange_rate, party_account_currency, company_currency
|
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
|
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")
|
outstanding_amount = ref_doc.get("outstanding_amount")
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class GratuityRule(Document):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
for current_slab in self.gratuity_rule_slabs:
|
for current_slab in self.gratuity_rule_slabs:
|
||||||
if (current_slab.from_year > current_slab.to_year) and current_slab.to_year != 0:
|
if (current_slab.from_year > current_slab.to_year) and current_slab.to_year != 0:
|
||||||
|
<<<<<<< HEAD
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx)
|
_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx)
|
||||||
)
|
)
|
||||||
@@ -21,6 +22,9 @@ class GratuityRule(Document):
|
|||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("You can not define multiple slabs if you have a slab with no lower and upper limits.")
|
_("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):
|
def get_gratuity_rule(name, slabs, **args):
|
||||||
|
|||||||
Reference in New Issue
Block a user