mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-23 08:38:30 +00:00
fix: append row level user remarks in gl map
This commit is contained in:
@@ -669,6 +669,9 @@ $.extend(erpnext.journal_entry, {
|
||||
if (values.remark) {
|
||||
frm.set_value("custom_remark", 1);
|
||||
frm.set_value("remark", values.remark);
|
||||
} else {
|
||||
frm.set_value("custom_remark", 0);
|
||||
frm.set_value("remark", "");
|
||||
}
|
||||
|
||||
// clear table is used because there might've been an error while adding child
|
||||
|
||||
@@ -1025,10 +1025,10 @@ class JournalEntry(AccountsController):
|
||||
def create_remarks(self):
|
||||
r = []
|
||||
|
||||
if self.get("custom_remark"):
|
||||
if self.flags.skip_remarks_creation:
|
||||
return
|
||||
|
||||
if self.flags.skip_remarks_creation:
|
||||
if self.get("custom_remark"):
|
||||
return
|
||||
|
||||
if self.cheque_no:
|
||||
@@ -1137,7 +1137,9 @@ class JournalEntry(AccountsController):
|
||||
|
||||
for d in self.get("accounts"):
|
||||
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
|
||||
remarks = self.remark
|
||||
r = [d.user_remark, self.remark]
|
||||
r = [x for x in r if x]
|
||||
remarks = "\n".join(r)
|
||||
|
||||
row = {
|
||||
"account": d.account,
|
||||
|
||||
@@ -600,13 +600,6 @@ class TestJournalEntry(ERPNextTestSuite):
|
||||
jv.insert()
|
||||
self.assertEqual(jv.remark, "My custom remark text")
|
||||
|
||||
# When custom_remark is disabled, remark should be auto-generated
|
||||
jv2 = make_journal_entry("_Test Cash - _TC", "_Test Bank - _TC", 100, save=False)
|
||||
jv2.custom_remark = 0
|
||||
jv2.remark = "Should be overwritten"
|
||||
jv2.insert()
|
||||
self.assertNotEqual(jv2.remark, "Should be overwritten")
|
||||
|
||||
def test_credit_limit_for_customer(self):
|
||||
customer = make_customer("_Test New Customer")
|
||||
set_credit_limit("_Test New Customer", "_Test Company", 50)
|
||||
|
||||
Reference in New Issue
Block a user