Skip to content

Commit

Permalink
fix: completed DC will not appear in a delivery trip (#41655)
Browse files Browse the repository at this point in the history
* fix: completed DC will not appear in a delivery trip

* fix: completed DC will not appear in a delivery trip

(cherry picked from commit 4f0214d)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/delivery_note.js
  • Loading branch information
Nihantra-Patel authored and mergify[bot] committed Jun 3, 2024
1 parent 638c944 commit a3444a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/stock/doctype/delivery_note/delivery_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
2 changes: 2 additions & 0 deletions erpnext/stock/doctype/delivery_trip/delivery_trip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]],
},
});
},
Expand Down

0 comments on commit a3444a0

Please sign in to comment.