mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 19:35:09 +00:00
Merge pull request #50912 from aerele/issue-50832
This commit is contained in:
@@ -94,6 +94,7 @@ status_map = {
|
||||
["To Bill", "eval:self.per_billed < 100 and self.docstatus == 1"],
|
||||
["Completed", "eval:self.per_billed == 100 and self.docstatus == 1"],
|
||||
["Return Issued", "eval:self.per_returned == 100 and self.docstatus == 1"],
|
||||
["Return", "eval:self.is_return == 1 and self.per_billed == 0 and self.docstatus == 1"],
|
||||
["Cancelled", "eval:self.docstatus==2"],
|
||||
["Closed", "eval:self.status=='Closed' and self.docstatus != 2"],
|
||||
],
|
||||
|
||||
@@ -1070,7 +1070,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nDraft\nTo Bill\nCompleted\nReturn Issued\nCancelled\nClosed",
|
||||
"options": "\nDraft\nTo Bill\nCompleted\nReturn\nReturn Issued\nCancelled\nClosed",
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"read_only": 1,
|
||||
@@ -1433,7 +1433,7 @@
|
||||
"idx": 146,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2025-08-04 19:20:47.724218",
|
||||
"modified": "2025-12-02 23:55:25.415443",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note",
|
||||
|
||||
@@ -126,7 +126,9 @@ class DeliveryNote(SellingController):
|
||||
shipping_address: DF.TextEditor | None
|
||||
shipping_address_name: DF.Link | None
|
||||
shipping_rule: DF.Link | None
|
||||
status: DF.Literal["", "Draft", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed"]
|
||||
status: DF.Literal[
|
||||
"", "Draft", "To Bill", "Completed", "Return", "Return Issued", "Cancelled", "Closed"
|
||||
]
|
||||
tax_category: DF.Link | None
|
||||
tax_id: DF.Data | None
|
||||
taxes: DF.Table[SalesTaxesandCharges]
|
||||
|
||||
@@ -12,8 +12,8 @@ frappe.listview_settings["Delivery Note"] = {
|
||||
"currency",
|
||||
],
|
||||
get_indicator: function (doc) {
|
||||
if (cint(doc.is_return) == 1) {
|
||||
return [__("Return"), "gray", "is_return,=,Yes"];
|
||||
if (cint(doc.is_return) == 1 && doc.status == "Return") {
|
||||
return [__("Return"), "gray", "is_return,=,1"];
|
||||
} else if (doc.status === "Closed") {
|
||||
return [__("Closed"), "green", "status,=,Closed"];
|
||||
} else if (doc.status === "Return Issued") {
|
||||
|
||||
@@ -2608,6 +2608,7 @@ class TestDeliveryNote(IntegrationTestCase):
|
||||
dn = make_delivery_note(so.name)
|
||||
dn.submit()
|
||||
self.assertEqual(dn.per_billed, 0)
|
||||
self.assertEqual(dn.status, "To Bill")
|
||||
|
||||
si = make_sales_invoice(dn.name)
|
||||
si.location = "Test Location"
|
||||
@@ -2622,6 +2623,7 @@ class TestDeliveryNote(IntegrationTestCase):
|
||||
dn.load_from_db()
|
||||
self.assertEqual(dn.per_billed, 100)
|
||||
self.assertEqual(dn.per_returned, 100)
|
||||
self.assertEqual(returned.status, "Return")
|
||||
|
||||
def test_packed_item_serial_no_status(self):
|
||||
from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle
|
||||
|
||||
@@ -12,7 +12,7 @@ frappe.listview_settings["Purchase Receipt"] = {
|
||||
],
|
||||
get_indicator: function (doc) {
|
||||
if (cint(doc.is_return) == 1 && doc.status == "Return") {
|
||||
return [__("Return"), "gray", "is_return,=,Yes"];
|
||||
return [__("Return"), "gray", "is_return,=,1"];
|
||||
} else if (doc.status === "Closed") {
|
||||
return [__("Closed"), "green", "status,=,Closed"];
|
||||
} else if (flt(doc.per_returned, 2) === 100) {
|
||||
|
||||
Reference in New Issue
Block a user