feat: remove first row if empty
This commit is contained in:
parent
3ca8976037
commit
644e181729
@ -31,6 +31,10 @@ frappe.ui.form.on('Payment Order', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get_from_payment_entry: function(frm) {
|
get_from_payment_entry: function(frm) {
|
||||||
|
// remove if first row is empty
|
||||||
|
if (!frm.doc.references[0].reference_name) {
|
||||||
|
frm.doc.references = [];
|
||||||
|
}
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.accounts.doctype.payment_entry.payment_entry.make_payment_order",
|
method: "erpnext.accounts.doctype.payment_entry.payment_entry.make_payment_order",
|
||||||
source_doctype: "Payment Entry",
|
source_doctype: "Payment Entry",
|
||||||
@ -42,11 +46,16 @@ frappe.ui.form.on('Payment Order', {
|
|||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
bank: frm.doc.bank,
|
bank: frm.doc.bank,
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
|
status: ["=", "Initiated"],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
get_from_payment_request: function(frm) {
|
get_from_payment_request: function(frm) {
|
||||||
|
// remove if first row is empty
|
||||||
|
if (!frm.doc.references[0].reference_name) {
|
||||||
|
frm.doc.references = [];
|
||||||
|
}
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.accounts.doctype.payment_request.payment_request.make_payment_order",
|
method: "erpnext.accounts.doctype.payment_request.payment_request.make_payment_order",
|
||||||
source_doctype: "Payment Request",
|
source_doctype: "Payment Request",
|
||||||
|
Loading…
Reference in New Issue
Block a user