Skip to content

Commit

Permalink
fix: move condition for shipment
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Jun 20, 2024
1 parent 9bad219 commit 2180239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/delivery_note/delivery_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ erpnext.stock.DeliveryNoteController = class DeliveryNoteController extends (
);
}

if (!doc.is_return && doc.status != "Closed" && frappe.model.can_create("Shipment")) {
if (doc.docstatus == 1) {
if (!doc.is_return && doc.status != "Closed") {
if (doc.docstatus == 1 && frappe.model.can_create("Shipment")) {
this.frm.add_custom_button(
__("Shipment"),
function () {
Expand Down

0 comments on commit 2180239

Please sign in to comment.