Merge branch 'version-12-hotfix' into v12-pre-release

This commit is contained in:
Nabin Hait
2020-09-15 19:42:05 +05:30
77 changed files with 1733 additions and 403 deletions

View File

@@ -82,7 +82,8 @@ def add_attendance(events, start, end, conditions=None):
e = {
"name": d.name,
"doctype": "Attendance",
"date": d.attendance_date,
"start": d.attendance_date,
"end": d.attendance_date,
"title": cstr(d.status),
"docstatus": d.docstatus
}

View File

@@ -1,12 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.views.calendar["Attendance"] = {
field_map: {
"start": "attendance_date",
"end": "attendance_date",
"id": "name",
"docstatus": 1
},
options: {
header: {
left: 'prev,next today',

View File

@@ -1,5 +1,5 @@
frappe.listview_settings['Expense Claim'] = {
add_fields: ["total_claimed_amount", "docstatus"],
add_fields: ["total_claimed_amount", "docstatus", "company"],
get_indicator: function(doc) {
if(doc.status == "Paid") {
return [__("Paid"), "green", "status,=,Paid"];

View File

@@ -1,5 +1,4 @@
{
"actions": [],
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-02-20 11:18:11",
@@ -167,6 +166,7 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
@@ -246,9 +246,8 @@
"icon": "fa fa-calendar",
"idx": 1,
"is_submittable": 1,
"links": [],
"max_attachments": 3,
"modified": "2020-03-10 22:40:43.487721",
"modified": "2020-08-13 17:22:44.832397",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Application",
@@ -333,4 +332,4 @@
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "employee_name"
}
}

View File

@@ -433,6 +433,8 @@ def get_leave_details(employee, date):
'from_date': ('<=', date),
'to_date': ('>=', date),
'leave_type': allocation.leave_type,
'employee': employee,
'docstatus': 1
}, 'SUM(total_leaves_allocated)') or 0
remaining_leaves = get_leave_balance_on(employee, d, date, to_date = allocation.to_date,
@@ -597,7 +599,7 @@ def get_leave_entries(employee, leave_type, from_date, to_date):
is_carry_forward, is_expired
FROM `tabLeave Ledger Entry`
WHERE employee=%(employee)s AND leave_type=%(leave_type)s
AND docstatus=1
AND docstatus=1
AND (leaves<0
OR is_expired=1)
AND (from_date between %(from_date)s AND %(to_date)s
@@ -790,4 +792,4 @@ def get_leave_approver(employee):
leave_approver = frappe.db.get_value('Department Approver', {'parent': department,
'parentfield': 'leave_approvers', 'idx': 1}, 'approver')
return leave_approver
return leave_approver

View File

@@ -290,6 +290,7 @@ class PayrollEntry(Document):
"account": default_payroll_payable_account,
"credit_in_account_currency": flt(payable_amount, precision),
"party_type": '',
"cost_center": self.cost_center
})
journal_entry.set("accounts", accounts)