mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-17 02:10:45 +02:00
conference fixes
This commit is contained in:
@@ -1,273 +1,321 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"autoname": "E-CON-2018-.###",
|
||||||
"creation": "2017-07-06 16:20:28.662095",
|
"beta": 0,
|
||||||
"custom": 0,
|
"creation": "2017-07-06 16:20:28.662095",
|
||||||
"docstatus": 0,
|
"custom": 0,
|
||||||
"doctype": "DocType",
|
"docstatus": 0,
|
||||||
"document_type": "",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"document_type": "",
|
||||||
"engine": "InnoDB",
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "participant_name",
|
"columns": 0,
|
||||||
"fieldtype": "Data",
|
"fieldname": "participant_name",
|
||||||
"hidden": 0,
|
"fieldtype": "Data",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Participant Name",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Participant Name",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "full_conference_tickets",
|
"columns": 0,
|
||||||
"fieldtype": "Int",
|
"default": "",
|
||||||
"hidden": 0,
|
"fieldname": "conference",
|
||||||
"ignore_user_permissions": 0,
|
"fieldtype": "Select",
|
||||||
"ignore_xss_filter": 0,
|
"hidden": 0,
|
||||||
"in_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_global_search": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_filter": 0,
|
||||||
"in_standard_filter": 0,
|
"in_global_search": 0,
|
||||||
"label": "Full Conference Tickets",
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"label": "Conference",
|
||||||
"permlevel": 0,
|
"length": 0,
|
||||||
"precision": "",
|
"no_copy": 0,
|
||||||
"print_hide": 0,
|
"options": "\n2017\n2018",
|
||||||
"print_hide_if_no_value": 0,
|
"permlevel": 0,
|
||||||
"read_only": 0,
|
"precision": "",
|
||||||
"remember_last_selected_value": 0,
|
"print_hide": 0,
|
||||||
"report_hide": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"reqd": 0,
|
"read_only": 0,
|
||||||
"search_index": 0,
|
"remember_last_selected_value": 0,
|
||||||
"set_only_once": 0,
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "user_conference_tickets",
|
"columns": 0,
|
||||||
"fieldtype": "Int",
|
"fieldname": "full_conference_tickets",
|
||||||
"hidden": 0,
|
"fieldtype": "Int",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "User Conference Tickets",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Full Conference Tickets",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "currency",
|
"columns": 0,
|
||||||
"fieldtype": "Select",
|
"fieldname": "user_conference_tickets",
|
||||||
"hidden": 0,
|
"fieldtype": "Int",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Currency",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "User Conference Tickets",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "USD\nINR",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "amount",
|
"columns": 0,
|
||||||
"fieldtype": "Currency",
|
"fieldname": "currency",
|
||||||
"hidden": 0,
|
"fieldtype": "Select",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Currency",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"options": "USD\nINR",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"precision": "",
|
||||||
"read_only": 0,
|
"print_hide": 0,
|
||||||
"remember_last_selected_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"report_hide": 0,
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"remember_last_selected_value": 0,
|
||||||
"search_index": 0,
|
"report_hide": 0,
|
||||||
"set_only_once": 0,
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "paid",
|
"columns": 0,
|
||||||
"fieldtype": "Check",
|
"fieldname": "amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Currency",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Paid",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Amount",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "thank_you_email_sent",
|
"columns": 0,
|
||||||
"fieldtype": "Check",
|
"fieldname": "paid",
|
||||||
"hidden": 0,
|
"fieldtype": "Check",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Thank You Email Sent",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Paid",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "thank_you_email_sent",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Thank You Email Sent",
|
||||||
|
"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,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-07-07 11:36:26.163646",
|
"modified": "2018-07-09 18:12:05.062456",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "ERPNext Foundation",
|
"module": "ERPNext Foundation",
|
||||||
"name": "Conference Participant",
|
"name": "Conference Participant",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"cancel": 0,
|
||||||
"cancel": 0,
|
"create": 1,
|
||||||
"create": 1,
|
"delete": 1,
|
||||||
"delete": 1,
|
"email": 1,
|
||||||
"email": 1,
|
"export": 1,
|
||||||
"export": 1,
|
"if_owner": 0,
|
||||||
"if_owner": 0,
|
"import": 0,
|
||||||
"import": 0,
|
"permlevel": 0,
|
||||||
"permlevel": 0,
|
"print": 1,
|
||||||
"print": 1,
|
"read": 1,
|
||||||
"read": 1,
|
"report": 1,
|
||||||
"report": 1,
|
"role": "System Manager",
|
||||||
"role": "System Manager",
|
"set_user_permissions": 0,
|
||||||
"set_user_permissions": 0,
|
"share": 1,
|
||||||
"share": 1,
|
"submit": 0,
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"show_name_in_global_search": 0,
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,9 @@ import frappe
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class ConferenceParticipant(Document):
|
class ConferenceParticipant(Document):
|
||||||
|
def validate(self):
|
||||||
|
self.conference = '2018'
|
||||||
|
|
||||||
def on_payment_authorized(self, status_changed_to=None):
|
def on_payment_authorized(self, status_changed_to=None):
|
||||||
self.paid = 1
|
self.paid = 1
|
||||||
self.save(ignore_permissions=True)
|
self.save(ignore_permissions=True)
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// rename this file from _test_[name] to test_[name] to activate
|
||||||
|
// and remove above this line
|
||||||
|
|
||||||
|
QUnit.test("test: Conference Participant", function (assert) {
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
// number of asserts
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
// insert a new Conference Participant
|
||||||
|
() => frappe.tests.make('Conference Participant', [
|
||||||
|
// values to be set
|
||||||
|
{key: 'value'}
|
||||||
|
]),
|
||||||
|
() => {
|
||||||
|
assert.equal(cur_frm.doc.key, 'value');
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
|
||||||
|
});
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<p>Dear {{ doc.participant_name }},</p>
|
|
||||||
|
|
||||||
<p>Thank you for registering for the 2017 ERPNext Conference!</p>
|
|
||||||
|
|
||||||
<p>Here are your ticket details:</p>
|
|
||||||
|
|
||||||
{% if doc.full_conference_tickets %}
|
|
||||||
<p>
|
|
||||||
Full Conference Tickets: {{ doc.full_conference_tickets or 0 }}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
{% if doc.user_conference_tickets %}
|
|
||||||
<p>
|
|
||||||
User Conference Tickets: {{ doc.user_conference_tickets or 0 }}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<p>Total Amount: {{ doc.currency }} {{ doc.get_formatted('amount') }}</p>
|
|
||||||
|
|
||||||
<p>If you need any help, please email us at foundation@erpnext.com</p>
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<p>Dear {{ doc.participant_name }},</p>
|
||||||
|
|
||||||
|
<p>Thank you for registering for the 2018 ERPNext Conference!</p>
|
||||||
|
|
||||||
|
<p>Here are your ticket details:</p>
|
||||||
|
|
||||||
|
<h4>Ticket Number {{ doc.name}}</h4>
|
||||||
|
|
||||||
|
<table class="more-info" border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 300px; padding: 30px 0px">
|
||||||
|
<tr>
|
||||||
|
<th style='width: 50%'>Ticket Type</th>
|
||||||
|
<th style='width: 25%'>Qty</th>
|
||||||
|
<th style='width: 25%'>Amount</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Conference Tickets + Lunch + Dinner</td>
|
||||||
|
<td>{{ doc.full_conference_tickets or 0 }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h5>Total Amount: {{ doc.currency }} {{ doc.get_formatted('amount') }}</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<p>If you need any help, please email us at foundation@erpnext.com</p>
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
frappe.ready(function() {
|
frappe.ready(function() {
|
||||||
// bind events here
|
// bind events here
|
||||||
var calculate = function() {
|
frappe._calculate = function() {
|
||||||
var amount = parseInt($('input[name="full_conference_tickets"]').val() || 0) * 3000
|
frappe.web_form.field_group.set_value('amount',
|
||||||
+ parseInt($('input[name="user_conference_tickets"]').val() || 0) * 600;
|
parseInt(frappe.web_form.field_group.get_value('full_conference_tickets') || 0) * 4000
|
||||||
$('input[name="amount"]').val(amount);
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
$('input[name="full_conference_tickets"]').on('keyup', function() {
|
setTimeout(() => {
|
||||||
calculate();
|
$('input[data-fieldname="full_conference_tickets"]').on('keyup', function() {
|
||||||
});
|
frappe._calculate();
|
||||||
$('input[name="user_conference_tickets"]').on('keyup', function() {
|
});
|
||||||
calculate();
|
frappe._calculate();
|
||||||
});
|
}, 1000);
|
||||||
|
|
||||||
$('.btn-form-submit').hide();
|
$('.btn-form-submit').hide();
|
||||||
})
|
})
|
||||||
@@ -1,88 +1,78 @@
|
|||||||
{
|
{
|
||||||
"accept_payment": 1,
|
"accept_payment": 1,
|
||||||
"allow_comments": 0,
|
"allow_comments": 0,
|
||||||
"allow_delete": 0,
|
"allow_delete": 0,
|
||||||
"allow_edit": 0,
|
"allow_edit": 0,
|
||||||
"allow_incomplete": 0,
|
"allow_incomplete": 0,
|
||||||
"allow_multiple": 1,
|
"allow_multiple": 1,
|
||||||
"allow_print": 1,
|
"allow_print": 1,
|
||||||
"amount": 0.0,
|
"amount": 0.0,
|
||||||
"amount_based_on_field": 1,
|
"amount_based_on_field": 1,
|
||||||
"amount_field": "amount",
|
"amount_field": "amount",
|
||||||
"creation": "2017-07-06 16:25:22.393979",
|
"creation": "2017-07-06 16:25:22.393979",
|
||||||
"currency": "INR",
|
"currency": "INR",
|
||||||
"doc_type": "Conference Participant",
|
"doc_type": "Conference Participant",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Web Form",
|
"doctype": "Web Form",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"introduction_text": "",
|
"introduction_text": "",
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"login_required": 1,
|
"login_required": 1,
|
||||||
"max_attachment_size": 0,
|
"max_attachment_size": 0,
|
||||||
"modified": "2017-07-07 11:06:02.141890",
|
"modified": "2018-07-09 12:24:07.368873",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "ERPNext Foundation",
|
"module": "ERPNext Foundation",
|
||||||
"name": "buy-tickets-inr",
|
"name": "buy-tickets-inr",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"payment_button_label": "Buy Now",
|
"payment_button_label": "Buy Now",
|
||||||
"payment_gateway": "Razorpay",
|
"payment_gateway": "Razorpay",
|
||||||
"published": 1,
|
"published": 1,
|
||||||
"route": "buy-tickets-inr",
|
"route": "buy-tickets-inr",
|
||||||
"show_sidebar": 1,
|
"show_sidebar": 0,
|
||||||
"sidebar_items": [],
|
"sidebar_items": [],
|
||||||
"success_url": "/conf/2017",
|
"success_url": "/conf/2017",
|
||||||
"title": "Buy Tickets INR",
|
"title": "Buy Tickets INR",
|
||||||
"web_form_fields": [
|
"web_form_fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "participant_name",
|
"fieldname": "participant_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Participant Name",
|
"label": "Participant Name",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "full_conference_tickets",
|
"fieldname": "full_conference_tickets",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Full Conference Tickets",
|
"label": "Full Conference Tickets",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "user_conference_tickets",
|
"default": "INR",
|
||||||
"fieldtype": "Int",
|
"fieldname": "currency",
|
||||||
"hidden": 0,
|
"fieldtype": "Select",
|
||||||
"label": "User Conference Tickets",
|
"hidden": 0,
|
||||||
"max_length": 0,
|
"label": "Currency",
|
||||||
"max_value": 0,
|
"max_length": 0,
|
||||||
"read_only": 0,
|
"max_value": 0,
|
||||||
"reqd": 0
|
"options": "INR",
|
||||||
},
|
"read_only": 1,
|
||||||
{
|
|
||||||
"default": "INR",
|
|
||||||
"fieldname": "currency",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"hidden": 0,
|
|
||||||
"label": "Currency",
|
|
||||||
"max_length": 0,
|
|
||||||
"max_value": 0,
|
|
||||||
"options": "INR",
|
|
||||||
"read_only": 1,
|
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
frappe.ready(function() {
|
frappe.ready(function() {
|
||||||
// bind events here
|
// bind events here
|
||||||
var calculate = function() {
|
frappe._calculate = function() {
|
||||||
var amount =
|
frappe.web_form.field_group.set_value('amount',
|
||||||
(parseInt($('input[name="full_conference_tickets"]').val() || 0) * 50)
|
parseInt(frappe.web_form.field_group.get_value('full_conference_tickets') || 0) * 60
|
||||||
+ (parseInt($('input[name="user_conference_tickets"]').val() || 0) * 10);
|
)
|
||||||
$('input[name="amount"]').val(amount);
|
|
||||||
$('input[name="amount"]').closest('.form-group').toggleClass('has-error', amount == 0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$('input[name="full_conference_tickets"]').on('keyup', function() {
|
setTimeout(() => {
|
||||||
calculate();
|
$('input[data-fieldname="full_conference_tickets"]').on('keyup', function() {
|
||||||
});
|
frappe._calculate();
|
||||||
$('input[name="user_conference_tickets"]').on('keyup', function() {
|
});
|
||||||
calculate();
|
frappe._calculate();
|
||||||
});
|
}, 1000);
|
||||||
|
|
||||||
$('.btn-form-submit').hide();
|
$('.btn-form-submit').hide();
|
||||||
})
|
})
|
||||||
@@ -1,88 +1,84 @@
|
|||||||
{
|
{
|
||||||
"accept_payment": 1,
|
"accept_payment": 1,
|
||||||
"allow_comments": 0,
|
"allow_comments": 0,
|
||||||
"allow_delete": 0,
|
"allow_delete": 0,
|
||||||
"allow_edit": 0,
|
"allow_edit": 0,
|
||||||
"allow_incomplete": 0,
|
"allow_incomplete": 0,
|
||||||
"allow_multiple": 1,
|
"allow_multiple": 1,
|
||||||
"allow_print": 1,
|
"allow_print": 1,
|
||||||
"amount": 0.0,
|
"amount": 0.0,
|
||||||
"amount_based_on_field": 1,
|
"amount_based_on_field": 1,
|
||||||
"amount_field": "amount",
|
"amount_field": "amount",
|
||||||
"creation": "2017-07-06 16:22:37.464680",
|
"creation": "2017-07-06 16:22:37.464680",
|
||||||
"currency": "USD",
|
"currency": "USD",
|
||||||
"doc_type": "Conference Participant",
|
"doc_type": "Conference Participant",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Web Form",
|
"doctype": "Web Form",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"introduction_text": "",
|
"introduction_text": "",
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"login_required": 1,
|
"login_required": 1,
|
||||||
"max_attachment_size": 0,
|
"max_attachment_size": 0,
|
||||||
"modified": "2017-07-07 11:06:27.726016",
|
"modified": "2018-07-09 12:51:08.338885",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "ERPNext Foundation",
|
"module": "ERPNext Foundation",
|
||||||
"name": "buy-tickets-paypal",
|
"name": "buy-tickets-paypal",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"payment_button_label": "Buy Now",
|
"payment_button_label": "Buy Now",
|
||||||
"payment_gateway": "PayPal",
|
"payment_gateway": "PayPal",
|
||||||
"published": 1,
|
"published": 1,
|
||||||
"route": "buy-tickets-paypal",
|
"route": "buy-tickets-paypal",
|
||||||
"show_sidebar": 1,
|
"show_sidebar": 0,
|
||||||
"sidebar_items": [],
|
"sidebar_items": [
|
||||||
"success_url": "/conf/2017",
|
{
|
||||||
"title": "Buy Tickets Paypal",
|
"enabled": 1,
|
||||||
|
"route": "/buy-tickets-paypal",
|
||||||
|
"title": "My Tickets"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"success_url": "/conf/2017",
|
||||||
|
"title": "Buy Tickets Paypal",
|
||||||
"web_form_fields": [
|
"web_form_fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "participant_name",
|
"fieldname": "participant_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Participant Name",
|
"label": "Participant Name",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "full_conference_tickets",
|
"fieldname": "full_conference_tickets",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Full Conference Tickets",
|
"label": "Full Conference Tickets",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "user_conference_tickets",
|
"default": "USD",
|
||||||
"fieldtype": "Int",
|
"fieldname": "currency",
|
||||||
"hidden": 0,
|
"fieldtype": "Select",
|
||||||
"label": "User Conference Tickets",
|
"hidden": 0,
|
||||||
"max_length": 0,
|
"label": "Currency",
|
||||||
"max_value": 0,
|
"max_length": 0,
|
||||||
"read_only": 0,
|
"max_value": 0,
|
||||||
"reqd": 0
|
"options": "USD\nINR",
|
||||||
},
|
"read_only": 1,
|
||||||
{
|
|
||||||
"default": "USD",
|
|
||||||
"fieldname": "currency",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"hidden": 0,
|
|
||||||
"label": "Currency",
|
|
||||||
"max_length": 0,
|
|
||||||
"max_value": 0,
|
|
||||||
"options": "USD\nINR",
|
|
||||||
"read_only": 1,
|
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.database import Database
|
|
||||||
from markdown2 import markdown
|
|
||||||
from frappe.utils import validate_email_add
|
|
||||||
|
|
||||||
def migrate():
|
def migrate():
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user