mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 05:58:27 +00:00
Merge pull request #41741 from frappe/mergify/bp/version-15-hotfix/pr-41655
fix: completed DC will not appear in a delivery trip (backport #41655)
This commit is contained in:
@@ -223,7 +223,7 @@ erpnext.stock.DeliveryNoteController = class DeliveryNoteController extends (
|
||||
);
|
||||
}
|
||||
|
||||
if (doc.docstatus == 1 && frappe.model.can_create("Delivery Trip")) {
|
||||
if (doc.docstatus == 1 && doc.status != "Completed" && frappe.model.can_create("Delivery Trip")) {
|
||||
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