Closed guilmori closed 2 years ago
this is intentional. Is there any problem?
Duplicate of: https://github.com/frappe/erpnext/issues/29472 (add more info here if required)
Stock queue addressed here: https://github.com/frappe/erpnext/pull/29302
Thanks for the quick reply. I have some custom report which SUM(actual_qty), that doesn't work anymore once Stock Recon is made. So is this intentional or will it be fixed as per #29472 ?
This is intentional for sure but just like the problem you faced we also end up adding complexity for this edge case :)
Id like to fix it but no timelines for this.
This is intentional for sure but just like the problem you faced we also end up adding complexity for this edge case :)
Id like to fix it but no timelines for this.
I would really appreciate if you can give me some reference code where this additional complexity is handled. No worry if you don't have time, I can search for it too :-)
Check stock balance report code.
Also bin doctype might be better for building simple integration / reports on stock qty.
Check stock balance report code.
Also bin doctype might be better for building simple integration / reports on stock qty.
I can't use bin doctype as I need batch-wise qty and prices.
I'm building this simple Stock List:
Building my own because I didn't find any built-in report showing batch-wise actual qty and price. This was my query, but now the Stock Recon breaks the sum(actual_qty)... so I'll have to query non-batch items another way.
select sle.item_code, item.item_group, sle.warehouse, IFNULL(sle.batch_no,'') as batch_no, item.stock_uom,
sum(sle.actual_qty) as qty,
sum(sle.stock_value_difference) AS total_value,
sum(sle.stock_value_difference) / sum(sle.actual_qty) AS unit_value
from `tabStock Ledger Entry` sle
inner join `tabItem` item ON item.name = sle.item_code
left join `tabBatch` batch ON batch.name = sle.batch_no
where sle.is_cancelled = 0 and sle.docstatus < 2
group by sle.warehouse, IFNULL(sle.batch_no,''), sle.item_code
having sum(sle.actual_qty) != 0
order by item.item_group, sle.item_code, sle.warehouse
Information about bug
Here I created a Stock Reconciliation for a non-batch item:
You can see the generated Stock ledger Entry doesn't have a value for
actual_qty
:And while I'm typing this I notice the
stock_queue
being assigned in the SLE, while the item is usingMoving Average
valuation method, why is that?Module
stock
Version
13.16.0
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response