fix: valuation rate for sales / purchase return for serial / batch nos (#43925)

This commit is contained in:
rohitwaghchaure
2024-10-31 22:54:29 +05:30
committed by GitHub
parent c7d6923452
commit 01bb1612da
6 changed files with 643 additions and 13 deletions

View File

@@ -334,6 +334,11 @@ class StockController(AccountsController):
}
)
if self.doctype in ["Sales Invoice", "Delivery Note"]:
row.db_set(
"incoming_rate", frappe.db.get_value("Serial and Batch Bundle", bundle, "avg_rate")
)
def get_reference_ids(self, table_name, qty_field=None, bundle_field=None) -> tuple[str, list[str]]:
field = {
"Sales Invoice": "sales_invoice_item",