Merge branch 'hotfix' into salary-slip-net-pay-fixes
This commit is contained in:
commit
ec570026e1
@ -145,6 +145,13 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// payroll entry
|
||||||
|
if(jvd.reference_type==="Payroll Entry") {
|
||||||
|
return {
|
||||||
|
query: "erpnext.hr.doctype.payroll_entry.payroll_entry.get_payroll_entries_for_jv",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var out = {
|
var out = {
|
||||||
filters: [
|
filters: [
|
||||||
[jvd.reference_type, "docstatus", "=", 1]
|
[jvd.reference_type, "docstatus", "=", 1]
|
||||||
@ -169,8 +176,16 @@ erpnext.accounts.JournalEntry = frappe.ui.form.Controller.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(jvd.party_type && jvd.party) {
|
if(jvd.party_type && jvd.party) {
|
||||||
out.filters.push([jvd.reference_type,
|
var party_field = "";
|
||||||
(jvd.reference_type.indexOf("Sales")===0 ? "customer" : "supplier"), "=", jvd.party]);
|
if(jvd.reference_type.indexOf("Sales")===0) {
|
||||||
|
var party_field = "customer";
|
||||||
|
} else if (jvd.reference_type.indexOf("Purchase")===0) {
|
||||||
|
var party_field = "supplier";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (party_field) {
|
||||||
|
out.filters.push([jvd.reference_type, party_field, "=", jvd.party]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "LAP/.#####",
|
"autoname": "naming_series:",
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2013-02-20 11:18:11",
|
"creation": "2013-02-20 11:18:11",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
@ -796,7 +796,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 3,
|
"max_attachments": 3,
|
||||||
"modified": "2017-06-13 14:28:52.426044",
|
"modified": "2019-01-08 17:35:10.795225",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Leave Application",
|
"name": "Leave Application",
|
||||||
|
@ -525,3 +525,16 @@ def payroll_entry_has_bank_entries(name):
|
|||||||
response['submitted'] = 1 if bank_entries else 0
|
response['submitted'] = 1 if bank_entries else 0
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
def get_payroll_entries_for_jv(doctype, txt, searchfield, start, page_len, filters):
|
||||||
|
return frappe.db.sql("""
|
||||||
|
select name from `tabPayroll Entry`
|
||||||
|
where `{key}` LIKE %(txt)s
|
||||||
|
and name not in
|
||||||
|
(select reference_name from `tabJournal Entry Account`
|
||||||
|
where reference_type="Payroll Entry")
|
||||||
|
order by name limit %(start)s, %(page_len)s"""
|
||||||
|
.format(key=searchfield), {
|
||||||
|
'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||||
|
'start': start, 'page_len': page_len
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user