Merge branch 'develop' into subs

This commit is contained in:
Anurag Mishra 2019-05-16 10:48:21 +05:30 committed by GitHub
commit b6a4a02dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -299,6 +299,12 @@ def get_data():
"name": "Customers Without Any Sales Transactions",
"doctype": "Customer"
},
{
"type": "report",
"is_query_report": True,
"name": "Sales Partners Commission",
"doctype": "Customer"
}
]
},
{

View File

@ -9,6 +9,12 @@ from frappe import _
from frappe.utils import getdate, date_diff
class AdditionalSalary(Document):
def before_insert(self):
if frappe.db.exists("Additional Salary", {"employee": self.employee, "salary_component": self.salary_component,
"amount": self.amount, "payroll_date": self.payroll_date, "company": self.company}):
frappe.throw(_("Additional Salary Component Exists."))
def validate(self):
self.validate_dates()
if self.amount < 0: