mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
committed by
Mergify
parent
6b68a50cc4
commit
467fe1d72f
@@ -4,7 +4,7 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _, bold
|
||||||
from frappe.model.meta import get_field_precision
|
from frappe.model.meta import get_field_precision
|
||||||
from frappe.utils import cint, flt, format_datetime, get_datetime
|
from frappe.utils import cint, flt, format_datetime, get_datetime
|
||||||
|
|
||||||
@@ -40,11 +40,12 @@ def validate_return_against(doc):
|
|||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("The {0} {1} does not match with the {0} {2} in the {3} {4}").format(
|
_("The {0} {1} does not match with the {0} {2} in the {3} {4}").format(
|
||||||
doc.meta.get_label(party_type),
|
doc.meta.get_label(party_type),
|
||||||
doc.get(party_type),
|
bold(doc.get(party_type)),
|
||||||
ref_doc.get(party_type),
|
bold(ref_doc.get(party_type)),
|
||||||
ref_doc.doctype,
|
ref_doc.doctype,
|
||||||
ref_doc.name,
|
ref_doc.name,
|
||||||
)
|
),
|
||||||
|
title=_("Party Mismatch"),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -68,10 +68,13 @@ class SellingController(StockController):
|
|||||||
|
|
||||||
serial_nos = frappe.get_all(
|
serial_nos = frappe.get_all(
|
||||||
"Serial and Batch Entry",
|
"Serial and Batch Entry",
|
||||||
filters={"parent": ("in", bundle_ids)},
|
filters={"parent": ("in", bundle_ids), "serial_no": ("is", "set")},
|
||||||
pluck="serial_no",
|
pluck="serial_no",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not serial_nos:
|
||||||
|
return
|
||||||
|
|
||||||
if serial_nos := frappe.get_all(
|
if serial_nos := frappe.get_all(
|
||||||
"Serial No",
|
"Serial No",
|
||||||
filters={"name": ("in", serial_nos), "customer": ("is", "set")},
|
filters={"name": ("in", serial_nos), "customer": ("is", "set")},
|
||||||
|
|||||||
Reference in New Issue
Block a user