mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
fix: allow creation of DN in SI for items not having DN reference
(cherry picked from commit b691de0147)
# Conflicts:
# erpnext/accounts/doctype/sales_invoice/sales_invoice.js
# erpnext/accounts/doctype/sales_invoice/sales_invoice.py
This commit is contained in:
@@ -111,6 +111,7 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
|
||||
}
|
||||
|
||||
if (cint(doc.update_stock) != 1) {
|
||||
<<<<<<< HEAD
|
||||
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
|
||||
var from_delivery_note = false;
|
||||
from_delivery_note = cur_frm.doc.items.some(function (item) {
|
||||
@@ -121,6 +122,12 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends (
|
||||
cur_frm.add_custom_button(
|
||||
__("Delivery"),
|
||||
cur_frm.cscript["Make Delivery Note"],
|
||||
=======
|
||||
if (!is_delivered_by_supplier) {
|
||||
this.frm.add_custom_button(
|
||||
__("Delivery Note"),
|
||||
this.frm.cscript["Make Delivery Note"],
|
||||
>>>>>>> b691de0147 (fix: allow creation of DN in SI for items not having DN reference)
|
||||
__("Create")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2211,7 +2211,13 @@ def make_delivery_note(source_name, target_doc=None):
|
||||
"cost_center": "cost_center",
|
||||
},
|
||||
"postprocess": update_item,
|
||||
<<<<<<< HEAD
|
||||
"condition": lambda doc: doc.delivered_by_supplier != 1,
|
||||
=======
|
||||
"condition": lambda doc: doc.delivered_by_supplier != 1
|
||||
and not doc.scio_detail
|
||||
and not doc.dn_detail,
|
||||
>>>>>>> b691de0147 (fix: allow creation of DN in SI for items not having DN reference)
|
||||
},
|
||||
"Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True},
|
||||
"Sales Team": {
|
||||
|
||||
Reference in New Issue
Block a user