style: bulk format code with black

v13 port because otherwise backports will result in conflicts always
This commit is contained in:
Ankush Menat
2022-03-29 17:29:34 +05:30
parent 7cc84dcbb4
commit c07713b860
1555 changed files with 96709 additions and 66138 deletions

View File

@@ -1,4 +1,3 @@
import frappe
from frappe.model.utils.rename_field import rename_field
@@ -10,17 +9,23 @@ def execute():
if frappe.db.has_column("Timesheet Detail", "billable"):
rename_field("Timesheet Detail", "billable", "is_billable")
base_currency = frappe.defaults.get_global_default('currency')
base_currency = frappe.defaults.get_global_default("currency")
frappe.db.sql("""UPDATE `tabTimesheet Detail`
frappe.db.sql(
"""UPDATE `tabTimesheet Detail`
SET base_billing_rate = billing_rate,
base_billing_amount = billing_amount,
base_costing_rate = costing_rate,
base_costing_amount = costing_amount""")
base_costing_amount = costing_amount"""
)
frappe.db.sql("""UPDATE `tabTimesheet`
frappe.db.sql(
"""UPDATE `tabTimesheet`
SET currency = '{0}',
exchange_rate = 1.0,
base_total_billable_amount = total_billable_amount,
base_total_billed_amount = total_billed_amount,
base_total_costing_amount = total_costing_amount""".format(base_currency))
base_total_costing_amount = total_costing_amount""".format(
base_currency
)
)