Merge branch 'hotfix'
This commit is contained in:
commit
c6a695d0f3
@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.27.6'
|
||||
__version__ = '6.27.7'
|
||||
|
@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
||||
app_description = """ERP made simple"""
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "6.27.6"
|
||||
app_version = "6.27.7"
|
||||
app_email = "info@erpnext.com"
|
||||
app_license = "GNU General Public License (v3)"
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
|
@ -77,7 +77,9 @@ class LeaveAllocation(Document):
|
||||
frappe.throw(_("Total leaves allocated is mandatory"))
|
||||
|
||||
def validate_total_leaves_allocated(self):
|
||||
if date_diff(self.to_date, self.from_date) <= flt(self.total_leaves_allocated):
|
||||
# Adding a day to include To Date in the difference
|
||||
date_difference = date_diff(self.to_date, self.from_date) + 1
|
||||
if date_difference < self.total_leaves_allocated:
|
||||
frappe.throw(_("Total allocated leaves are more than days in the period"), OverAllocationError)
|
||||
|
||||
def validate_against_leave_applications(self):
|
||||
|
@ -4,10 +4,11 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff
|
||||
from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff, money_in_words
|
||||
from frappe.model.naming import make_autoname
|
||||
|
||||
from frappe import msgprint, _
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
from erpnext.setup.utils import get_company_currency
|
||||
from erpnext.hr.utils import set_employee_name
|
||||
from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
|
||||
@ -18,6 +19,22 @@ class SalarySlip(TransactionBase):
|
||||
def autoname(self):
|
||||
self.name = make_autoname('Sal Slip/' +self.employee + '/.#####')
|
||||
|
||||
def validate(self):
|
||||
self.check_existing()
|
||||
|
||||
if not (len(self.get("earnings")) or len(self.get("deductions"))):
|
||||
self.get_emp_and_leave_details()
|
||||
else:
|
||||
self.get_leave_details(lwp = self.leave_without_pay)
|
||||
|
||||
if not self.net_pay:
|
||||
self.calculate_net_pay()
|
||||
|
||||
company_currency = get_company_currency(self.company)
|
||||
self.total_in_words = money_in_words(self.rounded_total, company_currency)
|
||||
|
||||
set_employee_name(self)
|
||||
|
||||
def get_emp_and_leave_details(self):
|
||||
if self.employee:
|
||||
joining_date, relieving_date = frappe.db.get_value("Employee", self.employee,
|
||||
@ -59,7 +76,9 @@ class SalarySlip(TransactionBase):
|
||||
|
||||
def get_leave_details(self, joining_date=None, relieving_date=None, lwp=None):
|
||||
if not self.fiscal_year:
|
||||
self.fiscal_year = frappe.db.get_default("fiscal_year")
|
||||
# if default fiscal year is not set, get from nowdate
|
||||
self.fiscal_year = get_fiscal_year(nowdate())[0]
|
||||
|
||||
if not self.month:
|
||||
self.month = "%02d" % getdate(nowdate()).month
|
||||
|
||||
@ -150,23 +169,6 @@ class SalarySlip(TransactionBase):
|
||||
self.employee = ''
|
||||
frappe.throw(_("Salary Slip of employee {0} already created for this month").format(self.employee))
|
||||
|
||||
def validate(self):
|
||||
from frappe.utils import money_in_words
|
||||
self.check_existing()
|
||||
|
||||
if not (len(self.get("earnings")) or len(self.get("deductions"))):
|
||||
self.get_emp_and_leave_details()
|
||||
else:
|
||||
self.get_leave_details(lwp = self.leave_without_pay)
|
||||
|
||||
if not self.net_pay:
|
||||
self.calculate_net_pay()
|
||||
|
||||
company_currency = get_company_currency(self.company)
|
||||
self.total_in_words = money_in_words(self.rounded_total, company_currency)
|
||||
|
||||
set_employee_name(self)
|
||||
|
||||
def calculate_earning_total(self):
|
||||
self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount)
|
||||
for d in self.get("earnings"):
|
||||
|
@ -257,4 +257,5 @@ erpnext.patches.v6_20x.set_compact_print
|
||||
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
|
||||
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
|
||||
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
|
||||
erpnext.patches.v6_27.fix_recurring_order_status
|
||||
erpnext.patches.v6_27.fix_recurring_order_status
|
||||
erpnext.patches.v6_20x.update_product_bundle_description
|
||||
|
11
erpnext/patches/v6_20x/update_product_bundle_description.py
Normal file
11
erpnext/patches/v6_20x/update_product_bundle_description.py
Normal file
@ -0,0 +1,11 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils import sanitize_html
|
||||
|
||||
def execute():
|
||||
for product_bundle in frappe.get_all('Product Bundle'):
|
||||
doc = frappe.get_doc('Product Bundle', product_bundle.name)
|
||||
for item in doc.items:
|
||||
if item.description:
|
||||
description = sanitize_html(item.description)
|
||||
item.db_set('description', description, update_modified=False)
|
@ -21,7 +21,7 @@
|
||||
<h3>{%= __("Next Steps") %}</h3>
|
||||
<ul class="list-unstyled">
|
||||
<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
|
||||
<li><a class="text-muted" href="#Module/Learn">{%= __("View a list of all the help videos") %}</a></li>
|
||||
<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
|
||||
<li><a class="text-muted" href="https://manual.erpnext.com" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
|
||||
<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user