diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js_old b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js_old new file mode 100755 index 000000000..c38645067 --- /dev/null +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js_old @@ -0,0 +1,583 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +// print heading +cur_frm.pformat.print_heading = 'Invoice'; + +{% include 'erpnext/selling/sales_common.js' %}; + +cur_frm.add_fetch('customer', 'tax_id', 'tax_id'); + +frappe.provide("erpnext.accounts"); +erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({ + setup: function(doc) { + this.setup_posting_date_time_check(); + this._super(doc); + }, + onload: function() { + var me = this; + this._super(); + + if(!this.frm.doc.__islocal && !this.frm.doc.customer && this.frm.doc.debit_to) { + // show debit_to in print format + this.frm.set_df_property("debit_to", "print_hide", 0); + } + + erpnext.queries.setup_queries(this.frm, "Warehouse", function() { + return erpnext.queries.warehouse(me.frm.doc); + }); + + if(this.frm.doc.__islocal && this.frm.doc.is_pos) { + //Load pos profile data on the invoice if the default value of Is POS is 1 + + me.frm.script_manager.trigger("is_pos"); + me.frm.refresh_fields(); + } + }, + + refresh: function(doc, dt, dn) { + this._super(); + if(cur_frm.msgbox && cur_frm.msgbox.$wrapper.is(":visible")) { + // hide new msgbox + cur_frm.msgbox.hide(); + } + + this.frm.toggle_reqd("due_date", !this.frm.doc.is_return); + + this.show_general_ledger(); + + if(doc.update_stock) this.show_stock_ledger(); + + if(doc.docstatus==1 && !doc.is_return) { + + var is_delivered_by_supplier = false; + + is_delivered_by_supplier = cur_frm.doc.items.some(function(item){ + return item.is_delivered_by_supplier ? true : false; + }) + + if(doc.outstanding_amount >= 0 || Math.abs(flt(doc.outstanding_amount)) < flt(doc.grand_total)) { + cur_frm.add_custom_button(__('Return / Credit Note'), + this.make_sales_return, __("Make")); + cur_frm.page.set_inner_btn_group_as_primary(__("Make")); + } + + if(cint(doc.update_stock)!=1) { + // show Make Delivery Note button only if Sales Invoice is not created from Delivery Note + var from_delivery_note = false; + from_delivery_note = cur_frm.doc.items + .some(function(item) { + return item.delivery_note ? true : false; + }); + + if(!from_delivery_note && !is_delivered_by_supplier) { + cur_frm.add_custom_button(__('Delivery'), + cur_frm.cscript['Make Delivery Note'], __("Make")); + } + } + + if(doc.outstanding_amount!=0 && !cint(doc.is_return)) { + cur_frm.add_custom_button(__('Payment'), + this.make_payment_entry, __("Make")); + } + + if(doc.outstanding_amount>0 && !cint(doc.is_return)) { + cur_frm.add_custom_button(__('Payment Request'), + this.make_payment_request, __("Make")); + } + + + } + + // Show buttons only when pos view is active + if (cint(doc.docstatus==0) && cur_frm.page.current_view_name!=="pos" && !doc.is_return) { + cur_frm.cscript.sales_order_btn(); + cur_frm.cscript.delivery_note_btn(); + } + + this.set_default_print_format(); + }, + + on_submit: function(doc, dt, dn) { + var me = this; + + $.each(doc["items"], function(i, row) { + if(row.delivery_note) frappe.model.clear_doc("Delivery Note", row.delivery_note) + }) + + if(this.frm.doc.is_pos) { + this.frm.msgbox = frappe.msgprint( + ` + ${__('Print')} + + ${__('New')}` + ); + + } else if(cint(frappe.boot.notification_settings.sales_invoice)) { + this.frm.email_doc(frappe.boot.notification_settings.sales_invoice_message); + } + }, + + set_default_print_format: function() { + // set default print format to POS type + if(cur_frm.doc.is_pos) { + if(cur_frm.pos_print_format) { + cur_frm.meta._default_print_format = cur_frm.meta.default_print_format; + cur_frm.meta.default_print_format = cur_frm.pos_print_format; + } + } else { + if(cur_frm.meta._default_print_format) { + cur_frm.meta.default_print_format = cur_frm.meta._default_print_format; + cur_frm.meta._default_print_format = null; + } + } + }, + + sales_order_btn: function() { + var me = this; + this.$sales_order_btn = this.frm.add_custom_button(__('Sales Order'), + function() { + erpnext.utils.map_current_doc({ + method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice", + source_doctype: "Sales Order", + target: me.frm, + setters: { + customer: me.frm.doc.customer || undefined, + }, + get_query_filters: { + docstatus: 1, + status: ["!=", "Closed"], + per_billed: ["<", 99.99], + company: me.frm.doc.company + } + }) + }, __("Get items from")); + }, + + delivery_note_btn: function() { + var me = this; + this.$delivery_note_btn = this.frm.add_custom_button(__('Delivery Note'), + function() { + erpnext.utils.map_current_doc({ + method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice", + source_doctype: "Delivery Note", + target: me.frm, + date_field: "posting_date", + setters: { + customer: me.frm.doc.customer || undefined + }, + get_query: function() { + var filters = { + docstatus: 1, + company: me.frm.doc.company + }; + if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer; + return { + query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed", + filters: filters + }; + } + }); + }, __("Get items from")); + }, + + tc_name: function() { + this.get_terms(); + }, + + customer: function() { + var me = this; + if(this.frm.updating_party_details) return; + + erpnext.utils.get_party_details(this.frm, + "erpnext.accounts.party.get_party_details", { + posting_date: this.frm.doc.posting_date, + party: this.frm.doc.customer, + party_type: "Customer", + account: this.frm.doc.debit_to, + price_list: this.frm.doc.selling_price_list, + }, function() { + me.apply_pricing_rule(); + }) + }, + + debit_to: function() { + var me = this; + if(this.frm.doc.debit_to) { + me.frm.call({ + method: "frappe.client.get_value", + args: { + doctype: "Account", + fieldname: "account_currency", + filters: { name: me.frm.doc.debit_to }, + }, + callback: function(r, rt) { + if(r.message) { + me.frm.set_value("party_account_currency", r.message.account_currency); + me.set_dynamic_labels(); + } + } + }); + } + }, + + allocated_amount: function() { + this.calculate_total_advance(); + this.frm.refresh_fields(); + }, + + write_off_outstanding_amount_automatically: function() { + if(cint(this.frm.doc.write_off_outstanding_amount_automatically)) { + frappe.model.round_floats_in(this.frm.doc, ["grand_total", "paid_amount"]); + // this will make outstanding amount 0 + this.frm.set_value("write_off_amount", + flt(this.frm.doc.grand_total - this.frm.doc.paid_amount - this.frm.doc.total_advance, precision("write_off_amount")) + ); + this.frm.toggle_enable("write_off_amount", false); + + } else { + this.frm.toggle_enable("write_off_amount", true); + } + + this.calculate_outstanding_amount(false); + this.frm.refresh_fields(); + }, + + write_off_amount: function() { + this.set_in_company_currency(this.frm.doc, ["write_off_amount"]); + this.write_off_outstanding_amount_automatically(); + }, + + items_add: function(doc, cdt, cdn) { + var row = frappe.get_doc(cdt, cdn); + this.frm.script_manager.copy_from_first_row("items", row, ["income_account", "cost_center"]); + }, + + set_dynamic_labels: function() { + this._super(); + this.hide_fields(this.frm.doc); + }, + + items_on_form_rendered: function() { + erpnext.setup_serial_no(); + }, + + make_sales_return: function() { + frappe.model.open_mapped_doc({ + method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return", + frm: cur_frm + }) + }, + + asset: function(frm, cdt, cdn) { + var row = locals[cdt][cdn]; + if(row.asset) { + frappe.call({ + method: erpnext.accounts.doctype.asset.depreciation.get_disposal_account_and_cost_center, + args: { + "company": frm.doc.company + }, + callback: function(r, rt) { + frappe.model.set_value(cdt, cdn, "income_account", r.message[0]); + frappe.model.set_value(cdt, cdn, "cost_center", r.message[1]); + } + }) + } + }, + + is_pos: function(frm){ + if(this.frm.doc.is_pos) { + if(!this.frm.doc.company) { + this.frm.set_value("is_pos", 0); + frappe.msgprint(__("Please specify Company to proceed")); + } else { + var me = this; + return this.frm.call({ + doc: me.frm.doc, + method: "set_missing_values", + callback: function(r) { + if(!r.exc) { + if(r.message && r.message.print_format) { + frm.pos_print_format = r.message.print_format; + } + me.frm.script_manager.trigger("update_stock"); + frappe.model.set_default_values(me.frm.doc); + me.set_dynamic_labels(); + me.calculate_taxes_and_totals(); + } + } + }); + } + } + else this.frm.trigger("refresh") + }, + + amount: function(){ + this.write_off_outstanding_amount_automatically() + }, + + change_amount: function(){ + if(this.frm.doc.paid_amount > this.frm.doc.grand_total){ + this.calculate_write_off_amount() + }else { + this.frm.set_value("change_amount", 0.0) + this.frm.set_value("base_change_amount", 0.0) + } + + this.frm.refresh_fields(); + }, + + company_address: function() { + var me = this; + if(this.frm.doc.company_address) { + frappe.call({ + method: "frappe.contacts.doctype.address.address.get_address_display", + args: {"address_dict": this.frm.doc.company_address }, + callback: function(r) { + if(r.message) { + me.frm.set_value("company_address_display", r.message) + } + } + }) + } else { + this.frm.set_value("company_address_display", ""); + } + } +}); + +// for backward compatibility: combine new and previous states +$.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_frm})); + +// Hide Fields +// ------------ +cur_frm.cscript.hide_fields = function(doc) { + var parent_fields = ['project', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances', + 'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date']; + + if(cint(doc.is_pos) == 1) { + hide_field(parent_fields); + } else { + for (var i in parent_fields) { + var docfield = frappe.meta.docfield_map[doc.doctype][parent_fields[i]]; + if(!docfield.hidden) unhide_field(parent_fields[i]); + } + } + + // India related fields + if (frappe.boot.sysdefaults.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']); + else hide_field(['c_form_applicable', 'c_form_no']); + + this.frm.toggle_enable("write_off_amount", !!!cint(doc.write_off_outstanding_amount_automatically)); + + cur_frm.refresh_fields(); +} + +cur_frm.cscript.update_stock = function(doc, dt, dn) { + cur_frm.cscript.hide_fields(doc, dt, dn); + this.frm.fields_dict.items.grid.toggle_reqd("item_code", doc.update_stock? true: false) +} + +cur_frm.cscript['Make Delivery Note'] = function() { + frappe.model.open_mapped_doc({ + method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_delivery_note", + frm: cur_frm + }) +} + +cur_frm.fields_dict.cash_bank_account.get_query = function(doc) { + return { + filters: [ + ["Account", "account_type", "in", ["Cash", "Bank"]], + ["Account", "root_type", "=", "Asset"], + ["Account", "is_group", "=",0], + ["Account", "company", "=", doc.company] + ] + } +} + +cur_frm.fields_dict.write_off_account.get_query = function(doc) { + return{ + filters:{ + 'report_type': 'Profit and Loss', + 'is_group': 0, + 'company': doc.company + } + } +} + +// Write off cost center +//----------------------- +cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) { + return{ + filters:{ + 'is_group': 0, + 'company': doc.company + } + } +} + +//project name +//-------------------------- +cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) { + return{ + query: "erpnext.controllers.queries.get_project_name", + filters: {'customer': doc.customer} + } +} + +// Income Account in Details Table +// -------------------------------- +cur_frm.set_query("income_account", "items", function(doc) { + return{ + query: "erpnext.controllers.queries.get_income_account", + filters: {'company': doc.company} + } +}); + + +// Cost Center in Details Table +// ----------------------------- +cur_frm.fields_dict["items"].grid.get_field("cost_center").get_query = function(doc) { + return { + filters: { + 'company': doc.company, + "is_group": 0 + } + } +} + +cur_frm.cscript.income_account = function(doc, cdt, cdn) { + erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "income_account"); +} + +cur_frm.cscript.expense_account = function(doc, cdt, cdn) { + erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "expense_account"); +} + +cur_frm.cscript.cost_center = function(doc, cdt, cdn) { + erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "cost_center"); +} + +cur_frm.set_query("debit_to", function(doc) { + // filter on Account + if (doc.customer) { + return { + filters: { + 'account_type': 'Receivable', + 'is_group': 0, + 'company': doc.company + } + } + } else { + return { + filters: { + 'report_type': 'Balance Sheet', + 'is_group': 0, + 'company': doc.company + } + } + } +}); + +cur_frm.set_query("asset", "items", function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + return { + filters: [ + ["Asset", "item_code", "=", d.item_code], + ["Asset", "docstatus", "=", 1], + ["Asset", "status", "in", ["Submitted", "Partially Depreciated", "Fully Depreciated"]], + ["Asset", "company", "=", doc.company] + ] + } +}); + +frappe.ui.form.on('Sales Invoice', { + setup: function(frm){ + frm.custom_make_buttons = { + 'Delivery Note': 'Delivery', + 'Sales Invoice': 'Sales Return', + 'Payment Request': 'Payment Request', + 'Payment Entry': 'Payment' + }, + frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(doc, cdt, cdn){ + return{ + query: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet", + filters: {'project': doc.project} + } + } + + // expense account + frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) { + if (erpnext.is_perpetual_inventory_enabled(doc.company)) { + return { + filters: { + 'report_type': 'Profit and Loss', + 'company': doc.company, + "is_group": 0 + } + } + } + } + + frm.set_query('company_address', function(doc) { + if(!doc.company) { + frappe.throw(_('Please set Company')); + } + + return { + query: 'frappe.contacts.doctype.address.address.address_query', + filters: { + link_doctype: 'Company', + link_name: doc.company + } + }; + }); + }, + + project: function(frm){ + frm.call({ + method: "add_timesheet_data", + doc: frm.doc, + callback: function(r, rt) { + refresh_field(['timesheets']) + } + }) + } +}) + +frappe.ui.form.on('Sales Invoice Timesheet', { + time_sheet: function(frm, cdt, cdn){ + var d = locals[cdt][cdn]; + if(d.time_sheet) { + frappe.call({ + method: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet_data", + args: { + 'name': d.time_sheet, + 'project': frm.doc.project || null + }, + callback: function(r, rt) { + if(r.message){ + data = r.message; + frappe.model.set_value(cdt, cdn, "billing_hours", data.billing_hours); + frappe.model.set_value(cdt, cdn, "billing_amount", data.billing_amount); + frappe.model.set_value(cdt, cdn, "timesheet_detail", data.timesheet_detail); + calculate_total_billing_amount(frm) + } + } + }) + } + } +}) + +var calculate_total_billing_amount = function(frm) { + var doc = frm.doc; + + doc.total_billing_amount = 0.0 + if(doc.timesheets) { + $.each(doc.timesheets, function(index, data){ + doc.total_billing_amount += data.billing_amount + }) + } + + refresh_field('total_billing_amount') +} diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 9aa0e6b6a..f0a99e5a2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -543,6 +543,188 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "reference_information", + "fieldtype": "Section Break", + "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": "Reference Information", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "quotation_number", + "fieldtype": "Data", + "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": "Quotation Number", + "length": 0, + "no_copy": 0, + "options": "", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sales_order", + "fieldtype": "Link", + "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": "Sales Order", + "length": 0, + "no_copy": 0, + "options": "Sales Order", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "cb23", + "fieldtype": "Column Break", + "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": "", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "po_no", + "fieldtype": "Data", + "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": "Customer's Purchase Order", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "po_date", + "fieldtype": "Data", + "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": "Customer's Purchase Order Date", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -4811,7 +4993,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-19 11:23:08.675028", + "modified": "2017-11-14 12:58:58.140608", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/fixtures/web_form.json b/erpnext/fixtures/web_form.json new file mode 100644 index 000000000..13bfca715 --- /dev/null +++ b/erpnext/fixtures/web_form.json @@ -0,0 +1,1616 @@ +[ + { + "accept_payment": 0, + "allow_comments": 1, + "allow_delete": 1, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": "[{\"title\":\"Tasks\", \"name\":\"tasks\"}]", + "currency": null, + "doc_type": "Task", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": null, + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2016-08-06 11:59:21.494549", + "module": "Projects", + "name": "tasks", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "tasks", + "show_sidebar": 0, + "sidebar_items": [], + "success_message": null, + "success_url": "", + "title": "Task", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "project", + "fieldtype": "Link", + "hidden": 0, + "label": "Project", + "max_length": 0, + "max_value": 0, + "options": "Project", + "read_only": 1, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "subject", + "fieldtype": "Data", + "hidden": 0, + "label": "Subject", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "label": "Status", + "max_length": 0, + "max_value": 0, + "options": "Open\nClosed\nCancelled", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "description", + "fieldtype": "Text", + "hidden": 0, + "label": "Details", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "priority", + "fieldtype": "Select", + "hidden": 0, + "label": "Priority", + "max_length": 0, + "max_value": 0, + "options": "Low\nMedium\nHigh\nUrgent", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "exp_start_date", + "fieldtype": "Date", + "hidden": 0, + "label": "Expected Start Date", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "exp_end_date", + "fieldtype": "Date", + "hidden": 0, + "label": "Expected End Date", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 1, + "allow_delete": 1, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": "[{\"label\":_(\"Issues\"), \"route\":\"issues\"}]", + "currency": null, + "doc_type": "Issue", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-07-25 22:49:10.762704", + "module": "Support", + "name": "issues", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "issues", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": "", + "success_url": "/issues", + "title": "Issue", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "subject", + "fieldtype": "Data", + "hidden": 0, + "label": "Subject", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": "Open", + "description": null, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "label": "Status", + "max_length": 0, + "max_value": 0, + "options": "Open\nReplied\nHold\nClosed", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "customer", + "fieldtype": "Data", + "hidden": 0, + "label": "Customer", + "max_length": 0, + "max_value": 0, + "options": "Customer", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "description", + "fieldtype": "Text", + "hidden": 0, + "label": "Description", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "attachment", + "fieldtype": "Attach", + "hidden": 0, + "label": "Attachment", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": null, + "doc_type": "Address", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": null, + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2016-12-07 04:17:02.020768", + "module": "Utilities", + "name": "addresses", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "address", + "show_sidebar": 0, + "sidebar_items": [], + "success_message": null, + "success_url": "/addresses", + "title": "Address", + "web_form_fields": [ + { + "default": null, + "description": "", + "fieldname": "address_title", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Title", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "address_type", + "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 + }, + { + "default": null, + "description": null, + "fieldname": "address_line1", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 1", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "address_line2", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 2", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "city", + "fieldtype": "Data", + "hidden": 0, + "label": "City/Town", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "state", + "fieldtype": "Data", + "hidden": 0, + "label": "State", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "label": "Postal Code", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "country", + "fieldtype": "Link", + "hidden": 0, + "label": "Country", + "max_length": 0, + "max_value": 0, + "options": "Country", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": null, + "fieldtype": "Column Break", + "hidden": 0, + "label": null, + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "email_id", + "fieldtype": "Data", + "hidden": 0, + "label": "Email Address", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "phone", + "fieldtype": "Data", + "hidden": 0, + "label": "Phone", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": "0", + "description": "", + "fieldname": "is_primary_address", + "fieldtype": "Check", + "hidden": 0, + "label": "Preferred Billing Address", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": "0", + "description": "", + "fieldname": "is_shipping_address", + "fieldtype": "Check", + "hidden": 0, + "label": "Preferred Shipping Address", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 1, + "allow_delete": 1, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": null, + "doc_type": "Discussion", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": null, + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2016-07-19 07:55:37.826664", + "module": "Schools", + "name": "discussion", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "discussion", + "show_sidebar": 0, + "sidebar_items": [], + "success_message": null, + "success_url": "", + "title": "Discussion", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "course", + "fieldtype": "Data", + "hidden": 0, + "label": "Course", + "max_length": 0, + "max_value": 0, + "options": "Course", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "subject", + "fieldtype": "Text", + "hidden": 0, + "label": "Subject", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "description", + "fieldtype": "Text", + "hidden": 0, + "label": "Description", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 1, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": null, + "doc_type": "Job Applicant", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "", + "is_standard": 1, + "login_required": 0, + "max_attachment_size": 0, + "modified": "2016-12-20 00:21:44.081622", + "module": "HR", + "name": "job-application", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "job_application", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": "Thank you for applying.", + "success_url": "/jobs", + "title": "Job Application", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "job_title", + "fieldtype": "Data", + "hidden": 0, + "label": "Job Opening", + "max_length": 0, + "max_value": 0, + "options": "", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "applicant_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Applicant Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "email_id", + "fieldtype": "Data", + "hidden": 0, + "label": "Email Address", + "max_length": 0, + "max_value": 0, + "options": "Email", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "cover_letter", + "fieldtype": "Text", + "hidden": 0, + "label": "Cover Letter", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "resume_attachment", + "fieldtype": "Attach", + "hidden": 0, + "label": "Resume Attachment", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 0, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": "[{\"title\": _(\"My Account\"), \"route\": \"me\"}]", + "currency": null, + "doc_type": "User", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-07-24 12:14:04.039284", + "module": "Core", + "name": "edit-profile", + "payment_button_help": null, + "payment_button_label": null, + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "update-profile", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": "Profile updated successfully.", + "success_url": "/me", + "title": "Update Profile", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "first_name", + "fieldtype": "Data", + "hidden": 0, + "label": "First Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "middle_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Middle Name (Optional)", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "last_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Last Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": "", + "fieldname": "user_image", + "fieldtype": "Attach", + "hidden": 0, + "label": "User Image", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": null, + "fieldtype": "Section Break", + "hidden": 0, + "label": "More Information", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "phone", + "fieldtype": "Data", + "hidden": 0, + "label": "Phone", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "mobile_no", + "fieldtype": "Data", + "hidden": 0, + "label": "Mobile Number", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": "", + "fieldname": "language", + "fieldtype": "Link", + "hidden": 0, + "label": "Language", + "max_length": 0, + "max_value": 0, + "options": "Language", + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": null, + "doc_type": "Student Applicant", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": null, + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-02-21 04:44:46.022738", + "module": "Schools", + "name": "student-applicant", + "payment_button_help": null, + "payment_button_label": "Buy Now", + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "student-applicant", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": null, + "success_url": "/student-applicant", + "title": "Student Applicant", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "first_name", + "fieldtype": "Data", + "hidden": 0, + "label": "First Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "middle_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Middle Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "last_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Last Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "image", + "fieldtype": "Data", + "hidden": 0, + "label": "Image", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "program", + "fieldtype": "Link", + "hidden": 0, + "label": "Program", + "max_length": 0, + "max_value": 0, + "options": "Program", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "academic_year", + "fieldtype": "Link", + "hidden": 0, + "label": "Academic Year", + "max_length": 0, + "max_value": 0, + "options": "Academic Year", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "date_of_birth", + "fieldtype": "Date", + "hidden": 0, + "label": "Date of Birth", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "blood_group", + "fieldtype": "Select", + "hidden": 0, + "label": "Blood Group", + "max_length": 0, + "max_value": 0, + "options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "student_email_id", + "fieldtype": "Data", + "hidden": 0, + "label": "Student Email ID", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "student_mobile_number", + "fieldtype": "Data", + "hidden": 0, + "label": "Student Mobile Number", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": "INDIAN", + "description": null, + "fieldname": "nationality", + "fieldtype": "Data", + "hidden": 0, + "label": "Nationality", + "max_length": 0, + "max_value": 0, + "options": "", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "address_line_1", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 1", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "address_line_2", + "fieldtype": "Data", + "hidden": 0, + "label": "Address Line 2", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "label": "Pincode", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "guardians", + "fieldtype": "Table", + "hidden": 0, + "label": "Guardians", + "max_length": 0, + "max_value": 0, + "options": "Student Guardian", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "siblings", + "fieldtype": "Table", + "hidden": 0, + "label": "Siblings", + "max_length": 0, + "max_value": 0, + "options": "Student Sibling", + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 1, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": "INR", + "doc_type": "Lab Test", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "Lab Test", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-06-07 16:03:06.781364", + "module": "Healthcare", + "name": "lab-test", + "payment_button_help": null, + "payment_button_label": "Buy Now", + "payment_gateway": null, + "print_format": "Lab Test Print", + "published": 1, + "route": "lab-test", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": null, + "success_url": "/lab-test", + "title": "Lab Test", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "naming_series", + "fieldtype": "Select", + "hidden": 0, + "label": "Series", + "max_length": 0, + "max_value": 0, + "options": "LP-", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "invoice", + "fieldtype": "Link", + "hidden": 0, + "label": "Invoice", + "max_length": 0, + "max_value": 0, + "options": "Sales Invoice", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "patient", + "fieldtype": "Link", + "hidden": 0, + "label": "Patient", + "max_length": 0, + "max_value": 0, + "options": "Patient", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "patient_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Patient Name", + "max_length": 0, + "max_value": 0, + "options": "patient.patient_name", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "physician", + "fieldtype": "Link", + "hidden": 0, + "label": "Doctor", + "max_length": 0, + "max_value": 0, + "options": "Physician", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "label": "Status", + "max_length": 0, + "max_value": 0, + "options": "Draft\nCompleted\nApproved\nRejected\nCancelled", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "label": "Department", + "max_length": 0, + "max_value": 0, + "options": "Medical Department", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "sample", + "fieldtype": "Link", + "hidden": 0, + "label": "Sample ID", + "max_length": 0, + "max_value": 0, + "options": "Sample Collection", + "read_only": 0, + "reqd": 0 + }, + { + "default": "", + "description": null, + "fieldname": "result_date", + "fieldtype": "Date", + "hidden": 0, + "label": "Result Date", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "report_preference", + "fieldtype": "Data", + "hidden": 0, + "label": "Report Preference", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "test_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Test Name", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "normal_test_items", + "fieldtype": "Table", + "hidden": 0, + "label": null, + "max_length": 0, + "max_value": 0, + "options": "Normal Test Items", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "special_test_items", + "fieldtype": "Table", + "hidden": 0, + "label": null, + "max_length": 0, + "max_value": 0, + "options": "Special Test Items", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "sensitivity_test_items", + "fieldtype": "Table", + "hidden": 0, + "label": null, + "max_length": 0, + "max_value": 0, + "options": "Sensitivity Test Items", + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "test_comment", + "fieldtype": "Text", + "hidden": 0, + "label": "Comments", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 1, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "custom_result", + "fieldtype": "Text Editor", + "hidden": 0, + "label": "Custom Result", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 1, + "reqd": 0 + }, + { + "default": "0", + "description": null, + "fieldname": "sensitivity_toggle", + "fieldtype": "Check", + "hidden": 1, + "label": null, + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": "0", + "description": null, + "fieldname": "special_toggle", + "fieldtype": "Check", + "hidden": 1, + "label": null, + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": "0", + "description": null, + "fieldname": "normal_toggle", + "fieldtype": "Check", + "hidden": 1, + "label": null, + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 1, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": "INR", + "doc_type": "Consultation", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "Patient Prescriptions", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-06-20 11:56:05.132154", + "module": "Healthcare", + "name": "prescription", + "payment_button_help": null, + "payment_button_label": "Buy Now", + "payment_gateway": null, + "print_format": "Consultation Print", + "published": 1, + "route": "prescription", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": null, + "success_url": "/prescription", + "title": "Prescription", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "physician", + "fieldtype": "Link", + "hidden": 0, + "label": "Doctor", + "max_length": 0, + "max_value": 0, + "options": "Physician", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "visit_department", + "fieldtype": "Link", + "hidden": 0, + "label": "Department", + "max_length": 0, + "max_value": 0, + "options": "Medical Department", + "read_only": 0, + "reqd": 0 + }, + { + "default": "Today", + "description": null, + "fieldname": "consultation_date", + "fieldtype": "Date", + "hidden": 0, + "label": "Consultation Date", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": "", + "description": null, + "fieldname": "consultation_time", + "fieldtype": "Data", + "hidden": 0, + "label": "Consultation Time", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "drug_prescription", + "fieldtype": "Table", + "hidden": 0, + "label": "Drug Prescription", + "max_length": 0, + "max_value": 0, + "options": "Drug Prescription", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "test_prescription", + "fieldtype": "Table", + "hidden": 0, + "label": "Investigations", + "max_length": 0, + "max_value": 0, + "options": "Lab Prescription", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "consultation_comment", + "fieldtype": "Small Text", + "hidden": 0, + "label": "Review Details", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 0, + "allow_multiple": 1, + "allow_print": 1, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": "INR", + "doc_type": "Patient Appointment", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "Patient Appointments", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-06-07 15:57:27.196428", + "module": "Healthcare", + "name": "patient-appointments", + "payment_button_help": null, + "payment_button_label": "Buy Now", + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "patient-appointments", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": null, + "success_url": "/patient-appointments", + "title": "Patient Appointments", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": "patient", + "fieldtype": "Link", + "hidden": 0, + "label": "Patient", + "max_length": 0, + "max_value": 0, + "options": "Patient", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "physician", + "fieldtype": "Link", + "hidden": 0, + "label": "Physician", + "max_length": 0, + "max_value": 0, + "options": "Physician", + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "appointment_date", + "fieldtype": "Date", + "hidden": 0, + "label": "Date", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 1 + }, + { + "default": null, + "description": null, + "fieldname": "appointment_time", + "fieldtype": "Data", + "hidden": 0, + "label": "Time", + "max_length": 0, + "max_value": 0, + "options": null, + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "department", + "fieldtype": "Link", + "hidden": 0, + "label": "Department", + "max_length": 0, + "max_value": 0, + "options": "Medical Department", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "appointment_type", + "fieldtype": "Link", + "hidden": 0, + "label": "Type", + "max_length": 0, + "max_value": 0, + "options": "Appointment Type", + "read_only": 0, + "reqd": 0 + }, + { + "default": "Scheduled", + "description": null, + "fieldname": "status", + "fieldtype": "Select", + "hidden": 0, + "label": "Status", + "max_length": 0, + "max_value": 0, + "options": "\nScheduled\nOpen\nClosed\nPending\nCancelled", + "read_only": 1, + "reqd": 0 + } + ], + "web_page_link_text": null + }, + { + "accept_payment": 0, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 1, + "allow_incomplete": 1, + "allow_multiple": 1, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 0, + "amount_field": null, + "breadcrumbs": null, + "currency": "INR", + "doc_type": "Dispatch Items", + "docstatus": 0, + "doctype": "Web Form", + "introduction_text": "", + "is_standard": 0, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-09-14 10:14:01.771759", + "module": "Projects", + "name": "dispatch", + "payment_button_help": null, + "payment_button_label": "Buy Now", + "payment_gateway": null, + "print_format": null, + "published": 1, + "route": "dispatch", + "show_sidebar": 1, + "sidebar_items": [], + "success_message": "done", + "success_url": "/me", + "title": "Dispatch", + "web_form_fields": [ + { + "default": null, + "description": null, + "fieldname": null, + "fieldtype": "Table", + "hidden": 0, + "label": null, + "max_length": 0, + "max_value": 0, + "options": "Dispatch", + "read_only": 0, + "reqd": 0 + }, + { + "default": null, + "description": null, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 0, + "label": "Amended From", + "max_length": 0, + "max_value": 0, + "options": "Dispatch", + "read_only": 0, + "reqd": 0 + } + ], + "web_page_link_text": null + } +] \ No newline at end of file diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json index 101e4ff1c..1a2d7b499 100644 --- a/erpnext/projects/doctype/project/project.json +++ b/erpnext/projects/doctype/project/project.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, - "autoname": "field:project_name", + "autoname": "PRJ-.#####./2018-19", "beta": 0, "creation": "2013-03-07 11:55:07", "custom": 0, @@ -1255,8 +1255,8 @@ "issingle": 0, "istable": 0, "max_attachments": 4, - "modified": "2017-07-26 14:36:20.857673", - "modified_by": "Administrator", + "modified": "2018-04-02 16:57:58.995668", + "modified_by": "basant.mahar9819@gmail.com", "module": "Projects", "name": "Project", "owner": "Administrator", @@ -1320,6 +1320,46 @@ "share": 1, "submit": 0, "write": 1 + }, + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Installation Engineer", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 0 + }, + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 3, + "print": 1, + "read": 1, + "report": 1, + "role": "Installation Engineer", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 } ], "quick_entry": 1, diff --git a/erpnext/projects/doctype/project/project_dashboard.py b/erpnext/projects/doctype/project/project_dashboard.py index 0ac7d6fc3..7623a3aae 100644 --- a/erpnext/projects/doctype/project/project_dashboard.py +++ b/erpnext/projects/doctype/project/project_dashboard.py @@ -16,7 +16,7 @@ def get_data(): }, { 'label': _('Sales'), - 'items': ['Sales Order', 'Delivery Note', 'Sales Invoice'] + 'items': ['Quotation','Sales Order', 'Delivery Note', 'Sales Invoice','Dispatch Items'] }, { 'label': _('Purchase'), diff --git a/erpnext/projects/doctype/project/project_dashboard.py.old b/erpnext/projects/doctype/project/project_dashboard.py.old new file mode 100755 index 000000000..0ac7d6fc3 --- /dev/null +++ b/erpnext/projects/doctype/project/project_dashboard.py.old @@ -0,0 +1,26 @@ +from frappe import _ + +def get_data(): + return { + 'heatmap': True, + 'heatmap_message': _('This is based on the Time Sheets created against this project'), + 'fieldname': 'project', + 'transactions': [ + { + 'label': _('Project'), + 'items': ['Task', 'Timesheet', 'Expense Claim', 'Issue'] + }, + { + 'label': _('Material'), + 'items': ['Material Request', 'BOM', 'Stock Entry'] + }, + { + 'label': _('Sales'), + 'items': ['Sales Order', 'Delivery Note', 'Sales Invoice'] + }, + { + 'label': _('Purchase'), + 'items': ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'] + }, + ] + } diff --git a/erpnext/projects/doctype/project/project_dashboard.py_1209 b/erpnext/projects/doctype/project/project_dashboard.py_1209 new file mode 100755 index 000000000..94790e1b0 --- /dev/null +++ b/erpnext/projects/doctype/project/project_dashboard.py_1209 @@ -0,0 +1,26 @@ +from frappe import _ + +def get_data(): + return { + 'heatmap': True, + 'heatmap_message': _('This is based on the Time Sheets created against this project'), + 'fieldname': 'project', + 'transactions': [ + { + 'label': _('Project'), + 'items': ['Task', 'Timesheet', 'Expense Claim', 'Issue'] + }, + { + 'label': _('Material'), + 'items': ['Material Request', 'BOM', 'Stock Entry'] + }, + { + 'label': _('Sales'), + 'items': ['Quotation','Sales Order', 'Delivery Note', 'Sales Invoice'] + }, + { + 'label': _('Purchase'), + 'items': ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'] + }, + ] + } diff --git a/erpnext/projects/doctype/project/project_dashboard.py_final b/erpnext/projects/doctype/project/project_dashboard.py_final new file mode 100644 index 000000000..440fcff44 --- /dev/null +++ b/erpnext/projects/doctype/project/project_dashboard.py_final @@ -0,0 +1,26 @@ +from frappe import _ + +def get_data(): + return { + 'heatmap': True, + 'heatmap_message': _('This is based on the Time Sheets created against this project'), + 'fieldname': 'project', + 'transactions': [ + { + 'label': _('Project'), + 'items': ['Task', 'Timesheet', 'Expense Claim', 'Issue'] + }, + { + 'label': _('Material'), + 'items': ['Material Request', 'BOM', 'Stock Entry'] + }, + { + 'label': _('Sales'), + 'items': ['Quotation','Sales Order', 'Delivery Note', 'Sales Invoice','Dispatch'] + }, + { + 'label': _('Purchase'), + 'items': ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'] + }, + ] + } diff --git a/erpnext/projects/doctype/project/test_project.js b/erpnext/projects/doctype/project/test_project.js new file mode 100644 index 000000000..16494f62b --- /dev/null +++ b/erpnext/projects/doctype/project/test_project.js @@ -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: Project", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Project + () => frappe.tests.make('Project', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/regional/print_format/gst_tax_invoice/gst_tax_invoice.json b/erpnext/regional/print_format/gst_tax_invoice/gst_tax_invoice.json index 55d870f99..0d26d0937 100644 --- a/erpnext/regional/print_format/gst_tax_invoice/gst_tax_invoice.json +++ b/erpnext/regional/print_format/gst_tax_invoice/gst_tax_invoice.json @@ -7,11 +7,11 @@ "docstatus": 0, "doctype": "Print Format", "font": "Default", - "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"
(Original For Recipient)
\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"company\", \"label\": \"Company\"}, {\"print_hide\": 0, \"fieldname\": \"company_address_display\", \"label\": \"Company Address\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"posting_date\", \"label\": \"Date\"}, {\"print_hide\": 0, \"fieldname\": \"due_date\", \"label\": \"Payment Due Date\"}, {\"print_hide\": 0, \"fieldname\": \"po_no\", \"align\": \"left\", \"label\": \"Customer's Purchase Order\"}, {\"print_hide\": 0, \"fieldname\": \"po_date\", \"label\": \"Customer's Purchase Order Date\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"options\": \"\\n
\\n\\n
(Duplicate For Transportor)
\\n\\n
\\n\\n
(Triplicate For Supplier)
\\n