mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: linter issues
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc('payroll', 'doctype', 'employee_cost_center')
|
frappe.reload_doc('payroll', 'doctype', 'employee_cost_center')
|
||||||
frappe.reload_doc('payroll', 'doctype', 'salary_structure_assignment')
|
frappe.reload_doc('payroll', 'doctype', 'salary_structure_assignment')
|
||||||
|
|||||||
@@ -4,5 +4,6 @@
|
|||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
|
||||||
class EmployeeCostCenter(Document):
|
class EmployeeCostCenter(Document):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import getdate, flt
|
from frappe.utils import flt, getdate
|
||||||
|
|
||||||
|
|
||||||
class DuplicateAssignment(frappe.ValidationError): pass
|
class DuplicateAssignment(frappe.ValidationError): pass
|
||||||
@@ -79,7 +79,6 @@ class SalaryStructureAssignment(Document):
|
|||||||
frappe.throw(_("Total percentage against cost centers should be 100"))
|
frappe.throw(_("Total percentage against cost centers should be 100"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_assigned_salary_structure(employee, on_date):
|
def get_assigned_salary_structure(employee, on_date):
|
||||||
if not employee or not on_date:
|
if not employee or not on_date:
|
||||||
return None
|
return None
|
||||||
@@ -93,6 +92,7 @@ def get_assigned_salary_structure(employee, on_date):
|
|||||||
})
|
})
|
||||||
return salary_structure[0][0] if salary_structure else None
|
return salary_structure[0][0] if salary_structure else None
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_employee_currency(employee):
|
def get_employee_currency(employee):
|
||||||
employee_currency = frappe.db.get_value('Salary Structure Assignment', {'employee': employee}, 'currency')
|
employee_currency = frappe.db.get_value('Salary Structure Assignment', {'employee': employee}, 'currency')
|
||||||
|
|||||||
Reference in New Issue
Block a user