Skip to content

Commit

Permalink
fix: validate so item with qtn
Browse files Browse the repository at this point in the history
(cherry picked from commit 17ebc1e)
  • Loading branch information
GursheenK authored and mergify[bot] committed Nov 1, 2023
1 parent 9675da6 commit 71538cf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion erpnext/selling/doctype/sales_order/sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,15 @@ def validate_warehouse(self):

def validate_with_previous_doc(self):
super(SalesOrder, self).validate_with_previous_doc(
{"Quotation": {"ref_dn_field": "prevdoc_docname", "compare_fields": [["company", "="]]}}
{
"Quotation": {"ref_dn_field": "prevdoc_docname", "compare_fields": [["company", "="]]},
"Quotation Item": {
"ref_dn_field": "quotation_item",
"compare_fields": [["item_code", "="], ["uom", "="], ["conversion_factor", "="]],
"is_child_table": True,
"allow_duplicate_prev_row_id": True,
},
}
)

if cint(frappe.db.get_single_value("Selling Settings", "maintain_same_sales_rate")):
Expand Down

0 comments on commit 71538cf

Please sign in to comment.