diff --git a/jey_erp/custom/payroll_entry.py b/jey_erp/custom/payroll_entry.py index 8acd25e..804f0db 100644 --- a/jey_erp/custom/payroll_entry.py +++ b/jey_erp/custom/payroll_entry.py @@ -1,7 +1,6 @@ import frappe from frappe.utils import flt -import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions from hrms.payroll.doctype.payroll_entry.payroll_entry import PayrollEntry @@ -27,15 +26,6 @@ class CustomPayrollEntry(PayrollEntry): return super().make_bank_entry(for_withheld_salaries) - def make_journal_entry(self, accounts, currencies, voucher_type="Journal Entry", **kwargs): - je = super().make_journal_entry(accounts, currencies, voucher_type=voucher_type, **kwargs) - if voucher_type == "Bank Entry": - custom_title = "Əmək həqqi və tutulmaların hesablanması" - frappe.db.set_value("Journal Entry", je.name, {"title": custom_title, "pay_to_recd_from": custom_title}, update_modified=False) - je.title = custom_title - je.pay_to_recd_from = custom_title - return je - def set_accounting_entries_for_bank_entry( self, je_payment_amount, user_remark, employee_wise_accounting_enabled ): @@ -48,7 +38,7 @@ class CustomPayrollEntry(PayrollEntry): return bank_entry precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") - company_currency = erpnext.get_company_currency(self.company) + company_currency = frappe.db.get_value("Company", self.company, "default_currency") accounting_dimensions = get_accounting_dimensions() or [] currencies = [row.account_currency for row in bank_entry.accounts if row.get("account_currency")]