-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add files for employee and suppleir bank account obfuscation
- Loading branch information
1 parent
679d3df
commit f7ada06
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import frappe | ||
|
||
|
||
@frappe.whitelist() | ||
def show_bank_account_number(doctype, docname): | ||
doc = frappe.get_doc(doctype, docname) | ||
routing_number = frappe.get_value('Bank', doc.bank, 'aba_number') | ||
account_number = doc.get_password('bank_account') | ||
return {'routing_number': routing_number, 'account_number': account_number} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
frappe.ui.form.on('Employee', { | ||
onload_post_render: frm => { | ||
frm.fields_dict.bank_account.$wrapper.find('#bank-account').on('click', () => { | ||
show_bank_account_number(frm) | ||
}) | ||
}, | ||
}) | ||
|
||
function show_bank_account_number(frm) { | ||
frappe.xcall('check_run.check_run.show_bank_account_number', { doctype: frm.doc.doctype, docname: frm.doc.name }) | ||
.then(r => { | ||
let msg = `Routing Number ${r.routing_number}<br>Account Number: ${r.account_number}` | ||
frappe.msgprint(msg, "Bank Information") | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
frappe.ui.form.on('Supplier', { | ||
onload_post_render: frm => { | ||
frm.fields_dict.bank_account.$wrapper.find('#bank-account').on('click', () => { | ||
show_bank_account_number(frm) | ||
}) | ||
}, | ||
}) | ||
|
||
function show_bank_account_number(frm) { | ||
frappe.xcall('check_run.check_run.show_bank_account_number', { doctype: frm.doc.doctype, docname: frm.doc.name }) | ||
.then(r => { | ||
let msg = `Routing Number ${r.routing_number}<br>Account Number: ${r.account_number}` | ||
frappe.msgprint(msg, "Bank Information") | ||
}) | ||
} |