test: added test case
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index cf26bae..a3a1461 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -105,6 +105,8 @@
def set_rate_for_standalone_debit_note(self):
if self.get("is_return") and self.get("update_stock") and not self.return_against:
for row in self.items:
+
+ # override the rate with valuation rate
row.rate = get_incoming_rate(
{
"item_code": row.item_code,