Validate rate in PO with supplier quotation only if checking is enabled via Buying Settings (#12734)
This commit is contained in:
parent
cae13bf048
commit
91c5e4c429
@ -68,12 +68,16 @@ class PurchaseOrder(BuyingController):
|
|||||||
},
|
},
|
||||||
"Supplier Quotation Item": {
|
"Supplier Quotation Item": {
|
||||||
"ref_dn_field": "supplier_quotation_item",
|
"ref_dn_field": "supplier_quotation_item",
|
||||||
"compare_fields": [["rate", "="], ["project", "="], ["item_code", "="],
|
"compare_fields": [["project", "="], ["item_code", "="],
|
||||||
["uom", "="], ["conversion_factor", "="]],
|
["uom", "="], ["conversion_factor", "="]],
|
||||||
"is_child_table": True
|
"is_child_table": True
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if cint(frappe.db.get_single_value('Buying Settings', 'maintain_same_rate')):
|
||||||
|
self.validate_rate_with_reference_doc([["Supplier Quotation", "supplier_quotation", "supplier_quotation_item"]])
|
||||||
|
|
||||||
def validate_supplier(self):
|
def validate_supplier(self):
|
||||||
prevent_po = frappe.db.get_value("Supplier", self.supplier, 'prevent_pos')
|
prevent_po = frappe.db.get_value("Supplier", self.supplier, 'prevent_pos')
|
||||||
if prevent_po:
|
if prevent_po:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user