fix: drop 付款确认中 from sample payment progressStatus
Sample-level 缴费进度 is now only 待缴费 / 部分已缴 / 已缴清. Transfer jfqrz still blocks canConfirm but no longer surfaces as progress. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cc0b217c89
commit
af992b5680
6 files changed
+25
-15
No files matched your search
@@ -23,7 +23,8 @@ class TestSamplePaymentProgress(unittest.TestCase):
|
||||
self.assertEqual(r["activeScheduleCount"], 1)
|
||||
self.assertTrue(r["canConfirm"])
|
||||
|
||||
def test_confirming_wins_over_partial(self):
|
||||
def test_confirming_does_not_set_progress_status(self):
|
||||
"""付款确认中不再作为样本缴费进度;有 yjf 则部分已缴,仍不可再提交确认。"""
|
||||
r = compute_sample_payment_progress(
|
||||
schedules=[
|
||||
{"id": "s1", "scheduleStatus": "open", "dueAmount": Decimal("1000")},
|
||||
@@ -33,10 +34,24 @@ class TestSamplePaymentProgress(unittest.TestCase):
|
||||
{"scheduleId": "s1", "payStatus": "jfqrz", "transferAmount": Decimal("100")},
|
||||
],
|
||||
)
|
||||
self.assertEqual(r["progressStatus"], "jfqrz")
|
||||
self.assertEqual(r["progressStatus"], "bfyj")
|
||||
self.assertEqual(r["paidAmount"], Decimal("200"))
|
||||
self.assertFalse(r["canConfirm"])
|
||||
|
||||
def test_confirming_only_stays_pending(self):
|
||||
"""仅有付款确认中、尚无 yjf 时,缴费进度仍为待缴费。"""
|
||||
r = compute_sample_payment_progress(
|
||||
schedules=[
|
||||
{"id": "s1", "scheduleStatus": "open", "dueAmount": Decimal("1000")},
|
||||
],
|
||||
transfers=[
|
||||
{"scheduleId": "s1", "payStatus": "jfqrz", "transferAmount": Decimal("100")},
|
||||
],
|
||||
)
|
||||
self.assertEqual(r["progressStatus"], "dfj")
|
||||
self.assertEqual(r["paidAmount"], Decimal("0"))
|
||||
self.assertFalse(r["canConfirm"])
|
||||
|
||||
def test_partial_paid(self):
|
||||
r = compute_sample_payment_progress(
|
||||
schedules=[
|
||||
|
||||
Reference in new issue
Block a user