Merge pull request #7830 from mbauskar/develop

[minor] eval conditions for recurring sections and lead fields
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 2b3a596..ff3a168 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -3098,7 +3098,7 @@
    "collapsible": 1, 
    "collapsible_depends_on": "is_recurring", 
    "columns": 0, 
-   "depends_on": "eval:doc.docstatus<2", 
+   "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", 
    "fieldname": "recurring_invoice", 
    "fieldtype": "Section Break", 
    "hidden": 0, 
@@ -3527,7 +3527,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-02-17 16:30:09.952106", 
+ "modified": "2017-02-22 18:16:09.890488", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Invoice", 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 4102aba..ae8fd8a 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -3836,7 +3836,7 @@
    "collapsible": 1, 
    "collapsible_depends_on": "is_recurring", 
    "columns": 0, 
-   "depends_on": "eval:doc.docstatus<2", 
+   "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", 
    "fieldname": "recurring_invoice", 
    "fieldtype": "Section Break", 
    "hidden": 0, 
@@ -3846,7 +3846,7 @@
    "in_global_search": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
-   "label": "Recurring", 
+   "label": "Recurring Invoice", 
    "length": 0, 
    "no_copy": 0, 
    "options": "fa fa-time", 
@@ -4327,7 +4327,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-02-17 16:12:30.694315", 
+ "modified": "2017-02-22 18:20:35.085909", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice", 
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index a53d674..09ffe71 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -2710,6 +2710,7 @@
    "collapsible": 1, 
    "collapsible_depends_on": "is_recurring", 
    "columns": 0, 
+   "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", 
    "fieldname": "recurring_order", 
    "fieldtype": "Section Break", 
    "hidden": 0, 
@@ -2719,7 +2720,7 @@
    "in_global_search": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
-   "label": "Recurring", 
+   "label": "Recurring Order", 
    "length": 0, 
    "no_copy": 0, 
    "options": "fa fa-time", 
@@ -3167,7 +3168,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-02-17 16:46:02.996638", 
+ "modified": "2017-02-22 18:20:15.650815", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Purchase Order", 
diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json
index a7ce5e0..17c4022 100644
--- a/erpnext/crm/doctype/lead/lead.json
+++ b/erpnext/crm/doctype/lead/lead.json
@@ -227,6 +227,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
+   "depends_on": "", 
    "fieldname": "source", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -258,7 +259,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:doc.source == 'Customer'", 
+   "depends_on": "eval:doc.source == 'Existing Customer'", 
    "fieldname": "customer", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -290,7 +291,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "", 
+   "depends_on": "eval: doc.source==\"Campaign\"", 
    "description": "", 
    "fieldname": "campaign_name", 
    "fieldtype": "Link", 
@@ -1048,7 +1049,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-02-17 16:38:16.833577", 
+ "modified": "2017-02-22 18:53:16.231035", 
  "modified_by": "Administrator", 
  "module": "CRM", 
  "name": "Lead", 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 56ea135..4937522 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -3026,6 +3026,7 @@
    "collapsible": 1, 
    "collapsible_depends_on": "is_recurring", 
    "columns": 0, 
+   "depends_on": "eval:doc.docstatus<2 && !doc.__islocal", 
    "fieldname": "recurring_order", 
    "fieldtype": "Section Break", 
    "hidden": 0, 
@@ -3484,7 +3485,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-02-20 13:22:41.755708", 
+ "modified": "2017-02-22 18:17:15.293694", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Sales Order",