mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
chore: resolve conflicts
This commit is contained in:
@@ -2807,67 +2807,7 @@ class TestDeliveryNote(FrappeTestCase):
|
|||||||
|
|
||||||
frappe.db.set_single_value("System Settings", "float_precision", original_flt_precision)
|
frappe.db.set_single_value("System Settings", "float_precision", original_flt_precision)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
@change_settings("Selling Settings", {"validate_selling_price": 1})
|
||||||
=======
|
|
||||||
def test_different_rate_for_same_serial_nos(self):
|
|
||||||
item_code = make_item(
|
|
||||||
"Test Different Rate Serial No Item",
|
|
||||||
properties={"is_stock_item": 1, "has_serial_no": 1, "serial_no_series": "DRSN-.#####"},
|
|
||||||
).name
|
|
||||||
|
|
||||||
se = make_stock_entry(item_code=item_code, target="_Test Warehouse - _TC", qty=1, basic_rate=100)
|
|
||||||
serial_nos = get_serial_nos_from_bundle(se.items[0].serial_and_batch_bundle)
|
|
||||||
|
|
||||||
dn = create_delivery_note(
|
|
||||||
item_code=item_code,
|
|
||||||
qty=1,
|
|
||||||
rate=300,
|
|
||||||
use_serial_batch_fields=1,
|
|
||||||
serial_no="\n".join(serial_nos),
|
|
||||||
)
|
|
||||||
|
|
||||||
dn.reload()
|
|
||||||
|
|
||||||
sabb = frappe.get_doc("Serial and Batch Bundle", dn.items[0].serial_and_batch_bundle)
|
|
||||||
for entry in sabb.entries:
|
|
||||||
self.assertEqual(entry.incoming_rate, 100)
|
|
||||||
|
|
||||||
make_stock_entry(
|
|
||||||
item_code=item_code,
|
|
||||||
target="_Test Warehouse - _TC",
|
|
||||||
qty=1,
|
|
||||||
basic_rate=200,
|
|
||||||
use_serial_batch_fields=1,
|
|
||||||
serial_no="\n".join(serial_nos),
|
|
||||||
)
|
|
||||||
dn1 = create_delivery_note(
|
|
||||||
item_code=item_code,
|
|
||||||
qty=1,
|
|
||||||
rate=300,
|
|
||||||
use_serial_batch_fields=1,
|
|
||||||
serial_no="\n".join(serial_nos),
|
|
||||||
)
|
|
||||||
|
|
||||||
dn1.reload()
|
|
||||||
|
|
||||||
sabb = frappe.get_doc("Serial and Batch Bundle", dn1.items[0].serial_and_batch_bundle)
|
|
||||||
for entry in sabb.entries:
|
|
||||||
self.assertEqual(entry.incoming_rate, 200)
|
|
||||||
|
|
||||||
doc = frappe.new_doc("Repost Item Valuation")
|
|
||||||
doc.voucher_type = "Stock Entry"
|
|
||||||
doc.voucher_no = se.name
|
|
||||||
doc.submit()
|
|
||||||
|
|
||||||
sabb = frappe.get_doc("Serial and Batch Bundle", dn.items[0].serial_and_batch_bundle)
|
|
||||||
for entry in sabb.entries:
|
|
||||||
self.assertEqual(entry.incoming_rate, 100)
|
|
||||||
|
|
||||||
sabb = frappe.get_doc("Serial and Batch Bundle", dn1.items[0].serial_and_batch_bundle)
|
|
||||||
for entry in sabb.entries:
|
|
||||||
self.assertEqual(entry.incoming_rate, 200)
|
|
||||||
|
|
||||||
@IntegrationTestCase.change_settings("Selling Settings", {"validate_selling_price": 1})
|
|
||||||
def test_validate_selling_price(self):
|
def test_validate_selling_price(self):
|
||||||
item_code = make_item("VSP Item", properties={"is_stock_item": 1}).name
|
item_code = make_item("VSP Item", properties={"is_stock_item": 1}).name
|
||||||
make_stock_entry(item_code=item_code, target="_Test Warehouse - _TC", qty=1, basic_rate=10)
|
make_stock_entry(item_code=item_code, target="_Test Warehouse - _TC", qty=1, basic_rate=10)
|
||||||
@@ -2884,7 +2824,6 @@ class TestDeliveryNote(FrappeTestCase):
|
|||||||
dn.items[0].stock_qty = 2
|
dn.items[0].stock_qty = 2
|
||||||
dn.save()
|
dn.save()
|
||||||
|
|
||||||
>>>>>>> 135a433018 (Merge pull request #52246 from mihir-kandoi/st58765)
|
|
||||||
|
|
||||||
def create_delivery_note(**args):
|
def create_delivery_note(**args):
|
||||||
dn = frappe.new_doc("Delivery Note")
|
dn = frappe.new_doc("Delivery Note")
|
||||||
|
|||||||
Reference in New Issue
Block a user