Skip to content

Commit

Permalink
Merge pull request #2623 from Ninad1306/stock_entry_fix
Browse files Browse the repository at this point in the history
fix: also check the purpose of transfer
  • Loading branch information
mergify[bot] committed Sep 19, 2024
2 parents 6841a22 + b34a29a commit 79f56df
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,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 @@ -330,7 +333,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 79f56df

Please sign in to comment.