mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
Revert "feat: show reconciled/unreconciled indicator in list view"
This commit is contained in:
@@ -1,20 +1,4 @@
|
|||||||
frappe.listview_settings["Payment Entry"] = {
|
frappe.listview_settings["Payment Entry"] = {
|
||||||
add_fields: ["unallocated_amount", "docstatus"],
|
|
||||||
get_indicator: function (doc) {
|
|
||||||
if (doc.docstatus === 2) {
|
|
||||||
return [__("Cancelled"), "red", "docstatus,=,2"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doc.docstatus === 0) {
|
|
||||||
return [__("Draft"), "orange", "docstatus,=,0"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flt(doc.unallocated_amount) > 0) {
|
|
||||||
return [__("Unreconciled"), "orange", "docstatus,=,1|unallocated_amount,>,0"];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [__("Reconciled"), "green", "docstatus,=,1|unallocated_amount,=,0"];
|
|
||||||
},
|
|
||||||
onload: function (listview) {
|
onload: function (listview) {
|
||||||
if (listview.page.fields_dict.party_type) {
|
if (listview.page.fields_dict.party_type) {
|
||||||
listview.page.fields_dict.party_type.get_query = function () {
|
listview.page.fields_dict.party_type.get_query = function () {
|
||||||
|
|||||||
@@ -140,8 +140,7 @@ erpnext.accounts.unreconcile_payment = {
|
|||||||
selected_allocations
|
selected_allocations
|
||||||
);
|
);
|
||||||
erpnext.accounts.unreconcile_payment.create_unreconcile_docs(
|
erpnext.accounts.unreconcile_payment.create_unreconcile_docs(
|
||||||
selection_map,
|
selection_map
|
||||||
frm
|
|
||||||
);
|
);
|
||||||
d.hide();
|
d.hide();
|
||||||
} else {
|
} else {
|
||||||
@@ -157,23 +156,12 @@ erpnext.accounts.unreconcile_payment = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
create_unreconcile_docs(selection_map, frm) {
|
create_unreconcile_docs(selection_map) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.accounts.doctype.unreconcile_payment.unreconcile_payment.create_unreconcile_doc_for_selection",
|
method: "erpnext.accounts.doctype.unreconcile_payment.unreconcile_payment.create_unreconcile_doc_for_selection",
|
||||||
args: {
|
args: {
|
||||||
selections: selection_map,
|
selections: selection_map,
|
||||||
},
|
},
|
||||||
callback: function (r) {
|
|
||||||
if (r.exc) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frm && !frm.is_new()) {
|
|
||||||
frm.reload_doc();
|
|
||||||
}
|
|
||||||
|
|
||||||
frappe.show_alert({ message: __("Unreconciled successfully"), indicator: "green" });
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user