fix: better remarks on Cr note created by Reconciliation
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index 22e092c..85ef6f7 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -797,6 +797,9 @@
def create_remarks(self):
r = []
+ if self.flags.skip_remarks_creation:
+ return
+
if self.user_remark:
r.append(_("Note: {0}").format(self.user_remark))
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
index ea06e0e..82302cc 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
@@ -6,7 +6,7 @@
from frappe import _, msgprint, qb
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
-from frappe.utils import flt, get_link_to_form, getdate, nowdate, today
+from frappe.utils import flt, fmt_money, get_link_to_form, getdate, nowdate, today
import erpnext
from erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation import (
@@ -657,6 +657,7 @@
"reference_name": inv.against_voucher,
"cost_center": erpnext.get_default_cost_center(company),
"exchange_rate": inv.exchange_rate,
+ "user_remark": f"{fmt_money(flt(inv.allocated_amount), currency=company_currency)} against {inv.against_voucher}",
},
{
"account": inv.account,
@@ -671,6 +672,7 @@
"reference_name": inv.voucher_no,
"cost_center": erpnext.get_default_cost_center(company),
"exchange_rate": inv.exchange_rate,
+ "user_remark": f"{fmt_money(flt(inv.allocated_amount), currency=company_currency)} from {inv.voucher_no}",
},
],
}
@@ -678,6 +680,8 @@
jv.flags.ignore_mandatory = True
jv.flags.ignore_exchange_rate = True
+ jv.remark = None
+ jv.flags.skip_remarks_creation = True
jv.submit()
if inv.difference_amount != 0: