Restored missing rounded_total fields
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index dd90b78..5d7d63e 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -2673,6 +2673,70 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "rounded_total",
+ "fieldtype": "Currency",
+ "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": "Rounded Total",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "disable_rounded_total",
+ "fieldtype": "Check",
+ "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": "Disable Rounded Total",
+ "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,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "in_words",
"fieldtype": "Data",
"hidden": 0,
@@ -3672,8 +3736,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2018-08-27 08:35:10.345286",
- "modified_by": "Administrator",
+ "modified": "2018-08-29 12:16:12.886021",
+ "modified_by": "nabinhait@gmail.com",
"module": "Buying",
"name": "Purchase Order",
"owner": "Administrator",
@@ -3765,6 +3829,5 @@
"timeline_field": "supplier",
"title_field": "title",
"track_changes": 0,
- "track_seen": 0,
- "track_views": 0
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index f0982ae..99b6d9f 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -2152,6 +2152,38 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "rounded_total",
+ "fieldtype": "Currency",
+ "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": "Rounded Total",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "in_words",
"fieldtype": "Data",
"hidden": 0,
@@ -2183,6 +2215,38 @@
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "disable_rounded_total",
+ "fieldtype": "Check",
+ "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": "Disable Rounded Total",
+ "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,
+ "translatable": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_in_quick_entry": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"collapsible_depends_on": "terms",
"columns": 0,
@@ -2780,8 +2844,8 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2018-08-21 14:44:35.742480",
- "modified_by": "Administrator",
+ "modified": "2018-08-29 12:14:31.329035",
+ "modified_by": "nabinhait@gmail.com",
"module": "Buying",
"name": "Supplier Quotation",
"owner": "Administrator",
@@ -2892,6 +2956,5 @@
"timeline_field": "supplier",
"title_field": "title",
"track_changes": 0,
- "track_seen": 0,
- "track_views": 0
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index 7913a76..ad7d4b2 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -115,14 +115,17 @@
def set_total_in_words(self):
from frappe.utils import money_in_words
if self.meta.get_field("base_in_words"):
- amount = (self.base_rounded_total
- if not self.get("disable_rounded_total") else self.base_grand_total)
-
+ if self.meta.get_field("base_rounded_total") and not self.is_rounded_total_disabled():
+ amount = self.base_rounded_total
+ else:
+ amount = self.base_grand_total
self.base_in_words = money_in_words(amount, self.company_currency)
if self.meta.get_field("in_words"):
- amount = (self.rounded_total
- if not self.get("disable_rounded_total") else self.grand_total)
+ if self.meta.get_field("rounded_total") and not self.is_rounded_total_disabled():
+ amount = self.rounded_total
+ else:
+ amount = self.grand_total
self.in_words = money_in_words(amount, self.currency)