feat: 对账小账本按归属日期统计
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from app.routers import reconciliation
|
||||
|
||||
|
||||
def test_fold_reported_good_quantity_rows_uses_allocation_month_for_latest_process_only():
|
||||
rows = [
|
||||
("嘉恒", "产品A", "1序", 7, 999),
|
||||
("嘉恒", "产品A", "2序", 7, 350),
|
||||
("嘉恒", "产品A", "2序", 8, 300),
|
||||
]
|
||||
latest_processes = {("嘉恒", "产品A"): {"2序"}}
|
||||
|
||||
totals = reconciliation._fold_reported_good_quantity_rows(rows, latest_processes)
|
||||
|
||||
assert totals[("嘉恒", "产品A", 7)] == 350
|
||||
assert totals[("嘉恒", "产品A", 8)] == 300
|
||||
Reference in New Issue
Block a user