Skip to content

Commit

Permalink
fix: validate so item with qtn
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Oct 23, 2023
1 parent b099590 commit 17ebc1e
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 @@ -216,7 +216,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 17ebc1e

Please sign in to comment.