fix: incoming rate for the stand-alone credit note

This commit is contained in:
Rohit Waghchaure
2025-06-23 14:28:28 +05:30
parent 2dc05a369b
commit b06eca8dcb
3 changed files with 106 additions and 0 deletions

View File

@@ -527,6 +527,15 @@ class SellingController(StockController):
self.doctype, self.name, d.item_code, self.return_against, item_row=d
)
if (
self.get("is_return")
and not d.incoming_rate
and not self.get("return_against")
and not self.is_internal_transfer()
and not d.get("allow_zero_valuation_rate")
):
d.incoming_rate = d.rate
# For internal transfers use incoming rate as the valuation rate
if self.is_internal_transfer():
if self.doctype == "Delivery Note" or self.get("update_stock"):