Browse Source
* feat: multi-currency * refactor: lead form * fix: test case for opportunity item * fix: removing local changes * fix: test cases * fix: test cases * fix: review changes * fix: reverting lead.json chnages * fix: toggle display for currency fields * review changes * fix: test case * fix: linter issues * fix: unused import * feat: grand total in opportunity * fix: patch * fix: sort imports * fix: reload opportunity item doctype Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>develop
Anupam Kumar
3 years ago
committed by
GitHub
7 changed files with 374 additions and 463 deletions
@ -1,469 +1,177 @@ |
|||||
{ |
{ |
||||
"allow_copy": 0, |
"actions": [], |
||||
"allow_events_in_timeline": 0, |
"creation": "2013-02-22 01:27:51", |
||||
"allow_guest_to_view": 0, |
"doctype": "DocType", |
||||
"allow_import": 0, |
"editable_grid": 1, |
||||
"allow_rename": 0, |
"engine": "InnoDB", |
||||
"beta": 0, |
"field_order": [ |
||||
"creation": "2013-02-22 01:27:51", |
"item_code", |
||||
"custom": 0, |
"item_name", |
||||
"docstatus": 0, |
"col_break1", |
||||
"doctype": "DocType", |
"uom", |
||||
"editable_grid": 1, |
"qty", |
||||
"engine": "InnoDB", |
"section_break_6", |
||||
|
"brand", |
||||
|
"item_group", |
||||
|
"description", |
||||
|
"column_break_8", |
||||
|
"image", |
||||
|
"image_view", |
||||
|
"quantity_and_rate_section", |
||||
|
"base_rate", |
||||
|
"base_amount", |
||||
|
"column_break_16", |
||||
|
"rate", |
||||
|
"amount" |
||||
|
], |
||||
"fields": [ |
"fields": [ |
||||
{ |
{ |
||||
"allow_bulk_edit": 0, |
"fieldname": "item_code", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Link", |
||||
"allow_on_submit": 0, |
"in_list_view": 1, |
||||
"bold": 0, |
"label": "Item Code", |
||||
"collapsible": 0, |
"oldfieldname": "item_code", |
||||
"columns": 0, |
"oldfieldtype": "Link", |
||||
"fieldname": "item_code", |
"options": "Item" |
||||
"fieldtype": "Link", |
}, |
||||
"hidden": 0, |
|
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 0, |
|
||||
"in_list_view": 1, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Item Code", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "item_code", |
|
||||
"oldfieldtype": "Link", |
|
||||
"options": "Item", |
|
||||
"permlevel": 0, |
|
||||
"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, |
"fieldname": "col_break1", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Column Break" |
||||
"allow_on_submit": 0, |
}, |
||||
"bold": 0, |
|
||||
"collapsible": 0, |
|
||||
"columns": 0, |
|
||||
"fieldname": "col_break1", |
|
||||
"fieldtype": "Column Break", |
|
||||
"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, |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"permlevel": 0, |
|
||||
"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, |
"default": "1", |
||||
"allow_in_quick_entry": 0, |
"fieldname": "qty", |
||||
"allow_on_submit": 0, |
"fieldtype": "Float", |
||||
"bold": 0, |
"in_list_view": 1, |
||||
"collapsible": 0, |
"label": "Qty", |
||||
"columns": 0, |
"oldfieldname": "qty", |
||||
"fieldname": "qty", |
"oldfieldtype": "Currency" |
||||
"fieldtype": "Float", |
}, |
||||
"hidden": 0, |
|
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 0, |
|
||||
"in_list_view": 1, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Qty", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "qty", |
|
||||
"oldfieldtype": "Currency", |
|
||||
"permlevel": 0, |
|
||||
"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, |
"fieldname": "item_group", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Link", |
||||
"allow_on_submit": 0, |
"hidden": 1, |
||||
"bold": 0, |
"label": "Item Group", |
||||
"collapsible": 0, |
"oldfieldname": "item_group", |
||||
"columns": 0, |
"oldfieldtype": "Link", |
||||
"description": "", |
"options": "Item Group", |
||||
"fieldname": "item_group", |
"print_hide": 1 |
||||
"fieldtype": "Link", |
}, |
||||
"hidden": 1, |
|
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 0, |
|
||||
"in_list_view": 0, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Item Group", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "item_group", |
|
||||
"oldfieldtype": "Link", |
|
||||
"options": "Item Group", |
|
||||
"permlevel": 0, |
|
||||
"print_hide": 1, |
|
||||
"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, |
"fieldname": "brand", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Link", |
||||
"allow_on_submit": 0, |
"hidden": 1, |
||||
"bold": 0, |
"label": "Brand", |
||||
"collapsible": 0, |
"oldfieldname": "brand", |
||||
"columns": 0, |
"oldfieldtype": "Link", |
||||
"fieldname": "brand", |
"options": "Brand", |
||||
"fieldtype": "Link", |
"print_hide": 1 |
||||
"hidden": 1, |
}, |
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 0, |
|
||||
"in_list_view": 0, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Brand", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "brand", |
|
||||
"oldfieldtype": "Link", |
|
||||
"options": "Brand", |
|
||||
"permlevel": 0, |
|
||||
"print_hide": 1, |
|
||||
"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, |
"collapsible": 1, |
||||
"allow_in_quick_entry": 0, |
"fieldname": "section_break_6", |
||||
"allow_on_submit": 0, |
"fieldtype": "Section Break", |
||||
"bold": 0, |
"label": "Description" |
||||
"collapsible": 0, |
}, |
||||
"columns": 0, |
|
||||
"fieldname": "section_break_6", |
|
||||
"fieldtype": "Section Break", |
|
||||
"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, |
|
||||
"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, |
"fieldname": "uom", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Link", |
||||
"allow_on_submit": 0, |
"label": "UOM", |
||||
"bold": 0, |
"oldfieldname": "uom", |
||||
"collapsible": 0, |
"oldfieldtype": "Link", |
||||
"columns": 0, |
"options": "UOM" |
||||
"fieldname": "uom", |
}, |
||||
"fieldtype": "Link", |
|
||||
"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": "UOM", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "uom", |
|
||||
"oldfieldtype": "Link", |
|
||||
"options": "UOM", |
|
||||
"permlevel": 0, |
|
||||
"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, |
"fieldname": "item_name", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Data", |
||||
"allow_on_submit": 0, |
"in_global_search": 1, |
||||
"bold": 0, |
"label": "Item Name", |
||||
"collapsible": 0, |
"oldfieldname": "item_name", |
||||
"columns": 0, |
"oldfieldtype": "Data" |
||||
"fieldname": "item_name", |
}, |
||||
"fieldtype": "Data", |
|
||||
"hidden": 0, |
|
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 1, |
|
||||
"in_list_view": 1, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Item Name", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "item_name", |
|
||||
"oldfieldtype": "Data", |
|
||||
"permlevel": 0, |
|
||||
"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, |
"fieldname": "description", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Text Editor", |
||||
"allow_on_submit": 0, |
"label": "Description", |
||||
"bold": 0, |
"oldfieldname": "description", |
||||
"collapsible": 0, |
"oldfieldtype": "Text", |
||||
"columns": 0, |
"print_width": "300px", |
||||
"fieldname": "description", |
|
||||
"fieldtype": "Text Editor", |
|
||||
"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": "Description", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"oldfieldname": "description", |
|
||||
"oldfieldtype": "Text", |
|
||||
"permlevel": 0, |
|
||||
"print_hide": 0, |
|
||||
"print_hide_if_no_value": 0, |
|
||||
"print_width": "300px", |
|
||||
"read_only": 0, |
|
||||
"remember_last_selected_value": 0, |
|
||||
"report_hide": 0, |
|
||||
"reqd": 0, |
|
||||
"search_index": 0, |
|
||||
"set_only_once": 0, |
|
||||
"translatable": 0, |
|
||||
"unique": 0, |
|
||||
"width": "300px" |
"width": "300px" |
||||
}, |
}, |
||||
{ |
{ |
||||
"allow_bulk_edit": 0, |
"fieldname": "column_break_8", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Column Break" |
||||
"allow_on_submit": 0, |
}, |
||||
"bold": 0, |
|
||||
"collapsible": 0, |
|
||||
"columns": 0, |
|
||||
"fieldname": "column_break_8", |
|
||||
"fieldtype": "Column Break", |
|
||||
"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, |
|
||||
"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, |
"fieldname": "image", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Attach", |
||||
"allow_on_submit": 0, |
"hidden": 1, |
||||
"bold": 0, |
"label": "Image" |
||||
"collapsible": 0, |
}, |
||||
"columns": 0, |
|
||||
"fieldname": "image", |
|
||||
"fieldtype": "Attach", |
|
||||
"hidden": 1, |
|
||||
"ignore_user_permissions": 0, |
|
||||
"ignore_xss_filter": 0, |
|
||||
"in_filter": 0, |
|
||||
"in_global_search": 0, |
|
||||
"in_list_view": 0, |
|
||||
"in_standard_filter": 0, |
|
||||
"label": "Image", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"options": "", |
|
||||
"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, |
"fieldname": "image_view", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Image", |
||||
"allow_on_submit": 0, |
"label": "Image View", |
||||
"bold": 0, |
"options": "image", |
||||
"collapsible": 0, |
"print_hide": 1 |
||||
"columns": 0, |
}, |
||||
"fieldname": "image_view", |
|
||||
"fieldtype": "Image", |
|
||||
"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": "Image View", |
|
||||
"length": 0, |
|
||||
"no_copy": 0, |
|
||||
"options": "image", |
|
||||
"permlevel": 0, |
|
||||
"precision": "", |
|
||||
"print_hide": 1, |
|
||||
"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, |
"fieldname": "rate", |
||||
"allow_in_quick_entry": 0, |
"fieldtype": "Currency", |
||||
"allow_on_submit": 0, |
"in_list_view": 1, |
||||
"bold": 0, |
"label": "Rate", |
||||
"collapsible": 0, |
"options": "currency", |
||||
"columns": 0, |
"reqd": 1 |
||||
"fieldname": "basic_rate", |
}, |
||||
"fieldtype": "Currency", |
{ |
||||
"hidden": 1, |
"fieldname": "quantity_and_rate_section", |
||||
"ignore_user_permissions": 0, |
"fieldtype": "Section Break", |
||||
"ignore_xss_filter": 0, |
"label": "Quantity and Rate" |
||||
"in_filter": 0, |
}, |
||||
"in_global_search": 0, |
{ |
||||
"in_list_view": 0, |
"fieldname": "base_amount", |
||||
"in_standard_filter": 0, |
"fieldtype": "Currency", |
||||
"label": "Basic Rate", |
"label": "Amount (Company Currency)", |
||||
"length": 0, |
"options": "Company:company:default_currency", |
||||
"no_copy": 0, |
"print_hide": 1, |
||||
"oldfieldname": "basic_rate", |
"read_only": 1, |
||||
"oldfieldtype": "Currency", |
"reqd": 1 |
||||
"options": "Company:company:default_currency", |
}, |
||||
"permlevel": 0, |
{ |
||||
"print_hide": 1, |
"fieldname": "column_break_16", |
||||
"print_hide_if_no_value": 0, |
"fieldtype": "Column Break" |
||||
"read_only": 0, |
}, |
||||
"remember_last_selected_value": 0, |
{ |
||||
"report_hide": 0, |
"fieldname": "amount", |
||||
"reqd": 0, |
"fieldtype": "Currency", |
||||
"search_index": 0, |
"in_list_view": 1, |
||||
"set_only_once": 0, |
"label": "Amount", |
||||
"translatable": 0, |
"options": "currency", |
||||
"unique": 0 |
"read_only": 1, |
||||
|
"reqd": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"fieldname": "base_rate", |
||||
|
"fieldtype": "Currency", |
||||
|
"label": "Rate (Company Currency)", |
||||
|
"oldfieldname": "basic_rate", |
||||
|
"oldfieldtype": "Currency", |
||||
|
"options": "Company:company:default_currency", |
||||
|
"print_hide": 1, |
||||
|
"read_only": 1, |
||||
|
"reqd": 1 |
||||
} |
} |
||||
], |
], |
||||
"has_web_view": 0, |
"idx": 1, |
||||
"hide_heading": 0, |
"istable": 1, |
||||
"hide_toolbar": 0, |
"links": [], |
||||
"idx": 1, |
"modified": "2021-07-30 16:39:09.775720", |
||||
"image_view": 0, |
"modified_by": "Administrator", |
||||
"in_create": 0, |
"module": "CRM", |
||||
"is_submittable": 0, |
"name": "Opportunity Item", |
||||
"issingle": 0, |
"owner": "Administrator", |
||||
"istable": 1, |
"permissions": [], |
||||
"max_attachments": 0, |
"sort_field": "modified", |
||||
"modified": "2018-12-28 15:43:09.382012", |
"sort_order": "DESC", |
||||
"modified_by": "Administrator", |
"track_changes": 1 |
||||
"module": "CRM", |
|
||||
"name": "Opportunity Item", |
|
||||
"owner": "Administrator", |
|
||||
"permissions": [], |
|
||||
"quick_entry": 0, |
|
||||
"read_only": 0, |
|
||||
"read_only_onload": 0, |
|
||||
"show_name_in_global_search": 0, |
|
||||
"track_changes": 1, |
|
||||
"track_seen": 0, |
|
||||
"track_views": 0 |
|
||||
} |
} |
@ -0,0 +1,36 @@ |
|||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
import frappe |
||||
|
from frappe.utils import flt |
||||
|
|
||||
|
import erpnext |
||||
|
from erpnext.setup.utils import get_exchange_rate |
||||
|
|
||||
|
|
||||
|
def execute(): |
||||
|
frappe.reload_doc('crm', 'doctype', 'opportunity') |
||||
|
frappe.reload_doc('crm', 'doctype', 'opportunity_item') |
||||
|
|
||||
|
opportunities = frappe.db.get_list('Opportunity', filters={ |
||||
|
'opportunity_amount': ['>', 0] |
||||
|
}, fields=['name', 'company', 'currency', 'opportunity_amount']) |
||||
|
|
||||
|
for opportunity in opportunities: |
||||
|
company_currency = erpnext.get_company_currency(opportunity.company) |
||||
|
|
||||
|
# base total and total will be 0 only since item table did not have amount field earlier |
||||
|
if opportunity.currency != company_currency: |
||||
|
conversion_rate = get_exchange_rate(opportunity.currency, company_currency) |
||||
|
base_opportunity_amount = flt(conversion_rate) * flt(opportunity.opportunity_amount) |
||||
|
grand_total = flt(opportunity.opportunity_amount) |
||||
|
base_grand_total = flt(conversion_rate) * flt(opportunity.opportunity_amount) |
||||
|
else: |
||||
|
conversion_rate = 1 |
||||
|
base_opportunity_amount = grand_total = base_grand_total = flt(opportunity.opportunity_amount) |
||||
|
|
||||
|
frappe.db.set_value('Opportunity', opportunity.name, { |
||||
|
'conversion_rate': conversion_rate, |
||||
|
'base_opportunity_amount': base_opportunity_amount, |
||||
|
'grand_total': grand_total, |
||||
|
'base_grand_total': base_grand_total |
||||
|
}, update_modified=False) |
Loading…
Reference in new issue