From 41f421d4003fb80c62f2dc872b266a543e1b87e9 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Wed, 2 Sep 2020 13:47:18 +0530 Subject: [PATCH 1/2] feat: added option to add custom remarks in payment entry --- .../doctype/payment_entry/payment_entry.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 997937738b6..72149a665df 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -1,4 +1,5 @@ { + "actions": [], "allow_import": 1, "autoname": "naming_series:", "creation": "2016-06-01 14:38:51.012597", @@ -63,6 +64,7 @@ "cost_center", "section_break_12", "status", + "custom_remarks", "remarks", "column_break_16", "letter_head", @@ -462,7 +464,8 @@ "fieldname": "remarks", "fieldtype": "Small Text", "label": "Remarks", - "no_copy": 1 + "no_copy": 1, + "read_only_depends_on": "eval:doc.custom_remarks == 0" }, { "fieldname": "column_break_16", @@ -573,10 +576,18 @@ "label": "Status", "options": "\nDraft\nSubmitted\nCancelled", "read_only": 1 + }, + { + "default": "0", + "fieldname": "custom_remarks", + "fieldtype": "Check", + "label": "Custom Remarks" } ], + "index_web_pages_for_search": 1, "is_submittable": 1, - "modified": "2019-12-08 13:02:30.016610", + "links": [], + "modified": "2020-09-02 13:39:43.383705", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", From 9397b7f58bdb8f3c32170be3da9423f3bbc8910d Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 15 Sep 2020 12:36:01 +0530 Subject: [PATCH 2/2] fix: requested changes --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 842c64fdbe3..b42efdfe8bd 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -453,7 +453,7 @@ class PaymentEntry(AccountsController): frappe.throw(_("Reference No and Reference Date is mandatory for Bank transaction")) def set_remarks(self): - if self.remarks: return + if self.custom_remarks: return if self.payment_type=="Internal Transfer": remarks = [_("Amount {0} {1} transferred from {2} to {3}")