[#2253] Rearrange To/From fields and depend on is_recurring in SI,SO,PI,PO
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index d91c53c..153b8d8 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -143,24 +143,6 @@
"search_index": 1
},
{
- "allow_on_submit": 1,
- "description": "Start date of current invoice's period",
- "fieldname": "from_date",
- "fieldtype": "Date",
- "label": "From Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
- "allow_on_submit": 1,
- "description": "End date of current invoice's period",
- "fieldname": "to_date",
- "fieldtype": "Date",
- "label": "To Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
"fieldname": "amended_from",
"fieldtype": "Link",
"ignore_user_permissions": 1,
@@ -801,6 +783,26 @@
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
+ "description": "Start date of current invoice's period",
+ "fieldname": "from_date",
+ "fieldtype": "Date",
+ "label": "From Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
+ "description": "End date of current invoice's period",
+ "fieldname": "to_date",
+ "fieldtype": "Date",
+ "label": "To Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
@@ -822,17 +824,6 @@
"print_hide": 1
},
{
- "depends_on": "eval:doc.is_recurring==1",
- "description": "The date on which next invoice will be generated. It is generated on submit.",
- "fieldname": "next_date",
- "fieldtype": "Date",
- "label": "Next Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
@@ -852,6 +843,17 @@
},
{
"depends_on": "eval:doc.is_recurring==1",
+ "description": "The date on which next invoice will be generated. It is generated on submit.",
+ "fieldname": "next_date",
+ "fieldtype": "Date",
+ "label": "Next Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices. It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
@@ -876,7 +878,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
- "modified": "2014-09-18 03:12:51.994059",
+ "modified": "2014-10-06 12:57:32.064210",
"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 4462ac6..21c96e7 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -169,30 +169,6 @@
"search_index": 0
},
{
- "allow_on_submit": 1,
- "depends_on": "",
- "description": "Start date of current invoice's period",
- "fieldname": "from_date",
- "fieldtype": "Date",
- "label": "From Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0
- },
- {
- "allow_on_submit": 1,
- "depends_on": "",
- "description": "End date of current invoice's period",
- "fieldname": "to_date",
- "fieldtype": "Date",
- "label": "To Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 0,
- "read_only": 0
- },
- {
"fieldname": "currency_section",
"fieldtype": "Section Break",
"label": "Currency and Price List",
@@ -1098,6 +1074,30 @@
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
+ "description": "End date of current invoice's period",
+ "fieldname": "to_date",
+ "fieldtype": "Date",
+ "label": "To Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
+ "description": "Start date of current invoice's period",
+ "fieldname": "from_date",
+ "fieldtype": "Date",
+ "label": "From Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 0,
+ "read_only": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
@@ -1121,17 +1121,6 @@
"read_only": 0
},
{
- "depends_on": "eval:doc.is_recurring==1",
- "description": "The date on which next invoice will be generated. It is generated on submit.\n",
- "fieldname": "next_date",
- "fieldtype": "Date",
- "label": "Next Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring invoice will be stop",
@@ -1154,6 +1143,17 @@
},
{
"depends_on": "eval:doc.is_recurring==1",
+ "description": "The date on which next invoice will be generated. It is generated on submit.\n",
+ "fieldname": "next_date",
+ "fieldtype": "Date",
+ "label": "Next Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "depends_on": "eval:doc.is_recurring==1",
"description": "The unique id for tracking all recurring invoices.\u00a0It is generated on submit.",
"fieldname": "recurring_id",
"fieldtype": "Data",
@@ -1192,7 +1192,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
- "modified": "2014-09-18 03:17:54.976732",
+ "modified": "2014-10-06 12:54:42.549361",
"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 142781c..8380e86 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -102,24 +102,6 @@
"search_index": 1
},
{
- "allow_on_submit": 1,
- "description": "Start date of current order's period",
- "fieldname": "from_date",
- "fieldtype": "Date",
- "label": "From Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
- "allow_on_submit": 1,
- "description": "End date of current order's period",
- "fieldname": "to_date",
- "fieldtype": "Date",
- "label": "To Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
@@ -698,6 +680,26 @@
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
+ "description": "Start date of current order's period",
+ "fieldname": "from_date",
+ "fieldtype": "Date",
+ "label": "From Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
+ "description": "End date of current order's period",
+ "fieldname": "to_date",
+ "fieldtype": "Date",
+ "label": "To Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
"fieldname": "recurring_type",
"fieldtype": "Select",
"label": "Recurring Type",
@@ -717,17 +719,6 @@
"print_hide": 1
},
{
- "depends_on": "eval:doc.is_recurring==1",
- "description": "The date on which next invoice will be generated. It is generated on submit.",
- "fieldname": "next_date",
- "fieldtype": "Date",
- "label": "Next Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring order will be stop",
@@ -747,6 +738,17 @@
},
{
"depends_on": "eval:doc.is_recurring==1",
+ "description": "The date on which next invoice will be generated. It is generated on submit.",
+ "fieldname": "next_date",
+ "fieldtype": "Date",
+ "label": "Next Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "depends_on": "eval:doc.is_recurring==1",
"fieldname": "recurring_id",
"fieldtype": "Data",
"label": "Recurring Id",
@@ -770,7 +772,7 @@
"icon": "icon-file-text",
"idx": 1,
"is_submittable": 1,
- "modified": "2014-09-18 03:16:06.299317",
+ "modified": "2014-10-06 12:16:44.453946",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index c22ed3f..5af9a26 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -170,24 +170,6 @@
"width": "160px"
},
{
- "allow_on_submit": 1,
- "description": "Start date of current order's period",
- "fieldname": "from_date",
- "fieldtype": "Date",
- "label": "From Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
- "allow_on_submit": 1,
- "description": "End date of current order's period",
- "fieldname": "to_date",
- "fieldtype": "Date",
- "label": "To Date",
- "no_copy": 1,
- "permlevel": 0
- },
- {
"description": "Customer's Purchase Order Number",
"fieldname": "po_no",
"fieldtype": "Data",
@@ -942,6 +924,26 @@
{
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
+ "description": "Start date of current order's period",
+ "fieldname": "from_date",
+ "fieldtype": "Date",
+ "label": "From Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
+ "description": "End date of current order's period",
+ "fieldname": "to_date",
+ "fieldtype": "Date",
+ "label": "To Date",
+ "no_copy": 1,
+ "permlevel": 0
+ },
+ {
+ "allow_on_submit": 1,
+ "depends_on": "eval:doc.is_recurring==1",
"description": "Select the period when the invoice will be generated automatically",
"fieldname": "recurring_type",
"fieldtype": "Select",
@@ -963,17 +965,6 @@
"print_hide": 1
},
{
- "depends_on": "eval:doc.is_recurring==1",
- "description": "The date on which next invoice will be generated. It is generated on submit.",
- "fieldname": "next_date",
- "fieldtype": "Date",
- "label": "Next Date",
- "no_copy": 1,
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 1
- },
- {
"allow_on_submit": 1,
"depends_on": "eval:doc.is_recurring==1",
"description": "The date on which recurring order will be stop",
@@ -993,6 +984,17 @@
},
{
"depends_on": "eval:doc.is_recurring==1",
+ "description": "The date on which next invoice will be generated. It is generated on submit.",
+ "fieldname": "next_date",
+ "fieldtype": "Date",
+ "label": "Next Date",
+ "no_copy": 1,
+ "permlevel": 0,
+ "print_hide": 1,
+ "read_only": 1
+ },
+ {
+ "depends_on": "eval:doc.is_recurring==1",
"fieldname": "recurring_id",
"fieldtype": "Data",
"label": "Recurring Id",
@@ -1018,7 +1020,7 @@
"idx": 1,
"is_submittable": 1,
"issingle": 0,
- "modified": "2014-09-18 03:17:33.241162",
+ "modified": "2014-10-06 12:16:41.256013",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",