feat: show generate txt button for payment entry
This commit is contained in:
parent
27ea171187
commit
f709f330ce
@ -13,7 +13,7 @@ frappe.ui.form.on('Payment Order', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// payment Entry
|
// payment Entry
|
||||||
if (frm.doc.docstatus==1) {
|
if (frm.doc.docstatus===1 && frm.doc.payment_order_type==='Payment Request') {
|
||||||
frm.add_custom_button(__('Create Payment Entries'),
|
frm.add_custom_button(__('Create Payment Entries'),
|
||||||
function() {
|
function() {
|
||||||
frm.trigger("make_payment_records");
|
frm.trigger("make_payment_records");
|
||||||
|
@ -7,10 +7,12 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"naming_series",
|
"naming_series",
|
||||||
"company",
|
"company",
|
||||||
|
"payment_order_type",
|
||||||
"party",
|
"party",
|
||||||
"column_break_2",
|
"column_break_2",
|
||||||
"posting_date",
|
"posting_date",
|
||||||
"bank",
|
"bank",
|
||||||
|
"bank_account",
|
||||||
"section_break_5",
|
"section_break_5",
|
||||||
"references",
|
"references",
|
||||||
"amended_from"
|
"amended_from"
|
||||||
@ -50,6 +52,7 @@
|
|||||||
"label": "Posting Date"
|
"label": "Posting Date"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"fetch_from": "Company.default_bank",
|
||||||
"fieldname": "bank",
|
"fieldname": "bank",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
@ -76,10 +79,22 @@
|
|||||||
"options": "Payment Order",
|
"options": "Payment Order",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "bank_account",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Bank Account",
|
||||||
|
"options": "Bank Account"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "payment_order_type",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Payment Order Type",
|
||||||
|
"options": "\nPayment Request\nPayment Entry"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2019-05-05 22:26:22.170326",
|
"modified": "2019-05-06 16:40:11.397341",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Order",
|
"name": "Payment Order",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
frappe.ui.form.on('Payment Order', {
|
frappe.ui.form.on('Payment Order', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
if (frm.doc.docstatus==1) {
|
if (frm.doc.docstatus==1 && frm.doc.payment_order_type==='Payment Request') {
|
||||||
frm.add_custom_button(__('Generate Text File'),
|
frm.add_custom_button(__('Generate Text File'),
|
||||||
function() {
|
function() {
|
||||||
frm.trigger("generate_text_and_download_file");
|
frm.trigger("generate_text_and_download_file");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user