Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index 5fd0ba7..904f31b 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -521,6 +521,8 @@
self.make_packing_list()
else:
self.doclist = self.doc.clear_table(self.doclist, 'packing_details')
+
+ if not cint(self.doc.is_pos):
webnotes.conn.set(self.doc,'paid_amount',0)
def check_prev_docstatus(self):
diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py
index d6bf392..a3dae8e 100644
--- a/controllers/accounts_controller.py
+++ b/controllers/accounts_controller.py
@@ -75,7 +75,7 @@
self.doc.conversion_rate = self.doc.plc_conversion_rate
if self.meta.get_field("currency"):
- if self.doc.currency != company_currency:
+ if self.doc.currency and self.doc.currency != company_currency:
if not self.doc.conversion_rate:
exchange = self.doc.currency + "-" + company_currency
self.doc.conversion_rate = flt(webnotes.conn.get_value("Currency Exchange",