[new fields] Party Account Currency, Paid Amount and Write Off Amount in Acompany Currency
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index ef6cc77..0d4953a 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -1270,30 +1270,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "total_amount_to_pay",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Total Amount To Pay",
- "no_copy": 1,
- "oldfieldname": "total_amount_to_pay",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "print_hide": 1,
- "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,
"fieldname": "total_advance",
"fieldtype": "Currency",
"hidden": 0,
@@ -1304,7 +1280,7 @@
"no_copy": 1,
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
@@ -1328,7 +1304,7 @@
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
@@ -1341,6 +1317,30 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "write_off_amount",
+ "depends_on": "grand_total",
+ "fieldname": "write_off",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Write Off",
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 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": "write_off_amount",
"fieldtype": "Currency",
@@ -1350,7 +1350,7 @@
"in_list_view": 0,
"label": "Write Off Amount",
"no_copy": 1,
- "options": "Company:company:default_currency",
+ "options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
@@ -1364,6 +1364,50 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "base_write_off_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Write Off Amount (Company Currency)",
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
+ "fieldname": "column_break_61",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 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,
"depends_on": "eval:flt(doc.write_off_amount)!=0",
"fieldname": "write_off_account",
"fieldtype": "Link",
@@ -1409,29 +1453,6 @@
{
"allow_on_submit": 0,
"bold": 0,
- "collapsible": 0,
- "fieldname": "against_expense_account",
- "fieldtype": "Small Text",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Against Expense Account",
- "no_copy": 1,
- "oldfieldname": "against_expense_account",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 1,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
"collapsible": 1,
"collapsible_depends_on": "advances",
"fieldname": "advances_section",
@@ -1752,6 +1773,29 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "party_account_currency",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Party Account Currency",
+ "no_copy": 1,
+ "options": "Currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
"default": "No",
"description": "",
"fieldname": "is_opening",
@@ -1801,6 +1845,29 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "against_expense_account",
+ "fieldtype": "Small Text",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Against Expense Account",
+ "no_copy": 1,
+ "oldfieldname": "against_expense_account",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "print_hide": 1,
+ "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_63",
"fieldtype": "Column Break",
"hidden": 0,
@@ -2175,7 +2242,7 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
- "modified": "2015-08-27 03:21:24.432106",
+ "modified": "2015-08-27 16:05:29.519073",
"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 cd97a22..955a19b 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -1448,7 +1448,7 @@
"no_copy": 0,
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
@@ -1472,7 +1472,7 @@
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
@@ -1663,7 +1663,7 @@
"no_copy": 1,
"oldfieldname": "paid_amount",
"oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
+ "options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
@@ -1676,6 +1676,29 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "fieldname": "base_paid_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Paid Amount (Company Currency)",
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"collapsible_depends_on": "write_off_amount",
"depends_on": "grand_total",
@@ -1710,7 +1733,7 @@
"in_list_view": 0,
"label": "Write Off Amount",
"no_copy": 1,
- "options": "Company:company:default_currency",
+ "options": "currency",
"permlevel": 0,
"print_hide": 1,
"read_only": 0,
@@ -1724,6 +1747,29 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "base_write_off_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Write Off Amount (Company Currency)",
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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": "is_pos",
"fieldname": "write_off_outstanding_amount_automatically",
"fieldtype": "Check",
@@ -2231,6 +2277,29 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "party_account_currency",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Party Account Currency",
+ "no_copy": 1,
+ "options": "Currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
"default": "No",
"description": "",
"fieldname": "is_opening",
@@ -2882,7 +2951,7 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
- "modified": "2015-08-27 03:29:14.270731",
+ "modified": "2015-08-27 16:12:12.077662",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",