revert all JE title changes, keep only deductions logic
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
378ccd33ee
commit
0eaa407c1d
|
|
@ -1,7 +1,6 @@
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
|
||||||
import erpnext
|
|
||||||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
|
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
|
||||||
|
|
||||||
from hrms.payroll.doctype.payroll_entry.payroll_entry import PayrollEntry
|
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)
|
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(
|
def set_accounting_entries_for_bank_entry(
|
||||||
self, je_payment_amount, user_remark, employee_wise_accounting_enabled
|
self, je_payment_amount, user_remark, employee_wise_accounting_enabled
|
||||||
):
|
):
|
||||||
|
|
@ -48,7 +38,7 @@ class CustomPayrollEntry(PayrollEntry):
|
||||||
return bank_entry
|
return bank_entry
|
||||||
|
|
||||||
precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency")
|
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 []
|
accounting_dimensions = get_accounting_dimensions() or []
|
||||||
currencies = [row.account_currency for row in bank_entry.accounts if row.get("account_currency")]
|
currencies = [row.account_currency for row in bank_entry.accounts if row.get("account_currency")]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue