mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
chore: remove debug
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
|
import click
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
from erpnext.setup.utils import get_exchange_rate
|
from erpnext.setup.utils import get_exchange_rate
|
||||||
|
|
||||||
import click
|
|
||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doctype("Opportunity")
|
frappe.reload_doctype("Opportunity")
|
||||||
@@ -18,7 +17,7 @@ def execute():
|
|||||||
for opportunity in opportunities:
|
for opportunity in opportunities:
|
||||||
company_currency = erpnext.get_company_currency(opportunity.company)
|
company_currency = erpnext.get_company_currency(opportunity.company)
|
||||||
|
|
||||||
if opportunity.currency is None or opportunity.currency == '':
|
if opportunity.currency is None or opportunity.currency == "":
|
||||||
opportunity.currency = company_currency
|
opportunity.currency = company_currency
|
||||||
frappe.db.set_value(
|
frappe.db.set_value(
|
||||||
"Opportunity",
|
"Opportunity",
|
||||||
@@ -27,7 +26,7 @@ def execute():
|
|||||||
update_modified=False,
|
update_modified=False,
|
||||||
)
|
)
|
||||||
click.secho(
|
click.secho(
|
||||||
f" Opportunity `{opportunity.name}` has no currency set. We for it to company currency : `{opportunity.currency}`\"\n",
|
f' Opportunity `{opportunity.name}` has no currency set. We for it to company currency : `{opportunity.currency}`"\n',
|
||||||
fg="yellow",
|
fg="yellow",
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -39,10 +38,6 @@ def execute():
|
|||||||
conversion_rate = 1
|
conversion_rate = 1
|
||||||
base_opportunity_amount = flt(opportunity.opportunity_amount)
|
base_opportunity_amount = flt(opportunity.opportunity_amount)
|
||||||
|
|
||||||
if conversion_rate is None:
|
|
||||||
print(opportunity.name,conversion_rate,opportunity.currency)
|
|
||||||
|
|
||||||
|
|
||||||
frappe.db.set_value(
|
frappe.db.set_value(
|
||||||
"Opportunity",
|
"Opportunity",
|
||||||
opportunity.name,
|
opportunity.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user