mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 05:09:11 +00:00
fix: stock_ageing.py report convert string numeric to flt value
This PR combines these two PRs below applied to develop, to be applied to version-12-hotfix (The mergifyio process failed for some reason.) https://github.com/frappe/erpnext/pull/22430 https://github.com/frappe/erpnext/pull/22206
This commit is contained in:
@@ -178,14 +178,14 @@ def get_fifo_queue(filters, sle=None):
|
|||||||
qty_to_pop = abs(d.actual_qty)
|
qty_to_pop = abs(d.actual_qty)
|
||||||
while qty_to_pop:
|
while qty_to_pop:
|
||||||
batch = fifo_queue[0] if fifo_queue else [0, None]
|
batch = fifo_queue[0] if fifo_queue else [0, None]
|
||||||
if 0 < batch[0] <= qty_to_pop:
|
if 0 < flt(batch[0]) <= qty_to_pop:
|
||||||
# if batch qty > 0
|
# if batch qty > 0
|
||||||
# not enough or exactly same qty in current batch, clear batch
|
# not enough or exactly same qty in current batch, clear batch
|
||||||
qty_to_pop -= batch[0]
|
qty_to_pop -= flt(batch[0])
|
||||||
transferred_item_details[(d.voucher_no, d.name)].append(fifo_queue.pop(0))
|
transferred_item_details[(d.voucher_no, d.name)].append(fifo_queue.pop(0))
|
||||||
else:
|
else:
|
||||||
# all from current batch
|
# all from current batch
|
||||||
batch[0] -= qty_to_pop
|
batch[0] = flt(batch[0]) - qty_to_pop
|
||||||
transferred_item_details[(d.voucher_no, d.name)].append([qty_to_pop, batch[1]])
|
transferred_item_details[(d.voucher_no, d.name)].append([qty_to_pop, batch[1]])
|
||||||
qty_to_pop = 0
|
qty_to_pop = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user