Minor fixes in payroll entry

This commit is contained in:
Nabin Hait
2017-12-06 19:55:57 +05:30
parent bb09437d1f
commit 97b8a7b237
3 changed files with 10 additions and 7 deletions

View File

@@ -618,7 +618,7 @@
"label": "Reference Type", "label": "Reference Type",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nEmployee Loan", "options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nEmployee Loan\nPayroll Entry",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@@ -827,7 +827,7 @@
"issingle": 0, "issingle": 0,
"istable": 1, "istable": 1,
"max_attachments": 0, "max_attachments": 0,
"modified": "2017-08-30 08:44:54.295493", "modified": "2017-12-06 19:54:19.851534",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Journal Entry Account", "name": "Journal Entry Account",

View File

@@ -747,7 +747,7 @@
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_on_submit": 0, "allow_on_submit": 1,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
@@ -878,7 +878,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2017-11-30 18:33:38.967104", "modified": "2017-12-06 19:47:03.235021",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Payroll Entry", "name": "Payroll Entry",

View File

@@ -165,7 +165,8 @@ class PayrollEntry(Document):
not_submitted_ss.append(ss_dict) not_submitted_ss.append(ss_dict)
if submitted_ss: if submitted_ss:
jv_name = self.make_accural_jv_entry() jv_name = self.make_accural_jv_entry()
frappe.msgprint(_("Salary Slip submitted from {0} to {1}").format(ss_obj.start_date, ss_obj.end_date)) frappe.msgprint(_("Salary Slip submitted for period from {0} to {1}")
.format(ss_obj.start_date, ss_obj.end_date))
return create_submit_log(submitted_ss, not_submitted_ss, jv_name) return create_submit_log(submitted_ss, not_submitted_ss, jv_name)
@@ -331,7 +332,9 @@ class PayrollEntry(Document):
}, },
{ {
"account": default_payroll_payable_account, "account": default_payroll_payable_account,
"debit_in_account_currency": payment_amount "debit_in_account_currency": payment_amount,
"reference_type": self.doctype,
"reference_name": self.name
} }
]) ])
return journal_entry.as_dict() return journal_entry.as_dict()
@@ -445,7 +448,7 @@ def create_submit_log(submitted_ss, not_submitted_ss, jv_name):
frappe.msgprint("No salary slip found to submit for the above selected criteria OR salary slip already submitted") frappe.msgprint("No salary slip found to submit for the above selected criteria OR salary slip already submitted")
if not_submitted_ss: if not_submitted_ss:
frappe.msgprint("Not submitted Salary Slip <br>\ frappe.msgprint("Could not submit any Salary Slip <br>\
Possible reasons: <br>\ Possible reasons: <br>\
1. Net pay is less than 0. <br>\ 1. Net pay is less than 0. <br>\
2. Company Email Address specified in employee master is not valid. <br>") 2. Company Email Address specified in employee master is not valid. <br>")