fix: completed DC will not appear in a delivery trip (#41655)
* fix: completed DC will not appear in a delivery trip
* fix: completed DC will not appear in a delivery trip
(cherry picked from commit 4f0214d00e)
# Conflicts:
# erpnext/stock/doctype/delivery_note/delivery_note.js
This commit is contained in:
committed by
Mergify
parent
638c94451e
commit
a3444a07b7
@@ -205,7 +205,11 @@ erpnext.stock.DeliveryNoteController = class DeliveryNoteController extends (
|
||||
);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (doc.docstatus == 1) {
|
||||
=======
|
||||
if (doc.docstatus == 1 && doc.status != "Completed" && frappe.model.can_create("Delivery Trip")) {
|
||||
>>>>>>> 4f0214d00e (fix: completed DC will not appear in a delivery trip (#41655))
|
||||
this.frm.add_custom_button(
|
||||
__("Delivery Trip"),
|
||||
function () {
|
||||
|
||||
@@ -58,10 +58,12 @@ frappe.ui.form.on("Delivery Trip", {
|
||||
date_field: "posting_date",
|
||||
setters: {
|
||||
company: frm.doc.company,
|
||||
customer: null,
|
||||
},
|
||||
get_query_filters: {
|
||||
docstatus: 1,
|
||||
company: frm.doc.company,
|
||||
status: ["Not In", ["Completed", "Cancelled"]],
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user