mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Merge branch 'develop' of https://github.com/frappe/erpnext into develop
This commit is contained in:
@@ -9,7 +9,8 @@ def get_data():
|
|||||||
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
|
'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
|
||||||
'fieldname': 'supplier',
|
'fieldname': 'supplier',
|
||||||
'non_standard_fieldnames': {
|
'non_standard_fieldnames': {
|
||||||
'Payment Entry': 'party_name'
|
'Payment Entry': 'party_name',
|
||||||
|
'Bank Account': 'party'
|
||||||
},
|
},
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,10 @@ def get_data():
|
|||||||
'label': _('Payments'),
|
'label': _('Payments'),
|
||||||
'items': ['Payment Entry']
|
'items': ['Payment Entry']
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'label': _('Bank'),
|
||||||
|
'items': ['Bank Account']
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'label': _('Pricing'),
|
'label': _('Pricing'),
|
||||||
'items': ['Pricing Rule']
|
'items': ['Pricing Rule']
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ class Student(Document):
|
|||||||
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
|
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
|
||||||
frappe.throw(_("Date of Birth cannot be greater than today."))
|
frappe.throw(_("Date of Birth cannot be greater than today."))
|
||||||
|
|
||||||
|
if self.date_of_birth and getdate(self.date_of_birth) >= getdate(self.joining_date):
|
||||||
|
frappe.throw(_("Date of Birth cannot be greater than Joining Date."))
|
||||||
|
|
||||||
if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving):
|
if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving):
|
||||||
frappe.throw(_("Joining Date can not be greater than Leaving Date"))
|
frappe.throw(_("Joining Date can not be greater than Leaving Date"))
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,16 @@ frappe.ui.form.on("Student Group", {
|
|||||||
group_based_on: function(frm) {
|
group_based_on: function(frm) {
|
||||||
if (frm.doc.group_based_on == "Batch") {
|
if (frm.doc.group_based_on == "Batch") {
|
||||||
frm.doc.course = null;
|
frm.doc.course = null;
|
||||||
|
frm.set_df_property('program', 'reqd', 1);
|
||||||
|
frm.set_df_property('course', 'reqd', 0);
|
||||||
|
}
|
||||||
|
else if (frm.doc.group_based_on == "Course") {
|
||||||
|
frm.set_df_property('program', 'reqd', 0);
|
||||||
|
frm.set_df_property('course', 'reqd', 1);
|
||||||
|
}
|
||||||
|
else if (frm.doc.group_based_on == "Activity") {
|
||||||
|
frm.set_df_property('program', 'reqd', 0);
|
||||||
|
frm.set_df_property('course', 'reqd', 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ import frappe
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import get_link_to_form
|
from frappe.utils import get_link_to_form
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from frappe import throw, _
|
||||||
|
|
||||||
class StudentLeaveApplication(Document):
|
class StudentLeaveApplication(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
self.validate_dates()
|
||||||
self.validate_duplicate()
|
self.validate_duplicate()
|
||||||
|
|
||||||
def validate_duplicate(self):
|
def validate_duplicate(self):
|
||||||
@@ -30,3 +32,7 @@ class StudentLeaveApplication(Document):
|
|||||||
link = get_link_to_form("Student Leave Application", data[0].name)
|
link = get_link_to_form("Student Leave Application", data[0].name)
|
||||||
frappe.throw(_("Leave application {0} already exists against the student {1}")
|
frappe.throw(_("Leave application {0} already exists against the student {1}")
|
||||||
.format(link, self.student))
|
.format(link, self.student))
|
||||||
|
|
||||||
|
def validate_dates(self):
|
||||||
|
if self.to_date < self.from_date :
|
||||||
|
throw(_("To Date cannot be less than From Date"))
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"creation": "2016-03-25 02:52:19.283003",
|
"creation": "2016-03-25 02:52:19.283003",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
"fetch_from": "user.full_name",
|
"fetch_from": "user.full_name",
|
||||||
"fieldname": "full_name",
|
"fieldname": "full_name",
|
||||||
"fieldtype": "Read Only",
|
"fieldtype": "Read Only",
|
||||||
|
"in_list_view": 1,
|
||||||
"label": "Full Name"
|
"label": "Full Name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
"label": "Welcome email sent"
|
"label": "Welcome email sent"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"columns": 1,
|
"columns": 2,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "view_attachments",
|
"fieldname": "view_attachments",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
@@ -74,7 +76,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2019-07-15 19:37:26.942294",
|
"links": [],
|
||||||
|
"modified": "2020-02-09 23:26:50.321417",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Project User",
|
"name": "Project User",
|
||||||
|
|||||||
16
package.json
16
package.json
@@ -1,7 +1,21 @@
|
|||||||
{
|
{
|
||||||
"devdependencies": {
|
"name": "erpnext",
|
||||||
|
"description": "Open Source ERP System powered by the Frappe Framework",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/frappe/erpnext.git"
|
||||||
|
},
|
||||||
|
"homepage": "https://erpnext.com",
|
||||||
|
"author": "Frappe Technologies Pvt. Ltd.",
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/frappe/erpnext/issues"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
"snyk": "^1.290.1"
|
"snyk": "^1.290.1"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"snyk-protect": "snyk protect",
|
"snyk-protect": "snyk protect",
|
||||||
"prepare": "yarn run snyk-protect"
|
"prepare": "yarn run snyk-protect"
|
||||||
|
|||||||
Reference in New Issue
Block a user