style: Collapse whitespace

This commit is contained in:
Kevin Chan 2020-10-12 15:20:11 +08:00
parent 39bed3a65e
commit 58389ebd40

View File

@ -66,21 +66,12 @@ class ItemPrice(Document):
if self.get(field): if self.get(field):
conditions += " and {0} = %({0})s ".format(field) conditions += " and {0} = %({0})s ".format(field)
else: else:
conditions += """ conditions += "and (isnull({0}) or {0} = '')".format(field)
and (
isnull({0})
or {0} = ''
)
""".format(
field
)
price_list_rate = frappe.db.sql( price_list_rate = frappe.db.sql(
""" """
select select price_list_rate
price_list_rate from `tabItem Price`
from
`tabItem Price`
{conditions} {conditions}
""".format( """.format(
conditions=conditions conditions=conditions
@ -89,11 +80,7 @@ class ItemPrice(Document):
) )
if price_list_rate: if price_list_rate:
frappe.throw(_(""" frappe.throw(_("Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, UOM, Qty, and Dates."), ItemPriceDuplicateItem,)
Item Price appears multiple times based on
Price List, Supplier/Customer, Currency, Item, UOM, Qty,
and Dates.
"""), ItemPriceDuplicateItem,)
def before_save(self): def before_save(self):
if self.selling: if self.selling: