style: use double quotes
This commit is contained in:
parent
938f7d2266
commit
043066a2c8
@ -21,7 +21,7 @@ class Dunning(AccountsController):
|
|||||||
self.validate_totals()
|
self.validate_totals()
|
||||||
|
|
||||||
if not self.income_account:
|
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):
|
def validate_overdue_payments(self):
|
||||||
for row in self.overdue_payments:
|
for row in self.overdue_payments:
|
||||||
@ -36,13 +36,13 @@ class Dunning(AccountsController):
|
|||||||
grand_total = flt(total_outstanding) + flt(dunning_amount)
|
grand_total = flt(total_outstanding) + flt(dunning_amount)
|
||||||
|
|
||||||
if self.total_outstanding != total_outstanding:
|
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:
|
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:
|
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:
|
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):
|
def on_submit(self):
|
||||||
self.make_gl_entries()
|
self.make_gl_entries()
|
||||||
|
@ -2516,7 +2516,7 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
|
|||||||
def postprocess_dunning(source, target):
|
def postprocess_dunning(source, target):
|
||||||
from erpnext.accounts.doctype.dunning.dunning import get_dunning_letter_text
|
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:
|
if dunning_type:
|
||||||
dunning_type = frappe.get_doc("Dunning Type", dunning_type)
|
dunning_type = frappe.get_doc("Dunning Type", dunning_type)
|
||||||
target.dunning_type = dunning_type.name
|
target.dunning_type = dunning_type.name
|
||||||
@ -2529,9 +2529,9 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if letter_text:
|
if letter_text:
|
||||||
target.body_text = letter_text.get('body_text')
|
target.body_text = letter_text.get("body_text")
|
||||||
target.closing_text = letter_text.get('closing_text')
|
target.closing_text = letter_text.get("closing_text")
|
||||||
target.language = letter_text.get('language')
|
target.language = letter_text.get("language")
|
||||||
|
|
||||||
target.validate()
|
target.validate()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user