mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
* refactor: rename field `Over Order Allowance` to `Blanket Order Allowance` (cherry picked from commit8ffa2bfe25) * chore: patch to rename field `over_order_allowance` (cherry picked from commitfcfcf6957e) --------- Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -107,7 +107,7 @@ def validate_against_blanket_order(order_doc):
|
||||
allowance = flt(
|
||||
frappe.db.get_single_value(
|
||||
"Selling Settings" if order_doc.doctype == "Sales Order" else "Buying Settings",
|
||||
"over_order_allowance",
|
||||
"blanket_order_allowance",
|
||||
)
|
||||
)
|
||||
for bo_name, item_data in order_data.items():
|
||||
|
||||
@@ -63,7 +63,7 @@ class TestBlanketOrder(FrappeTestCase):
|
||||
po1.currency = get_company_currency(po1.company)
|
||||
self.assertEqual(po1.items[0].qty, (bo.items[0].qty - bo.items[0].ordered_qty))
|
||||
|
||||
def test_over_order_allowance(self):
|
||||
def test_blanket_order_allowance(self):
|
||||
# Sales Order
|
||||
bo = make_blanket_order(blanket_order_type="Selling", quantity=100)
|
||||
|
||||
@@ -74,7 +74,7 @@ class TestBlanketOrder(FrappeTestCase):
|
||||
so.items[0].qty = 110
|
||||
self.assertRaises(frappe.ValidationError, so.submit)
|
||||
|
||||
frappe.db.set_single_value("Selling Settings", "over_order_allowance", 10)
|
||||
frappe.db.set_single_value("Selling Settings", "blanket_order_allowance", 10)
|
||||
so.submit()
|
||||
|
||||
# Purchase Order
|
||||
@@ -87,7 +87,7 @@ class TestBlanketOrder(FrappeTestCase):
|
||||
po.items[0].qty = 110
|
||||
self.assertRaises(frappe.ValidationError, po.submit)
|
||||
|
||||
frappe.db.set_single_value("Buying Settings", "over_order_allowance", 10)
|
||||
frappe.db.set_single_value("Buying Settings", "blanket_order_allowance", 10)
|
||||
po.submit()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user