[fixes] add posting time
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index b2657e1..d35d0c4 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -262,9 +262,6 @@
    "label": "Company", 
    "length": 0, 
    "no_copy": 0, 
-   "oldfieldname": "company", 
-   "oldfieldtype": "Link", 
-   "options": "Company", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -812,6 +809,7 @@
    "fieldtype": "Check", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Make Receipt (Update Stock)", 
@@ -1698,6 +1696,7 @@
    "fieldtype": "Section Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Payments", 
@@ -1722,6 +1721,7 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Mode of Payment", 
@@ -1748,6 +1748,7 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Cash/Bank Account", 
@@ -1773,6 +1774,7 @@
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "length": 0, 
@@ -1796,6 +1798,7 @@
    "fieldtype": "Currency", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Paid Amount", 
@@ -1821,6 +1824,7 @@
    "fieldtype": "Currency", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Paid Amount (Company Currency)", 
@@ -2173,31 +2177,6 @@
    "unique": 0
   }, 
   {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "fieldname": "language", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Print Language", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
@@ -2438,21 +2417,48 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "fieldname": "mode_of_payment", 
-   "fieldtype": "Link", 
+   "fieldname": "posting_time", 
+   "fieldtype": "Time", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Mode of Payment", 
+   "label": "Posting Time", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
+   "width": "100px"
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "fieldname": "fiscal_year", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 1, 
+   "in_list_view": 0, 
+   "label": "Fiscal Year", 
    "length": 0, 
    "no_copy": 0, 
-   "oldfieldname": "mode_of_payment", 
+   "oldfieldname": "fiscal_year", 
    "oldfieldtype": "Select", 
-   "options": "Mode of Payment", 
+   "options": "Fiscal Year", 
    "permlevel": 0, 
-   "print_hide": 0, 
+   "print_hide": 1, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
@@ -2544,35 +2550,8 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "is_recurring", 
-   "description": "", 
-   "fieldname": "recurring_id", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Reference Document", 
-   "length": 0, 
-   "no_copy": 1, 
-   "options": "Purchase Invoice", 
-   "permlevel": 0, 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name", 
-   "description": "", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "Select the period when the invoice will be generated automatically", 
    "fieldname": "recurring_type", 
    "fieldtype": "Select", 
    "hidden": 0, 
@@ -2580,7 +2559,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Frequency", 
+   "label": "Recurring Type", 
    "length": 0, 
    "no_copy": 1, 
    "options": "Monthly\nQuarterly\nHalf-yearly\nYearly", 
@@ -2598,16 +2577,16 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name", 
-   "description": "", 
-   "fieldname": "repeat_on_day_of_month", 
-   "fieldtype": "Int", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "Start date of current invoice's period", 
+   "fieldname": "from_date", 
+   "fieldtype": "Date", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Repeat on Day of Month", 
+   "label": "From Date", 
    "length": 0, 
    "no_copy": 1, 
    "permlevel": 0, 
@@ -2624,16 +2603,16 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name", 
-   "description": "", 
-   "fieldname": "end_date", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "End date of current invoice's period", 
+   "fieldname": "to_date", 
    "fieldtype": "Date", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Recurring Ends On", 
+   "label": "To Date", 
    "length": 0, 
    "no_copy": 1, 
    "permlevel": 0, 
@@ -2676,20 +2655,19 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name", 
-   "description": "", 
-   "fieldname": "notify_by_email", 
-   "fieldtype": "Check", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "The day of the month on which auto invoice will be generated e.g. 05, 28 etc", 
+   "fieldname": "repeat_on_day_of_month", 
+   "fieldtype": "Int", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Notify by email", 
+   "label": "Repeat on Day of Month", 
    "length": 0, 
    "no_copy": 1, 
    "permlevel": 0, 
-   "precision": "", 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
@@ -2703,19 +2681,18 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.notify_by_email && doc.recurring_id === doc.name", 
-   "description": "", 
-   "fieldname": "notification_email_address", 
-   "fieldtype": "Code", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "The date on which recurring invoice will be stop", 
+   "fieldname": "end_date", 
+   "fieldtype": "Date", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Notification Email Address", 
+   "label": "End Date", 
    "length": 0, 
    "no_copy": 1, 
-   "options": "Email", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -2730,33 +2707,6 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "eval:doc.is_recurring && doc.notify_by_email && doc.recurring_id === doc.name", 
-   "fieldname": "recurring_print_format", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "label": "Recurring Print Format", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "Print Format", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
    "fieldname": "column_break_82", 
    "fieldtype": "Column Break", 
    "hidden": 0, 
@@ -2778,25 +2728,51 @@
    "width": "50%"
   }, 
   {
-   "allow_on_submit": 1, 
+   "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "is_recurring", 
-   "description": "", 
-   "fieldname": "from_date", 
+   "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", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "From Date", 
+   "label": "Next Date", 
    "length": 0, 
    "no_copy": 1, 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
-   "read_only": 0, 
+   "read_only": 1, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "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", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "label": "Recurring Id", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -2807,16 +2783,16 @@
    "allow_on_submit": 1, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "is_recurring", 
-   "description": "", 
-   "fieldname": "to_date", 
-   "fieldtype": "Date", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "description": "Enter email id separated by commas, invoice will be mailed automatically on particular date", 
+   "fieldname": "notification_email_address", 
+   "fieldtype": "Small Text", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "To Date", 
+   "label": "Notification Email Address", 
    "length": 0, 
    "no_copy": 1, 
    "permlevel": 0, 
@@ -2833,20 +2809,21 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "is_recurring", 
-   "description": "", 
-   "fieldname": "next_date", 
-   "fieldtype": "Date", 
+   "depends_on": "eval:doc.is_recurring==1", 
+   "fieldname": "recurring_print_format", 
+   "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Next Date", 
+   "label": "Recurring Print Format", 
    "length": 0, 
-   "no_copy": 1, 
+   "no_copy": 0, 
+   "options": "Print Format", 
    "permlevel": 0, 
-   "print_hide": 1, 
+   "precision": "", 
+   "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
@@ -2875,19 +2852,18 @@
  "permissions": [
   {
    "amend": 1, 
-   "apply_user_permissions": 1, 
+   "apply_user_permissions": 0, 
    "cancel": 1, 
    "create": 1, 
    "delete": 0, 
-   "email": 0, 
-   "export": 1, 
+   "email": 1, 
+   "export": 0, 
    "if_owner": 0, 
    "import": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
-   "report": 0, 
-   "restrict": 0, 
+   "report": 1, 
    "role": "Accounts User", 
    "set_user_permissions": 0, 
    "share": 1, 
@@ -2896,49 +2872,7 @@
   }, 
   {
    "amend": 0, 
-   "apply_user_permissions": 1, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 0, 
-   "export": 0, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 0, 
-   "read": 1, 
-   "report": 0, 
-   "restrict": 0, 
-   "role": "Purchase User", 
-   "set_user_permissions": 0, 
-   "share": 0, 
-   "submit": 0, 
-   "write": 0
-  }, 
-  {
-   "amend": 1, 
    "apply_user_permissions": 0, 
-   "cancel": 1, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 0, 
-   "export": 1, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 1, 
-   "read": 1, 
-   "report": 1, 
-   "restrict": 0, 
-   "role": "Accounts Manager", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 1, 
-   "write": 1
-  }, 
-  {
-   "amend": 0, 
-   "apply_user_permissions": 1, 
    "cancel": 0, 
    "create": 0, 
    "delete": 0, 
@@ -2950,7 +2884,46 @@
    "print": 1, 
    "read": 1, 
    "report": 1, 
-   "restrict": 0, 
+   "role": "Purchase User", 
+   "set_user_permissions": 0, 
+   "share": 0, 
+   "submit": 0, 
+   "write": 0
+  }, 
+  {
+   "amend": 1, 
+   "apply_user_permissions": 0, 
+   "cancel": 1, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Accounts Manager", 
+   "set_user_permissions": 0, 
+   "share": 1, 
+   "submit": 1, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 0, 
+   "delete": 0, 
+   "email": 1, 
+   "export": 0, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
    "role": "Auditor", 
    "set_user_permissions": 0, 
    "share": 0, 
@@ -2976,39 +2949,14 @@
    "share": 0, 
    "submit": 0, 
    "write": 1
-  }, 
-  {
-   "amend": 0, 
-   "apply_user_permissions": 0, 
-   "cancel": 0, 
-   "create": 0, 
-   "delete": 0, 
-   "email": 0, 
-   "export": 0, 
-   "if_owner": 0, 
-   "import": 0, 
-   "permlevel": 1, 
-   "print": 0, 
-   "read": 1, 
-   "report": 0, 
-   "role": "All", 
-   "set_user_permissions": 0, 
-   "share": 0, 
-   "submit": 0, 
-   "write": 0
   }
  ], 
  "read_only": 0, 
  "read_only_onload": 1, 
- "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", 
+ "search_fields": "posting_date, supplier, fiscal_year, bill_no, base_grand_total, outstanding_amount", 
  "sort_field": "modified", 
  "sort_order": "DESC", 
  "timeline_field": "supplier", 
-<<<<<<< f2ba6af60b37b968f1aff340a88765a917c3f133
  "title_field": "title", 
  "track_seen": 0
 }
-=======
- "title_field": "title"
-}
->>>>>>> Added posting_time in purchase invoice