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
|
||||
if (frm.doc.docstatus==1) {
|
||||
if (frm.doc.docstatus===1 && frm.doc.payment_order_type==='Payment Request') {
|
||||
frm.add_custom_button(__('Create Payment Entries'),
|
||||
function() {
|
||||
frm.trigger("make_payment_records");
|
||||
@ -99,4 +99,4 @@ frappe.ui.form.on('Payment Order', {
|
||||
dialog.show();
|
||||
},
|
||||
|
||||
});
|
||||
});
|
@ -7,10 +7,12 @@
|
||||
"field_order": [
|
||||
"naming_series",
|
||||
"company",
|
||||
"payment_order_type",
|
||||
"party",
|
||||
"column_break_2",
|
||||
"posting_date",
|
||||
"bank",
|
||||
"bank_account",
|
||||
"section_break_5",
|
||||
"references",
|
||||
"amended_from"
|
||||
@ -50,6 +52,7 @@
|
||||
"label": "Posting Date"
|
||||
},
|
||||
{
|
||||
"fetch_from": "Company.default_bank",
|
||||
"fieldname": "bank",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
@ -76,10 +79,22 @@
|
||||
"options": "Payment Order",
|
||||
"print_hide": 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,
|
||||
"modified": "2019-05-05 22:26:22.170326",
|
||||
"modified": "2019-05-06 16:40:11.397341",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Order",
|
||||
|
@ -1,6 +1,6 @@
|
||||
frappe.ui.form.on('Payment Order', {
|
||||
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'),
|
||||
function() {
|
||||
frm.trigger("generate_text_and_download_file");
|
||||
|
Loading…
Reference in New Issue
Block a user