[new fix issue No #1510]
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index 6f4dad0..239b012 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -60,6 +60,14 @@
self.update_valuation_rate("entries")
self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount",
"purchase_receipt_details")
+ self.create_remarks()
+
+ def create_remarks(self):
+ if not self.remarks:
+ if self.bill_no and self.bill_date:
+ self.remarks = _("Against Bill {0} dated {1}").format(self.bill_no, formatdate(self.bill_date))
+ else:
+ self.remarks = _("No Remarks")
def set_missing_values(self, for_validate=False):
if not self.credit_to: