conference fixes

This commit is contained in:
Rushabh Mehta
2018-07-10 14:29:47 +05:30
parent 8e80363941
commit 0104ec2f3d
14 changed files with 506 additions and 448 deletions

View File

@@ -1,273 +1,321 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-07-06 16:20:28.662095",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "E-CON-2018-.###",
"beta": 0,
"creation": "2017-07-06 16:20:28.662095",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Participant Name",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Participant Name",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"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": "Full Conference Tickets",
"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,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fieldname": "conference",
"fieldtype": "Select",
"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": "Conference",
"length": 0,
"no_copy": 0,
"options": "\n2017\n2018",
"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
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user_conference_tickets",
"fieldtype": "Int",
"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": "User Conference Tickets",
"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,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"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": "Full Conference Tickets",
"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
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "currency",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "USD\nINR",
"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,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user_conference_tickets",
"fieldtype": "Int",
"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": "User Conference Tickets",
"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
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "currency",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "USD\nINR",
"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,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "paid",
"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": "Paid",
"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,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"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": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 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,
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "paid",
"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": "Paid",
"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
},
{
"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
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-07-07 11:36:26.163646",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Conference Participant",
"name_case": "",
"owner": "Administrator",
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-07-09 18:12:05.062456",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "Conference Participant",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -7,6 +7,9 @@ import frappe
from frappe.model.document import Document
class ConferenceParticipant(Document):
def validate(self):
self.conference = '2018'
def on_payment_authorized(self, status_changed_to=None):
self.paid = 1
self.save(ignore_permissions=True)

View File

@@ -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()
]);
});

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,17 +1,17 @@
frappe.ready(function() {
// bind events here
var calculate = function() {
var amount = parseInt($('input[name="full_conference_tickets"]').val() || 0) * 3000
+ parseInt($('input[name="user_conference_tickets"]').val() || 0) * 600;
$('input[name="amount"]').val(amount);
frappe._calculate = function() {
frappe.web_form.field_group.set_value('amount',
parseInt(frappe.web_form.field_group.get_value('full_conference_tickets') || 0) * 4000
)
};
$('input[name="full_conference_tickets"]').on('keyup', function() {
calculate();
});
$('input[name="user_conference_tickets"]').on('keyup', function() {
calculate();
});
setTimeout(() => {
$('input[data-fieldname="full_conference_tickets"]').on('keyup', function() {
frappe._calculate();
});
frappe._calculate();
}, 1000);
$('.btn-form-submit').hide();
})

View File

@@ -1,88 +1,78 @@
{
"accept_payment": 1,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"amount": 0.0,
"amount_based_on_field": 1,
"amount_field": "amount",
"creation": "2017-07-06 16:25:22.393979",
"currency": "INR",
"doc_type": "Conference Participant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2017-07-07 11:06:02.141890",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "buy-tickets-inr",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"payment_gateway": "Razorpay",
"published": 1,
"route": "buy-tickets-inr",
"show_sidebar": 1,
"sidebar_items": [],
"success_url": "/conf/2017",
"title": "Buy Tickets INR",
"accept_payment": 1,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"amount": 0.0,
"amount_based_on_field": 1,
"amount_field": "amount",
"creation": "2017-07-06 16:25:22.393979",
"currency": "INR",
"doc_type": "Conference Participant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2018-07-09 12:24:07.368873",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "buy-tickets-inr",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"payment_gateway": "Razorpay",
"published": 1,
"route": "buy-tickets-inr",
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "/conf/2017",
"title": "Buy Tickets INR",
"web_form_fields": [
{
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Participant Name",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Participant Name",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1
},
},
{
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "Full Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "Full Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0
},
},
{
"fieldname": "user_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "User Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0
},
{
"default": "INR",
"fieldname": "currency",
"fieldtype": "Select",
"hidden": 0,
"label": "Currency",
"max_length": 0,
"max_value": 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
},
},
{
"fieldname": "amount",
"fieldtype": "Data",
"hidden": 0,
"label": "Amount",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"fieldname": "amount",
"fieldtype": "Data",
"hidden": 0,
"label": "Amount",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"reqd": 1
}
]

View File

@@ -1,19 +1,17 @@
frappe.ready(function() {
// bind events here
var calculate = function() {
var amount =
(parseInt($('input[name="full_conference_tickets"]').val() || 0) * 50)
+ (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);
frappe._calculate = function() {
frappe.web_form.field_group.set_value('amount',
parseInt(frappe.web_form.field_group.get_value('full_conference_tickets') || 0) * 60
)
};
$('input[name="full_conference_tickets"]').on('keyup', function() {
calculate();
});
$('input[name="user_conference_tickets"]').on('keyup', function() {
calculate();
});
setTimeout(() => {
$('input[data-fieldname="full_conference_tickets"]').on('keyup', function() {
frappe._calculate();
});
frappe._calculate();
}, 1000);
$('.btn-form-submit').hide();
})

View File

@@ -1,88 +1,84 @@
{
"accept_payment": 1,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"amount": 0.0,
"amount_based_on_field": 1,
"amount_field": "amount",
"creation": "2017-07-06 16:22:37.464680",
"currency": "USD",
"doc_type": "Conference Participant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2017-07-07 11:06:27.726016",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "buy-tickets-paypal",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"payment_gateway": "PayPal",
"published": 1,
"route": "buy-tickets-paypal",
"show_sidebar": 1,
"sidebar_items": [],
"success_url": "/conf/2017",
"title": "Buy Tickets Paypal",
"accept_payment": 1,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 0,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"amount": 0.0,
"amount_based_on_field": 1,
"amount_field": "amount",
"creation": "2017-07-06 16:22:37.464680",
"currency": "USD",
"doc_type": "Conference Participant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2018-07-09 12:51:08.338885",
"modified_by": "Administrator",
"module": "ERPNext Foundation",
"name": "buy-tickets-paypal",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"payment_gateway": "PayPal",
"published": 1,
"route": "buy-tickets-paypal",
"show_sidebar": 0,
"sidebar_items": [
{
"enabled": 1,
"route": "/buy-tickets-paypal",
"title": "My Tickets"
}
],
"success_url": "/conf/2017",
"title": "Buy Tickets Paypal",
"web_form_fields": [
{
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Participant Name",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"fieldname": "participant_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Participant Name",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 1
},
},
{
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "Full Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"fieldname": "full_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "Full Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0
},
},
{
"fieldname": "user_conference_tickets",
"fieldtype": "Int",
"hidden": 0,
"label": "User Conference Tickets",
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0
},
{
"default": "USD",
"fieldname": "currency",
"fieldtype": "Select",
"hidden": 0,
"label": "Currency",
"max_length": 0,
"max_value": 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
},
},
{
"fieldname": "amount",
"fieldtype": "Data",
"hidden": 0,
"label": "Amount",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"fieldname": "amount",
"fieldtype": "Data",
"hidden": 0,
"label": "Amount",
"max_length": 0,
"max_value": 0,
"read_only": 1,
"reqd": 1
}
]

View File

@@ -1,8 +1,4 @@
import frappe
from frappe.database import Database
from markdown2 import markdown
from frappe.utils import validate_email_add
def migrate():
pass