mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 15:00:27 +00:00
fix: return from accepted and rejected warehouse at a same time not working
(cherry picked from commit 17731f09ef)
This commit is contained in:
committed by
Mergify
parent
c04ba3864e
commit
6c57971abc
@@ -255,10 +255,17 @@ class StockController(AccountsController):
|
||||
qty_field = "qty"
|
||||
warehouse_field = "warehouse"
|
||||
|
||||
if not data.get("qty"):
|
||||
frappe.throw(
|
||||
_("For the {0}, no stock is available for the return in the warehouse {1}.").format(
|
||||
frappe.bold(row.item_code), row.get(warehouse_field)
|
||||
)
|
||||
)
|
||||
|
||||
data = filter_serial_batches(
|
||||
self, data, row, warehouse_field=warehouse_field, qty_field=qty_field
|
||||
)
|
||||
bundle = make_serial_batch_bundle_for_return(data, row, self, warehouse_field)
|
||||
bundle = make_serial_batch_bundle_for_return(data, row, self, warehouse_field, qty_field)
|
||||
if row.get("return_qty_from_rejected_warehouse"):
|
||||
row.db_set(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user