mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
Merge branch 'version-13-hotfix' into mergify/bp/version-13-hotfix/pr-33144
This commit is contained in:
@@ -346,6 +346,8 @@ class PayrollEntry(Document):
|
|||||||
"credit_in_account_currency": flt(payable_amt, precision),
|
"credit_in_account_currency": flt(payable_amt, precision),
|
||||||
"exchange_rate": flt(exchange_rate),
|
"exchange_rate": flt(exchange_rate),
|
||||||
"cost_center": self.cost_center,
|
"cost_center": self.cost_center,
|
||||||
|
"reference_type": self.doctype,
|
||||||
|
"reference_name": self.name,
|
||||||
},
|
},
|
||||||
accounting_dimensions,
|
accounting_dimensions,
|
||||||
)
|
)
|
||||||
@@ -720,12 +722,21 @@ def get_month_details(year, month):
|
|||||||
|
|
||||||
def get_payroll_entry_bank_entries(payroll_entry_name):
|
def get_payroll_entry_bank_entries(payroll_entry_name):
|
||||||
journal_entries = frappe.db.sql(
|
journal_entries = frappe.db.sql(
|
||||||
"select name from `tabJournal Entry Account` "
|
"""
|
||||||
'where reference_type="Payroll Entry" '
|
select
|
||||||
"and reference_name=%s and docstatus=1",
|
je.name
|
||||||
|
from
|
||||||
|
`tabJournal Entry` je,
|
||||||
|
`tabJournal Entry Account` jea
|
||||||
|
where
|
||||||
|
je.name = jea.parent
|
||||||
|
and je.voucher_type = 'Bank Entry'
|
||||||
|
and jea.reference_type = 'Payroll Entry'
|
||||||
|
and jea.reference_name = %s
|
||||||
|
""",
|
||||||
payroll_entry_name,
|
payroll_entry_name,
|
||||||
as_dict=1,
|
as_dict=True,
|
||||||
)
|
) # nosemgrep
|
||||||
|
|
||||||
return journal_entries
|
return journal_entries
|
||||||
|
|
||||||
|
|||||||
@@ -133,9 +133,17 @@ class TestPayrollEntry(FrappeTestCase):
|
|||||||
|
|
||||||
payment_entry = frappe.db.sql(
|
payment_entry = frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
Select ifnull(sum(je.total_debit),0) as total_debit, ifnull(sum(je.total_credit),0) as total_credit from `tabJournal Entry` je, `tabJournal Entry Account` jea
|
select
|
||||||
Where je.name = jea.parent
|
ifnull(sum(je.total_debit),0) as total_debit,
|
||||||
And jea.reference_name = %s
|
ifnull(sum(je.total_credit),0) as total_credit
|
||||||
|
from
|
||||||
|
`tabJournal Entry` je,
|
||||||
|
`tabJournal Entry Account` jea
|
||||||
|
Where
|
||||||
|
je.name = jea.parent
|
||||||
|
and je.voucher_type = 'Bank Entry'
|
||||||
|
and jea.reference_type = 'Payroll Entry'
|
||||||
|
and jea.reference_name = %s
|
||||||
""",
|
""",
|
||||||
(payroll_entry.name),
|
(payroll_entry.name),
|
||||||
as_dict=1,
|
as_dict=1,
|
||||||
|
|||||||
@@ -1050,7 +1050,8 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => {
|
|||||||
if (frm.doc.purpose === 'Material Receipt') return;
|
if (frm.doc.purpose === 'Material Receipt') return;
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
||||||
new erpnext.SerialNoBatchSelector({
|
if (frm.batch_selector?.dialog?.display) return;
|
||||||
|
frm.batch_selector = new erpnext.SerialNoBatchSelector({
|
||||||
frm: frm,
|
frm: frm,
|
||||||
item: item,
|
item: item,
|
||||||
warehouse_details: get_warehouse_type_and_name(item),
|
warehouse_details: get_warehouse_type_and_name(item),
|
||||||
|
|||||||
Reference in New Issue
Block a user