Skip to content

Commit

Permalink
Merge pull request #2624 from resilient-tech/mergify/bp/version-15-ho…
Browse files Browse the repository at this point in the history
…tfix/pr-2623

fix: also check the purpose of transfer (backport #2623)
  • Loading branch information
mergify[bot] authored Sep 19, 2024
2 parents 66b6fa2 + f02ff30 commit db81eb8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ def validate(doc, method=None):
if ignore_gst_validation_for_subcontracting(doc):
return

if doc.get("purpose") != "Send to Subcontractor":
return

field_map = (
STOCK_ENTRY_FIELD_MAP
if doc.doctype == "Stock Entry"
Expand Down Expand Up @@ -327,7 +330,6 @@ def set_address_display(doc):
def get_relevant_references(
supplier, supplied_items, received_items, subcontracting_orders
):

if isinstance(supplied_items, str):
supplied_items = frappe.parse_json(supplied_items)
received_items = frappe.parse_json(received_items)
Expand Down

0 comments on commit db81eb8

Please sign in to comment.