[fix] total amount in journal entry
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 2bfad4e..e9449d7 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -339,15 +339,17 @@
 			self.remark = ("\n").join(r) #User Remarks is not mandatory
 
 	def set_print_format_fields(self):
+		total_amount = 0.0
 		for d in self.get('accounts'):
 			if d.party_type and d.party:
 				if not self.pay_to_recd_from:
 					self.pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
 						"customer_name" if d.party_type=="Customer" else "supplier_name")
 
-					self.set_total_amount(d.debit or d.credit)
 			elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
-				self.set_total_amount(d.debit or d.credit)
+				total_amount += (d.debit or d.credit)
+
+		self.set_total_amount(total_amount)
 
 	def set_total_amount(self, amt):
 		self.total_amount = amt
diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html
new file mode 100644
index 0000000..a4f8fa6
--- /dev/null
+++ b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html
@@ -0,0 +1,30 @@
+{%- from "templates/print_formats/standard_macros.html" import add_header -%}
+<div class="page-break">
+    {%- if not doc.get("print_heading") and not doc.get("select_print_heading")
+        and doc.set("select_print_heading", _("Payment Receipt Note")) -%}{%- endif -%}
+    {{ add_header(0, 1, doc, letter_head, no_letterhead) }}
+
+    {%- for label, value in (
+        (_("Received On"), frappe.utils.formatdate(doc.voucher_date)),
+        (_("Received From"), doc.pay_to_recd_from),
+        (_("Amount"), "<strong>" + doc.get_formatted("total_amount") + "</strong><br>" + (doc.total_amount_in_words or "") + "<br>"),
+        (_("Remarks"), doc.remark)
+    ) -%}
+    <div class="row">
+        <div class="col-xs-3"><label class="text-right">{{ label }}</label></div>
+        <div class="col-xs-9">{{ value }}</div>
+    </div>
+
+    {%- endfor -%}
+
+    <hr>
+    <br>
+    <p class="strong">
+        {{ _("For") }} {{ doc.company }},<br>
+        <br>
+        <br>
+        <br>
+        {{ _("Authorized Signatory") }}
+    </p>
+</div>
+
diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json
index 5445f66..f1de448 100755
--- a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json
+++ b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.json
@@ -1,15 +1,17 @@
 {
- "creation": "2012-05-01 12:46:31",
- "doc_type": "Journal Entry",
- "docstatus": 0,
- "doctype": "Print Format",
- "html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n    {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n        and doc.set(\"select_print_heading\", _(\"Payment Receipt Note\")) -%}{%- endif -%}\n    {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n    {%- for label, value in (\n        (_(\"Received On\"), frappe.utils.formatdate(doc.voucher_date)),\n        (_(\"Received From\"), doc.pay_to_recd_from),\n        (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"total_amount\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n        (_(\"Remarks\"), doc.remark)\n    ) -%}\n    <div class=\"row\">\n        <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n        <div class=\"col-xs-9\">{{ value }}</div>\n    </div>\n\n    {%- endfor -%}\n\n    <hr>\n    <br>\n    <p class=\"strong\">\n        {{ _(\"For\") }} {{ doc.company }},<br>\n        <br>\n        <br>\n        <br>\n        {{ _(\"Authorized Signatory\") }}\n    </p>\n</div>\n\n",
- "idx": 1,
- "modified": "2015-01-16 11:03:22.893209",
- "modified_by": "Administrator",
- "module": "Accounts",
- "name": "Payment Receipt Voucher",
- "owner": "Administrator",
- "print_format_type": "Server",
+ "creation": "2012-05-01 12:46:31", 
+ "custom_format": 0, 
+ "disabled": 0, 
+ "doc_type": "Journal Entry", 
+ "docstatus": 0, 
+ "doctype": "Print Format", 
+ "html": "", 
+ "idx": 1, 
+ "modified": "2015-11-25 07:06:00.668141", 
+ "modified_by": "Administrator", 
+ "name": "Payment Receipt Voucher", 
+ "owner": "Administrator", 
+ "print_format_builder": 0, 
+ "print_format_type": "Server", 
  "standard": "Yes"
-}
+}
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 37f8f36..89bf7c4 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -235,3 +235,4 @@
 erpnext.patches.v6_8.make_webform_standard #2015-11-23
 erpnext.patches.v6_8.move_drop_ship_to_po_items
 erpnext.patches.v6_10.fix_ordered_received_billed
+erpnext.patches.v6_10.fix_jv_total_amount
diff --git a/erpnext/patches/v6_10/fix_jv_total_amount.py b/erpnext/patches/v6_10/fix_jv_total_amount.py
new file mode 100644
index 0000000..3797ff4
--- /dev/null
+++ b/erpnext/patches/v6_10/fix_jv_total_amount.py
@@ -0,0 +1,13 @@
+import frappe
+
+# patch all for-print field (total amount) in Journal Entry in 2015
+def execute():
+	for je in frappe.get_all("Journal Entry", filters={"creation": (">", "2015-01-01")}):
+		je = frappe.get_doc("Journal Entry", je.name)
+		original = je.total_amount
+
+		je.set_print_format_fields()
+
+		if je.total_amount != original:
+			je.db_set("total_amount", je.total_amount, update_modified=False)
+			je.db_set("total_amount_in_words", je.total_amount_in_words, update_modified=False)