mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
[salary structure] Cleanup, Fixed Monthly Register Report and other minor changes
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
var display_activity_log = function(msg) {
|
||||
if(!pscript.ss_html)
|
||||
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div','',{border:'1px solid #CCC', backgroundColor:'#CCC'});
|
||||
pscript.ss_html.innerHTML = '<div style="color:#EEE; background-color:#555;"><b><i>Activity Log:</i><br></b></div>';
|
||||
pscript.ss_html.innerHTML += '<div style="color:#666; padding: 5px">'+ msg + '</div>';
|
||||
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
|
||||
pscript.ss_html.innerHTML =
|
||||
'<div class="panel"><div class="panel-heading">Activity Log:</div>'+msg+'</div>';
|
||||
}
|
||||
|
||||
//Create salary slip
|
||||
|
||||
@@ -66,16 +66,8 @@ class DocType:
|
||||
(cstr(ret), self.doc.employee), raise_exception=1)
|
||||
|
||||
def validate_amount(self):
|
||||
if flt(self.doc.ctc) < 12*flt(self.doc.total_earning):
|
||||
msgprint(_("Annual Cost To Company can not be less than 12 months of Total Earning"),
|
||||
raise_exception=1)
|
||||
|
||||
if flt(self.doc.net_pay) < 0:
|
||||
msgprint(_("Net pay can not be negative"), raise_exception=1)
|
||||
elif flt(self.doc.net_pay)*12 > flt(self.doc.ctc):
|
||||
msgprint(_("Net pay can not be greater than 1/12th of Annual Cost To Company"),
|
||||
raise_exception=1)
|
||||
|
||||
|
||||
def validate(self):
|
||||
self.check_existing()
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
{
|
||||
"creation": "2013-03-07 18:50:29",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-05 14:54:02",
|
||||
"modified": "2013-08-06 17:15:53",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_import": 1,
|
||||
"doctype": "DocType",
|
||||
"icon": "icon-file-text",
|
||||
"module": "HR",
|
||||
@@ -157,19 +158,6 @@
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"description": "Cost to Company",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "ctc",
|
||||
"fieldtype": "Currency",
|
||||
"in_filter": 1,
|
||||
"label": "Annual Cost To Company",
|
||||
"oldfieldname": "ctc",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "company",
|
||||
@@ -181,11 +169,11 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"description": "You can create more earning and deduction type from Setup --> HR",
|
||||
"description": "Salary breakup based on Earning and Deduction.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "earning_deduction",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Earning & Deduction",
|
||||
"label": "Monthly Earning & Deduction",
|
||||
"oldfieldname": "earning_deduction",
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:19",
|
||||
"modified": "2013-08-06 17:11:40",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -14,7 +14,6 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"in_list_view": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Salary Structure Deduction",
|
||||
"parentfield": "fields",
|
||||
@@ -29,6 +28,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "d_type",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Type",
|
||||
"oldfieldname": "d_type",
|
||||
"oldfieldtype": "Select",
|
||||
@@ -41,6 +41,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "d_modified_amt",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Amount",
|
||||
"oldfieldname": "d_modified_amt",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -50,7 +51,8 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "depend_on_lwp",
|
||||
"fieldtype": "Check",
|
||||
"label": "Depend on LWP",
|
||||
"in_list_view": 0,
|
||||
"label": "Reduce Deduction for Leave Without Pay (LWP)",
|
||||
"oldfieldname": "depend_on_lwp",
|
||||
"oldfieldtype": "Check"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:27:48",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:19",
|
||||
"modified": "2013-08-06 17:11:31",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -16,7 +16,6 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"in_list_view": 1,
|
||||
"name": "__common__",
|
||||
"parent": "Salary Structure Earning",
|
||||
"parentfield": "fields",
|
||||
@@ -31,6 +30,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "e_type",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Type",
|
||||
"oldfieldname": "e_type",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -43,6 +43,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "modified_value",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Amount",
|
||||
"oldfieldname": "modified_value",
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -52,7 +53,8 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "depend_on_lwp",
|
||||
"fieldtype": "Check",
|
||||
"label": "Depend on LWP",
|
||||
"in_list_view": 0,
|
||||
"label": "Reduce Earning for Leave Without Pay (LWP)",
|
||||
"oldfieldname": "depend_on_lwp",
|
||||
"oldfieldtype": "Check"
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ def execute(filters=None):
|
||||
ss_earning_map = get_ss_earning_map(salary_slips)
|
||||
ss_ded_map = get_ss_ded_map(salary_slips)
|
||||
|
||||
|
||||
data = []
|
||||
for ss in salary_slips:
|
||||
row = [ss.employee, ss.employee_name, ss.branch, ss.department, ss.designation,
|
||||
|
||||
Reference in New Issue
Block a user