On uncheck is return field clear the reference field
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index a33b87f..6cd99df 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -185,6 +185,12 @@
}
},
+ is_return: function() {
+ if(!this.frm.doc.is_return && this.frm.doc.return_against) {
+ this.frm.set_value('return_against', '');
+ }
+ },
+
setup_quality_inspection: function() {
if(!in_list(["Delivery Note", "Sales Invoice", "Purchase Receipt", "Purchase Invoice"], this.frm.doc.doctype)) {
return;