mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 12:55:10 +00:00
fix(stock): remove is_return condition on pos batch qty calculation
(cherry picked from commit 2c19c1fd06)
This commit is contained in:
@@ -2477,11 +2477,11 @@ def get_reserved_batches_for_pos(kwargs) -> dict:
|
|||||||
|
|
||||||
key = (row.batch_no, row.warehouse)
|
key = (row.batch_no, row.warehouse)
|
||||||
if key in pos_batches:
|
if key in pos_batches:
|
||||||
pos_batches[key]["qty"] -= row.qty * -1 if row.is_return else row.qty
|
pos_batches[key]["qty"] += row.qty * -1
|
||||||
else:
|
else:
|
||||||
pos_batches[key] = frappe._dict(
|
pos_batches[key] = frappe._dict(
|
||||||
{
|
{
|
||||||
"qty": (row.qty * -1 if not row.is_return else row.qty),
|
"qty": row.qty * -1,
|
||||||
"warehouse": row.warehouse,
|
"warehouse": row.warehouse,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user