执行中的运输计划不再随意改单;库存流水记到装卸产品明细;手工派车日历区分酸碱并记录数量。同时收紧合同附件与子表的差量保存,并清理已废弃的 bak 备份目录。 Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
773 B
Python
28 lines
773 B
Python
"""只填皮重时,不应因为补了毛重时间而把出入库单算作已完成。"""
|
|
from datetime import datetime
|
|
|
|
from app.services.db.weighing_logic import weighing_weights_complete
|
|
|
|
|
|
def test_tare_only_is_not_complete():
|
|
assert (
|
|
weighing_weights_complete(0, datetime(2026, 10, 28, 17, 0), 12000, datetime(2026, 10, 28, 17, 1))
|
|
is False
|
|
)
|
|
|
|
|
|
def test_missing_gross_time_is_not_complete():
|
|
assert weighing_weights_complete(32000, None, 12000, datetime(2026, 10, 28, 17, 1)) is False
|
|
|
|
|
|
def test_both_weights_and_times_are_complete():
|
|
assert (
|
|
weighing_weights_complete(
|
|
32000,
|
|
datetime(2026, 10, 28, 17, 0),
|
|
12000,
|
|
datetime(2026, 10, 28, 17, 1),
|
|
)
|
|
is True
|
|
)
|