Merge pull request #7181 from KanchanChauhan/sales-person-status
Added "Enabled" to Sales Person
diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js
index fc6a1b4..8c7925a 100644
--- a/erpnext/accounts/doctype/account/account_tree.js
+++ b/erpnext/accounts/doctype/account/account_tree.js
@@ -30,8 +30,8 @@
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
depends_on: 'eval:doc.is_group && !doc.parent_account'},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
- options: ['', 'Accumulated Depreciation', 'Bank', 'Cash', 'Chargeable', 'Cost of Goods Sold', 'Depreciation',
- 'Equity', 'Expense Account', 'Expenses Included In Valuation', 'Fixed Asset', 'Income Account', 'Payable', 'Receivable',
+ options: ['', 'Accumulated Depreciation', 'Bank', 'Cash', 'Chargeable', 'Cost of Goods Sold', 'Depreciation',
+ 'Equity', 'Expense Account', 'Expenses Included In Valuation', 'Fixed Asset', 'Income Account', 'Payable', 'Receivable',
'Round Off', 'Stock', 'Stock Adjustment', 'Stock Received But Not Billed', 'Tax', 'Temporary'].join('\n'),
description: __("Optional. This setting will be used to filter in various transactions.")
},
diff --git a/erpnext/accounts/doctype/budget/budget.js b/erpnext/accounts/doctype/budget/budget.js
index 40e929a..6697b17 100644
--- a/erpnext/accounts/doctype/budget/budget.js
+++ b/erpnext/accounts/doctype/budget/budget.js
@@ -36,5 +36,18 @@
}
}
})
+ },
+
+ refresh: function(frm) {
+ frm.trigger("toggle_reqd_fields")
+ },
+
+ budget_against: function(frm) {
+ frm.trigger("toggle_reqd_fields")
+ },
+
+ toggle_reqd_fields: function(frm) {
+ frm.toggle_reqd("cost_center", frm.doc.budget_against=="Cost Center");
+ frm.toggle_reqd("project", frm.doc.budget_against=="Project");
}
});
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
index 8cfbc83..2b7f1f3 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js
@@ -31,6 +31,14 @@
options: "Company",
default: frappe.defaults.get_user_default("Company"),
reqd: 1
+ },
+ {
+ fieldname: "budget_against",
+ label: __("Budget Against"),
+ fieldtype: "Select",
+ options: ["Cost Center", "Project"],
+ default: "Cost Center",
+ reqd: 1
}
]
}
diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
index 0be0b3d..875ec99 100644
--- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
+++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py
@@ -12,7 +12,7 @@
if not filters: filters = {}
columns = get_columns(filters)
- cost_centers = get_cost_centers(filters.company)
+ cost_centers = get_cost_centers(filters)
period_month_ranges = get_period_month_ranges(filters["period"], filters["fiscal_year"])
cam_map = get_cost_center_account_month_map(filters)
@@ -40,7 +40,7 @@
return columns, data
def get_columns(filters):
- columns = [_("Cost Center") + ":Link/Cost Center:120", _("Account") + ":Link/Account:120"]
+ columns = [_(filters.get("budget_against")) + ":Link/%s:120"%(filters.get("budget_against")), _("Account") + ":Link/Account:120"]
group_months = False if filters["period"] == "Monthly" else True
@@ -56,16 +56,23 @@
return columns + [_("Total Target") + ":Float:120", _("Total Actual") + ":Float:120",
_("Total Variance") + ":Float:120"]
-def get_cost_centers(company):
- return frappe.db.sql_list("select name from `tabCost Center` where company=%s order by lft", company)
+def get_cost_centers(filters):
+ cond = "and 1=1"
+ if filters.get("budget_against") == "Cost Center":
+ cond = "order by lft"
+
+ return frappe.db.sql_list("""select name from `tab{tab}` where company=%s
+ {cond}""".format(tab=filters.get("budget_against"), cond=cond), filters.get("company"))
#Get cost center & target details
def get_cost_center_target_details(filters):
return frappe.db.sql("""
- select b.cost_center, b.monthly_distribution, ba.account, ba.budget_amount
+ select b.{budget_against} as budget_against, b.monthly_distribution, ba.account, ba.budget_amount
from `tabBudget` b, `tabBudget Account` ba
- where b.name=ba.parent and b.docstatus = 1 and b.fiscal_year=%s and b.company=%s
- """, (filters.fiscal_year, filters.company), as_dict=True)
+ where b.name=ba.parent and b.docstatus = 1 and b.fiscal_year=%s
+ and b.budget_against = %s and b.company=%s
+ """.format(budget_against=filters.get("budget_against").replace(" ", "_").lower()),
+ (filters.fiscal_year, filters.budget_against, filters.company), as_dict=True)
#Get target distribution details of accounts of cost center
def get_target_distribution_details(filters):
@@ -78,20 +85,26 @@
return target_details
#Get actual details from gl entry
-def get_actual_details(cost_center, fiscal_year):
- cc_lft, cc_rgt = frappe.db.get_value("Cost Center", cost_center, ["lft", "rgt"])
+def get_actual_details(name, filters):
+ cond = "1=1"
+ budget_against=filters.get("budget_against").replace(" ", "_").lower()
+
+ if filters.get("budget_against") == "Cost Center":
+ cc_lft, cc_rgt = frappe.db.get_value("Cost Center", name, ["lft", "rgt"])
+ cond = "lft>='{lft}' and rgt<='{rgt}'".format(lft = cc_lft, rgt=cc_rgt)
ac_details = frappe.db.sql("""select gl.account, gl.debit, gl.credit,
- MONTHNAME(gl.posting_date) as month_name, b.cost_center
+ MONTHNAME(gl.posting_date) as month_name, b.{budget_against} as budget_against
from `tabGL Entry` gl, `tabBudget Account` ba, `tabBudget` b
where
b.name = ba.parent
and b.docstatus = 1
and ba.account=gl.account
and gl.fiscal_year=%s
- and b.cost_center=%s
- and exists(select name from `tabCost Center` where name=gl.cost_center and lft>=%s and rgt<=%s)
- """, (fiscal_year, cost_center, cc_lft, cc_rgt), as_dict=1)
+ and b.{budget_against}=%s
+ and exists(select name from `tab{tab}` where name=gl.{budget_against} and {cond})
+ """.format(tab = filters.budget_against, budget_against = budget_against, cond = cond),
+ (filters.fiscal_year, name), as_dict=1)
cc_actual_details = {}
for d in ac_details:
@@ -107,17 +120,17 @@
cam_map = {}
for ccd in cost_center_target_details:
- actual_details = get_actual_details(ccd.cost_center, filters.fiscal_year)
+ actual_details = get_actual_details(ccd.budget_against, filters)
for month_id in range(1, 13):
month = datetime.date(2013, month_id, 1).strftime('%B')
- cam_map.setdefault(ccd.cost_center, {}).setdefault(ccd.account, {})\
+ cam_map.setdefault(ccd.budget_against, {}).setdefault(ccd.account, {})\
.setdefault(month, frappe._dict({
"target": 0.0, "actual": 0.0
}))
- tav_dict = cam_map[ccd.cost_center][ccd.account][month]
+ tav_dict = cam_map[ccd.budget_against][ccd.account][month]
month_percentage = tdd.get(ccd.monthly_distribution, {}).get(month, 0) \
if ccd.monthly_distribution else 100.0/12
diff --git a/erpnext/config/docs.py b/erpnext/config/docs.py
index 7b6915a..2d2cc0a 100644
--- a/erpnext/config/docs.py
+++ b/erpnext/config/docs.py
@@ -1,3 +1,7 @@
+from __future__ import unicode_literals
+
+docs_version = "7.x.x"
+
source_link = "https://github.com/frappe/erpnext"
docs_base_url = "https://frappe.github.io/erpnext"
headline = "ERPNext Documentation"
@@ -15,8 +19,8 @@
listed as one of the Best Open Source Softwares in the world by many online
blogs."""
-docs_version = "7.x.x"
splash_light_background = True
+google_analytics_id = 'UA-8911157-22'
def get_context(context):
context.brand_html = ('<img class="brand-logo" src="'+context.docs_base_url
diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py
index f9696d0..1d33d4d 100644
--- a/erpnext/config/schools.py
+++ b/erpnext/config/schools.py
@@ -68,7 +68,7 @@
},
{
"type": "doctype",
- "name": "Student Batch Attendance Tool"
+ "name": "Student Attendance Tool"
},
{
"type": "report",
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index c6b6664..7c4eb80 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -67,4 +67,12 @@
});
+cur_frm.fields_dict['depends_on'].grid.get_field('task').get_query = function(doc) {
+ if(doc.project) {
+ return {
+ filters: {'project': doc.project}
+ }
+ }
+}
+
cur_frm.add_fetch('task', 'subject', 'subject');
diff --git a/erpnext/public/build.json b/erpnext/public/build.json
index ac1c7c3..30b0900 100644
--- a/erpnext/public/build.json
+++ b/erpnext/public/build.json
@@ -1,37 +1,38 @@
{
- "css/erpnext.css": [
- "public/css/erpnext.css"
- ],
- "js/erpnext-web.min.js": [
- "public/js/website_utils.js",
- "public/js/shopping_cart.js"
- ],
- "js/erpnext.min.js": [
- "public/js/conf.js",
- "public/js/utils.js",
- "public/js/queries.js",
- "public/js/sms_manager.js",
- "public/js/utils/party.js",
- "public/js/templates/address_list.html",
- "public/js/templates/contact_list.html",
- "public/js/controllers/stock_controller.js",
- "public/js/payment/payments.js",
- "public/js/controllers/taxes_and_totals.js",
- "public/js/controllers/transaction.js",
- "public/js/pos/pos.html",
- "public/js/pos/pos_bill_item.html",
- "public/js/pos/pos_item.html",
- "public/js/pos/pos_tax_row.html",
- "public/js/pos/pos_invoice_list.html",
- "public/js/payment/pos_payment.html",
- "public/js/payment/payment_details.html",
- "public/js/templates/item_selector.html",
- "public/js/utils/item_selector.js",
- "public/js/help_links.js"
- ],
- "js/item-dashboard.min.js": [
- "stock/dashboard/item_dashboard.html",
- "stock/dashboard/item_dashboard_list.html",
- "stock/dashboard/item_dashboard.js"
- ]
-}
+ "css/erpnext.css": [
+ "public/css/erpnext.css"
+ ],
+ "js/erpnext-web.min.js": [
+ "public/js/website_utils.js",
+ "public/js/shopping_cart.js"
+ ],
+ "js/erpnext.min.js": [
+ "public/js/conf.js",
+ "public/js/utils.js",
+ "public/js/queries.js",
+ "public/js/sms_manager.js",
+ "public/js/utils/party.js",
+ "public/js/templates/address_list.html",
+ "public/js/templates/contact_list.html",
+ "public/js/controllers/stock_controller.js",
+ "public/js/payment/payments.js",
+ "public/js/controllers/taxes_and_totals.js",
+ "public/js/controllers/transaction.js",
+ "public/js/pos/pos.html",
+ "public/js/pos/pos_bill_item.html",
+ "public/js/pos/pos_item.html",
+ "public/js/pos/pos_tax_row.html",
+ "public/js/pos/pos_invoice_list.html",
+ "public/js/payment/pos_payment.html",
+ "public/js/payment/payment_details.html",
+ "public/js/templates/item_selector.html",
+ "public/js/utils/item_selector.js",
+ "public/js/help_links.js",
+ "public/js/schools/student_button.html"
+ ],
+ "js/item-dashboard.min.js": [
+ "stock/dashboard/item_dashboard.html",
+ "stock/dashboard/item_dashboard_list.html",
+ "stock/dashboard/item_dashboard.js"
+ ]
+}
\ No newline at end of file
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index c31b0c8..dcbb56b 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -902,13 +902,17 @@
get_terms: function() {
var me = this;
if(this.frm.doc.tc_name) {
- return this.frm.call({
- method: "frappe.client.get_value",
+ return frappe.call({
+ method: 'erpnext.setup.doctype.terms_and_conditions.terms_and_conditions.get_terms_and_conditions',
args: {
- doctype: "Terms and Conditions",
- fieldname: "terms",
- filters: { name: this.frm.doc.tc_name },
+ template_name: this.frm.doc.tc_name,
+ doc: this.frm.doc
},
+ callback: function(r) {
+ if(!r.exc) {
+ me.frm.set_value("terms", r.message);
+ }
+ }
});
}
},
diff --git a/erpnext/public/js/schools/student_button.html b/erpnext/public/js/schools/student_button.html
new file mode 100644
index 0000000..dabaf26
--- /dev/null
+++ b/erpnext/public/js/schools/student_button.html
@@ -0,0 +1,20 @@
+<div class="col-sm-3">
+ <div class="checkbox {% if status %} text-muted {% endif %}">
+ <label>
+ <input
+ type="checkbox"
+ data-idx="{{idx}}"
+ data-student="{{student}}"
+ data-student-name="{{student_name}}"
+ class="students-check"
+ {% if status %}
+ disabled="true"
+ {% endif %}
+ {% if status === "Present" %}
+ checked
+ {% endif %}
+ >
+ {{ idx }} - {{ student_name }}
+ </label>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/schools/api.py b/erpnext/schools/api.py
index 7cb02a3..bf09351 100644
--- a/erpnext/schools/api.py
+++ b/erpnext/schools/api.py
@@ -52,8 +52,10 @@
:param student_batch: Student Batch.
:param date: Date.
"""
+
present = json.loads(students_present)
absent = json.loads(students_absent)
+
for d in present:
make_attendance_records(d["student"], d["student_name"], "Present", course_schedule, student_batch, date)
diff --git a/erpnext/schools/doctype/course_schedule/course_schedule.js b/erpnext/schools/doctype/course_schedule/course_schedule.js
index 04a8cde..12e8522 100644
--- a/erpnext/schools/doctype/course_schedule/course_schedule.js
+++ b/erpnext/schools/doctype/course_schedule/course_schedule.js
@@ -1,134 +1,15 @@
frappe.provide("schools")
frappe.ui.form.on("Course Schedule", {
- onload: function(frm) {
- if (frm.doc.from_datetime && frm.doc.to_datetime) {
- var from_datetime = moment(frm.doc.from_datetime);
- var to_datetime = moment(frm.doc.to_datetime);
- frm.doc.schedule_date = from_datetime.format(moment.defaultFormat);
- frm.doc.from_time = from_datetime.format("HH:mm:ss");
- frm.doc.to_time = to_datetime.format("HH:mm:ss");
- }
- },
-
refresh: function(frm) {
- if (!frm.doc.__islocal && frm.doc.student_group) {
- frappe.call({
- method: "erpnext.schools.api.check_attendance_records_exist",
- args: {
- "course_schedule": frm.doc.name
- },
- callback: function(r) {
- if (r.message) {
- hide_field('attendance');
- frm.events.view_attendance(frm)
- } else {
- frappe.call({
- method: "erpnext.schools.api.get_student_group_students",
- args: {
- "student_group": frm.doc.student_group
- },
- callback: function(r) {
- if (r.message) {
- frm.events.get_students(frm, r.message)
- }
- }
- });
- }
+ if (!frm.doc.__islocal) {
+ frm.add_custom_button(__("Attendance"), function() {
+ frappe.route_options = {
+ based_on: "Course Schedule",
+ course_schedule: frm.doc.name
}
+ frappe.set_route("Form", "Student Attendance Tool");
});
- } else {
- hide_field('attendance');
}
- },
-
- view_attendance: function(frm) {
- hide_field('attendance');
- frm.add_custom_button(__("View attendance"), function() {
- frappe.route_options = {
- course_schedule: frm.doc.name
- }
- frappe.set_route("List", "Student Attendance");
- });
- },
-
- get_students: function(frm, students) {
- if (!frm.students_area) {
- frm.students_area = $('<div>')
- .appendTo(frm.fields_dict.students_html.wrapper);
- }
- frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
}
-});
-
-
-schools.StudentsEditor = Class.extend({
- init: function(frm, wrapper, students) {
- this.wrapper = wrapper;
- this.frm = frm;
- this.make(frm, students);
- },
- make: function(frm, students) {
- var me = this;
-
- $(this.wrapper).empty();
- var student_toolbar = $('<p>\
- <button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
- <button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
- <button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
-
- student_toolbar.find(".btn-add")
- .html(__('Check all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if (!$(check).is(":checked")) {
- check.checked = true;
- }
- });
- });
-
- student_toolbar.find(".btn-remove")
- .html(__('Uncheck all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if ($(check).is(":checked")) {
- check.checked = false;
- }
- });
- });
-
- student_toolbar.find(".btn-mark-att")
- .html(__('Mark Attendence'))
- .on("click", function() {
- var students_present = [];
- var students_absent = [];
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if ($(check).is(":checked")) {
- students_present.push(students[i]);
- } else {
- students_absent.push(students[i]);
- }
- });
- frappe.call({
- method: "erpnext.schools.api.mark_attendance",
- args: {
- "students_present": students_present,
- "students_absent": students_absent,
- "course_schedule": frm.doc.name
- },
- callback: function(r) {
- frm.events.view_attendance(frm)
- }
- });
- });
-
-
- $.each(students, function(i, m) {
- $(repl('<div class="col-sm-6">\
- <div class="checkbox">\
- <label><input type="checkbox" class="students-check" student="%(student)s">\
- %(student)s</label>\
- </div></div>', { student: m.student_name })).appendTo(me.wrapper);
- });
- }
-})
\ No newline at end of file
+});
\ No newline at end of file
diff --git a/erpnext/schools/doctype/course_schedule/course_schedule.json b/erpnext/schools/doctype/course_schedule/course_schedule.json
index 122285e..450d7cf 100644
--- a/erpnext/schools/doctype/course_schedule/course_schedule.json
+++ b/erpnext/schools/doctype/course_schedule/course_schedule.json
@@ -385,62 +385,6 @@
{
"allow_on_submit": 0,
"bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "attendance",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Attendance",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "students_html",
- "fieldtype": "HTML",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Students HTML",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "title",
@@ -478,7 +422,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-01 12:59:25.086606",
+ "modified": "2016-12-09 17:00:02.822788",
"modified_by": "Administrator",
"module": "Schools",
"name": "Course Schedule",
diff --git a/erpnext/schools/doctype/student_attendance/student_attendance.py b/erpnext/schools/doctype/student_attendance/student_attendance.py
index 45b3014..e2d01b5 100644
--- a/erpnext/schools/doctype/student_attendance/student_attendance.py
+++ b/erpnext/schools/doctype/student_attendance/student_attendance.py
@@ -31,9 +31,9 @@
(self.student, self.course_schedule, self.name))
else:
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
- student= %s and date= %s and name != %s and docstatus=1 and \
+ student= %s and student_batch= %s and date= %s and name != %s and docstatus=1 and \
(course_schedule is Null or course_schedule='')""",
- (self.student, self.date, self.name))
+ (self.student, self.student_batch, self.date, self.name))
if attendance_records:
frappe.throw(_("Attendance Record {0} exists against Student {1}")
diff --git a/erpnext/schools/doctype/student_batch_attendance_tool/__init__.py b/erpnext/schools/doctype/student_attendance_tool/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/student_batch_attendance_tool/__init__.py
rename to erpnext/schools/doctype/student_attendance_tool/__init__.py
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
new file mode 100644
index 0000000..7dd9dda
--- /dev/null
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
@@ -0,0 +1,150 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+frappe.provide("schools")
+
+frappe.ui.form.on('Student Attendance Tool', {
+ refresh: function(frm) {
+ frm.disable_save();
+ },
+
+ based_on: function(frm) {
+ if (frm.doc.based_on == "Student Batch") {
+ frm.set_value("course_schedule", "");
+ } else {
+ frm.set_value("student_batch", "");
+ }
+ },
+
+ student_batch: function(frm) {
+ if ((frm.doc.student_batch && frm.doc.date) || frm.doc.course_schedule) {
+ var method = "erpnext.schools.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records";
+
+ frappe.call({
+ method: method,
+ args: {
+ based_on: frm.doc.based_on,
+ student_batch: frm.doc.student_batch,
+ date: frm.doc.date,
+ course_schedule: frm.doc.course_schedule
+ },
+ callback: function(r) {
+ frm.events.get_students(frm, r.message);
+ }
+ })
+ }
+ },
+
+ date: function(frm) {
+ frm.trigger("student_batch");
+ },
+
+ course_schedule: function(frm) {
+ frm.trigger("student_batch");
+ },
+
+ get_students: function(frm, students) {
+ if (!frm.students_area) {
+ frm.students_area = $('<div>')
+ .appendTo(frm.fields_dict.students_html.wrapper);
+ }
+ frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
+ }
+});
+
+
+schools.StudentsEditor = Class.extend({
+ init: function(frm, wrapper, students) {
+ this.wrapper = wrapper;
+ this.frm = frm;
+ this.make(frm, students);
+ },
+ make: function(frm, students) {
+ var me = this;
+
+ $(this.wrapper).empty();
+ var student_toolbar = $('<p>\
+ <button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
+ <button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
+ <button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
+
+ student_toolbar.find(".btn-add")
+ .html(__('Check all'))
+ .on("click", function() {
+ $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
+ if (!$(check).prop("disabled")) {
+ check.checked = true;
+ }
+ });
+ });
+
+ student_toolbar.find(".btn-remove")
+ .html(__('Uncheck all'))
+ .on("click", function() {
+ $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
+ if (!$(check).prop("disabled")) {
+ check.checked = false;
+ }
+ });
+ });
+
+ var get_present_student = function(student) {
+ return students.filter(function(s) {
+ return s.idx === idx;
+ })
+ }
+ var get_absent_student = function(idx) {
+ return students.filter(function(s) {
+ return s.idx === idx;
+ })
+ }
+
+ student_toolbar.find(".btn-mark-att")
+ .html(__('Mark Attendence'))
+ .on("click", function() {
+ var studs = [];
+ $(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) {
+ var $check = $(check);
+ studs.push({
+ student: $check.data().student,
+ student_name: $check.data().studentName,
+ idx: $check.data().idx,
+ disabled: $check.prop("disabled"),
+ checked: $check.is(":checked")
+ });
+ });
+
+ var students_present = studs.filter(function(stud) {
+ return !stud.disabled && stud.checked;
+ });
+
+ var students_absent = studs.filter(function(stud) {
+ return !stud.disabled && !stud.checked;
+ });
+
+ frappe.call({
+ method: "erpnext.schools.api.mark_attendance",
+ args: {
+ "students_present": students_present,
+ "students_absent": students_absent,
+ "student_batch": frm.doc.student_batch,
+ "course_schedule": frm.doc.course_schedule,
+ "date": frm.doc.date
+ },
+ callback: function(r) {
+ frm.trigger("student_batch");
+ }
+ });
+ });
+
+ var htmls = students.map(function(student) {
+ return frappe.render_template("student_button", {
+ student: student.student,
+ student_name: student.student_name,
+ idx: student.idx,
+ status: student.status
+ })
+ });
+
+ $(htmls.join("")).appendTo(me.wrapper);
+ }
+});
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.json b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
similarity index 72%
rename from erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.json
rename to erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
index defc886..092af04 100644
--- a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.json
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
@@ -16,18 +16,19 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "student_batch",
- "fieldtype": "Link",
+ "default": "",
+ "fieldname": "based_on",
+ "fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Student Batch",
+ "label": "Based On",
"length": 0,
"no_copy": 0,
- "options": "Student Batch",
+ "options": "Student Batch\nCourse Schedule",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -35,7 +36,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -72,6 +73,67 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "depends_on": "eval:doc.based_on ==\"Student Batch\"",
+ "fieldname": "student_batch",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Student Batch",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student Batch",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.based_on ==\"Course Schedule\"",
+ "fieldname": "course_schedule",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Course Schedule",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Course Schedule",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:doc.based_on ==\"Student Batch\"",
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
@@ -100,7 +162,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "",
+ "depends_on": "eval: (doc.course_schedule \n|| (doc.student_batch && doc.date))",
"fieldname": "attendance",
"fieldtype": "Section Break",
"hidden": 0,
@@ -163,10 +225,10 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-01 12:58:31.822014",
+ "modified": "2016-12-09 17:36:28.739318",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Student Batch Attendance Tool",
+ "name": "Student Attendance Tool",
"name_case": "",
"owner": "Administrator",
"permissions": [
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py
new file mode 100644
index 0000000..30a692c
--- /dev/null
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class StudentAttendanceTool(Document):
+ pass
+
+@frappe.whitelist()
+def get_student_attendance_records(based_on, date=None, student_batch=None, course_schedule=None):
+ student_list = []
+ student_attendance_list = []
+
+ if based_on=="Course Schedule":
+ student_group = frappe.db.get_value("Course Schedule", course_schedule, "student_group")
+ if student_group:
+ student_list = frappe.get_list("Student Group Student", fields=["student", "student_name", "idx"] , \
+ filters={"parent": student_group}, order_by= "idx")
+ else:
+ student_batch = frappe.db.get_value("Course Schedule", course_schedule, "student_batch")
+ if not student_list:
+ student_list = frappe.get_list("Student Batch Student", fields=["student", "student_name", "idx"] , filters={"parent": student_batch}, order_by= "idx")
+
+ if course_schedule:
+ student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
+ course_schedule= %s and docstatus=1""", (course_schedule), as_dict=1)
+ else:
+ student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
+ student_batch= %s and date= %s and docstatus=1 and \
+ (course_schedule is Null or course_schedule='')""",
+ (student_batch, date), as_dict=1)
+
+ for attendance in student_attendance_list:
+ for student in student_list:
+ if student.student == attendance.student:
+ student.status = attendance.status
+ return student_list
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.js b/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.js
deleted file mode 100644
index 2dc6a85..0000000
--- a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.js
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
-// For license information, please see license.txt
-frappe.provide("schools")
-
-frappe.ui.form.on('Student Batch Attendance Tool', {
- refresh: function(frm) {
- frm.disable_save();
- hide_field('attendance');
- },
-
- student_batch: function(frm) {
- if (frm.doc.student_batch && frm.doc.date) {
- frappe.call({
- method: "erpnext.schools.api.check_attendance_records_exist",
- args: {
- "student_batch": frm.doc.student_batch,
- "date": frm.doc.date
- },
- callback: function(r) {
- if (r.message) {
- frappe.msgprint("Attendance already marked.");
- hide_field('attendance');
- } else {
- frappe.call({
- method: "erpnext.schools.api.get_student_batch_students",
- args: {
- "student_batch": frm.doc.student_batch
- },
- callback: function(r) {
- if (r.message) {
- unhide_field('attendance');
- frm.events.get_students(frm, r.message)
- }
- }
- });
- }
- }
- });
- }
- },
-
- date: function(frm) {
- frm.trigger("student_batch");
- },
-
- get_students: function(frm, students) {
- if (!frm.students_area) {
- frm.students_area = $('<div>')
- .appendTo(frm.fields_dict.students_html.wrapper);
- }
- frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
- }
-});
-
-
-schools.StudentsEditor = Class.extend({
- init: function(frm, wrapper, students) {
- this.wrapper = wrapper;
- this.frm = frm;
- this.make(frm, students);
- },
- make: function(frm, students) {
- var me = this;
-
- $(this.wrapper).empty();
- var student_toolbar = $('<p>\
- <button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
- <button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
- <button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
-
- student_toolbar.find(".btn-add")
- .html(__('Check all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if (!$(check).is(":checked")) {
- check.checked = true;
- }
- });
- });
-
- student_toolbar.find(".btn-remove")
- .html(__('Uncheck all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if ($(check).is(":checked")) {
- check.checked = false;
- }
- });
- });
-
- var get_student = function(idx) {
- return students.filter(function(s) {
- return s.idx === idx;
- })[0]
- }
-
- student_toolbar.find(".btn-mark-att")
- .html(__('Mark Attendence'))
- .on("click", function() {
- var students_present = [];
- var students_absent = [];
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- var idx = $(check).data().idx;
- if ($(check).is(":checked")) {
- students_present.push(get_student(idx));
- } else {
- students_absent.push(get_student(idx));
- }
- });
- frappe.call({
- method: "erpnext.schools.api.mark_attendance",
- args: {
- "students_present": students_present,
- "students_absent": students_absent,
- "student_batch": frm.doc.student_batch,
- "date": frm.doc.date
- },
- callback: function(r) {
- hide_field('attendance');
- }
- });
- });
-
-
- $.each(students, function(i, m) {
- $(repl('<div class="col-sm-6">\
- <div class="checkbox">\
- <label><input data-idx="%(idx)s" type="checkbox" class="students-check" data-student="%(name)s">\
- %(idx)s - %(name)s</label>\
- </div></div>', {
- name: m.student_name,
- idx: m.idx
- })).appendTo(me.wrapper);
- });
- }
-});
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.py b/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.py
deleted file mode 100644
index 49a5ae8..0000000
--- a/erpnext/schools/doctype/student_batch_attendance_tool/student_batch_attendance_tool.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-
-class StudentBatchAttendanceTool(Document):
- pass
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
index ce057c2..bede595 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
@@ -16,6 +16,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "title",
"fieldtype": "Data",
"hidden": 0,
@@ -23,6 +24,7 @@
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
@@ -32,6 +34,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -42,6 +45,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "disabled",
"fieldtype": "Check",
"hidden": 0,
@@ -49,6 +53,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
@@ -57,6 +62,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -67,6 +73,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "terms",
"fieldtype": "Text Editor",
"hidden": 0,
@@ -74,6 +81,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Terms and Conditions",
"length": 0,
"no_copy": 0,
@@ -83,6 +91,36 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "terms_and_conditions_help",
+ "fieldtype": "HTML",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Terms and Conditions Help",
+ "length": 0,
+ "no_copy": 0,
+ "options": "<h4>Standard Terms and Conditions Example</h4>\n\n<pre>Delivery Terms for Order number {{ name }}\n\n-Order Date : {{ transaction_date }} \n-Expected Delivery Date : {{ delivery_date }}\n</pre>\n\n<h4>How to get fieldnames</h4>\n\n<p>The fieldnames you can use in your standard reply are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)</p>\n\n<h4>Templating</h4>\n\n<p>Templates are compiled using the Jinja Templating Langauge. To learn more about Jinja, <a class=\"strong\" href=\"http://jinja.pocoo.org/docs/dev/templates/\">read this documentation.</a></p>",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -92,7 +130,7 @@
],
"hide_heading": 0,
"hide_toolbar": 0,
- "icon": "fa fa-legal",
+ "icon": "icon-legal",
"idx": 1,
"image_view": 0,
"in_create": 0,
@@ -101,7 +139,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:24:25.093905",
+ "modified": "2016-12-12 17:31:53.349301",
"modified_by": "Administrator",
"module": "Setup",
"name": "Terms and Conditions",
@@ -117,6 +155,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -137,6 +176,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -157,6 +197,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -177,6 +218,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -197,6 +239,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -217,6 +260,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -231,5 +275,6 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "sort_order": "ASC",
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
index 52f5156..d2b68b4 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py
@@ -3,8 +3,18 @@
from __future__ import unicode_literals
import frappe
-
+import json
from frappe.model.document import Document
+from frappe.utils.jinja import validate_template
class TermsandConditions(Document):
- pass
\ No newline at end of file
+ def validate(self):
+ validate_template(self.terms)
+
+@frappe.whitelist()
+def get_terms_and_conditions(template_name, doc):
+ if isinstance(doc, basestring):
+ doc = json.loads(doc)
+
+ terms_and_conditions = frappe.get_doc("Terms and Conditions", template_name)
+ return frappe.render_template(terms_and_conditions.terms, doc)
\ No newline at end of file
diff --git a/erpnext/support/web_form/issues/issues.json b/erpnext/support/web_form/issues/issues.json
index 4b7c70c..6474799 100644
--- a/erpnext/support/web_form/issues/issues.json
+++ b/erpnext/support/web_form/issues/issues.json
@@ -1,8 +1,12 @@
{
+ "accept_payment": 0,
"allow_comments": 1,
"allow_delete": 1,
"allow_edit": 1,
+ "allow_incomplete": 0,
"allow_multiple": 1,
+ "allow_print": 0,
+ "amount": 0.0,
"breadcrumbs": "[{\"title\":\"Issues\", \"name\":\"issues\"}]",
"creation": "2016-06-24 15:50:33.186483",
"doc_type": "Issue",
@@ -11,13 +15,16 @@
"idx": 0,
"is_standard": 1,
"login_required": 1,
- "modified": "2016-06-24 15:52:24.768558",
+ "max_attachment_size": 0,
+ "modified": "2016-12-07 04:26:13.917693",
"modified_by": "Administrator",
"module": "Support",
"name": "issues",
"owner": "Administrator",
"published": 1,
"route": "issues",
+ "show_sidebar": 1,
+ "sidebar_items": [],
"success_message": "",
"success_url": "/issues",
"title": "Issue",
@@ -27,6 +34,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Subject",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -36,15 +45,30 @@
"fieldtype": "Select",
"hidden": 0,
"label": "Status",
+ "max_length": 0,
+ "max_value": 0,
"options": "Open\nReplied\nHold\nClosed",
"read_only": 1,
"reqd": 0
},
{
+ "fieldname": "customer",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "label": "Customer",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "Customer",
+ "read_only": 1,
+ "reqd": 0
+ },
+ {
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"label": "Description",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -53,6 +77,8 @@
"fieldtype": "Attach",
"hidden": 0,
"label": "Attachment",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
}
diff --git a/erpnext/utilities/web_form/addresses/addresses.json b/erpnext/utilities/web_form/addresses/addresses.json
index 50fe6e9..6d3fefc 100644
--- a/erpnext/utilities/web_form/addresses/addresses.json
+++ b/erpnext/utilities/web_form/addresses/addresses.json
@@ -1,8 +1,12 @@
{
+ "accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
+ "allow_incomplete": 0,
"allow_multiple": 1,
+ "allow_print": 0,
+ "amount": 0.0,
"creation": "2016-06-24 15:50:33.196990",
"doc_type": "Address",
"docstatus": 0,
@@ -10,13 +14,16 @@
"idx": 0,
"is_standard": 1,
"login_required": 1,
- "modified": "2016-06-24 16:11:28.802353",
+ "max_attachment_size": 0,
+ "modified": "2016-12-07 04:17:02.020768",
"modified_by": "Administrator",
"module": "Utilities",
"name": "addresses",
"owner": "Administrator",
"published": 1,
"route": "address",
+ "show_sidebar": 0,
+ "sidebar_items": [],
"success_url": "/addresses",
"title": "Address",
"web_form_fields": [
@@ -26,6 +33,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Address Title",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -34,6 +43,8 @@
"fieldtype": "Select",
"hidden": 0,
"label": "Address Type",
+ "max_length": 0,
+ "max_value": 0,
"options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther",
"read_only": 0,
"reqd": 1
@@ -43,6 +54,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 1",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -51,6 +64,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 2",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -59,6 +74,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "City/Town",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -67,6 +84,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "State",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -75,6 +94,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Postal Code",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -83,6 +104,8 @@
"fieldtype": "Link",
"hidden": 0,
"label": "Country",
+ "max_length": 0,
+ "max_value": 0,
"options": "Country",
"read_only": 0,
"reqd": 1
@@ -90,6 +113,8 @@
{
"fieldtype": "Column Break",
"hidden": 0,
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -98,6 +123,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Email Id",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -106,6 +133,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Phone",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -116,6 +145,8 @@
"fieldtype": "Check",
"hidden": 0,
"label": "Preferred Billing Address",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -126,6 +157,8 @@
"fieldtype": "Check",
"hidden": 0,
"label": "Preferred Shipping Address",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
}