[fix] [minor] fetch supplier default currency only if it exists

This commit is contained in:
Anand Doshi 2013-07-29 11:48:28 +05:30
parent b1b564c20f
commit c7280b4973

View File

@ -129,7 +129,8 @@ class TransactionBase(StatusUpdater):
supplier = webnotes.doc("Supplier", self.doc.supplier) supplier = webnotes.doc("Supplier", self.doc.supplier)
out["supplier_name"] = supplier.supplier_name out["supplier_name"] = supplier.supplier_name
out["currency"] = supplier.default_currency if supplier.default_currency:
out["currency"] = supplier.default_currency
return out return out