style: use double quotes

This commit is contained in:
barredterra 2021-09-17 12:03:02 +02:00 committed by marination
parent 938f7d2266
commit 043066a2c8
2 changed files with 9 additions and 9 deletions

View File

@ -21,7 +21,7 @@ class Dunning(AccountsController):
self.validate_totals()
if not self.income_account:
self.income_account = frappe.get_cached_value("Company", self.company, "default_income_account")
self.income_account = frappe.db.get_value("Company", self.company, "default_income_account")
def validate_overdue_payments(self):
for row in self.overdue_payments:
@ -36,13 +36,13 @@ class Dunning(AccountsController):
grand_total = flt(total_outstanding) + flt(dunning_amount)
if self.total_outstanding != total_outstanding:
self.total_outstanding = flt(total_outstanding, self.precision('total_outstanding'))
self.total_outstanding = flt(total_outstanding, self.precision("total_outstanding"))
if self.total_interest != total_interest:
self.total_interest = flt(total_interest, self.precision('total_interest'))
self.total_interest = flt(total_interest, self.precision("total_interest"))
if self.dunning_amount != dunning_amount:
self.dunning_amount = flt(dunning_amount, self.precision('dunning_amount'))
self.dunning_amount = flt(dunning_amount, self.precision("dunning_amount"))
if self.grand_total != grand_total:
self.grand_total = flt(grand_total, self.precision('grand_total'))
self.grand_total = flt(grand_total, self.precision("grand_total"))
def on_submit(self):
self.make_gl_entries()

View File

@ -2516,7 +2516,7 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
def postprocess_dunning(source, target):
from erpnext.accounts.doctype.dunning.dunning import get_dunning_letter_text
dunning_type = frappe.db.exists('Dunning Type', {'is_default': 1})
dunning_type = frappe.db.exists("Dunning Type", {"is_default": 1})
if dunning_type:
dunning_type = frappe.get_doc("Dunning Type", dunning_type)
target.dunning_type = dunning_type.name
@ -2529,9 +2529,9 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
)
if letter_text:
target.body_text = letter_text.get('body_text')
target.closing_text = letter_text.get('closing_text')
target.language = letter_text.get('language')
target.body_text = letter_text.get("body_text")
target.closing_text = letter_text.get("closing_text")
target.language = letter_text.get("language")
target.validate()