报表
This commit is contained in:
@@ -19,7 +19,7 @@ class PreArrearsReport(models.Model):
|
||||
1. receivable.modify.line: 有 reconciliation_date 且 reconciliation_date月 > due_date月
|
||||
且 reconciliation_date月 >= 查询月 → 欠收金额取 amount
|
||||
2. property.accounts.receivable: is_reconciliation=False 且 due_date月 < 查询月
|
||||
→ 从未对过账,欠收金额取 submitted
|
||||
且 payout_date 为空 → 从未对过账且未收款,欠收金额取 submitted
|
||||
- 按应收账单聚合,每张账单只出一行
|
||||
"""
|
||||
today = datetime.date.today()
|
||||
@@ -111,13 +111,14 @@ class PreArrearsReport(models.Model):
|
||||
|
||||
# ============================================================
|
||||
# 第二部分:从 property.accounts.receivable 取 is_reconciliation=False 的记录
|
||||
# 即:未对过账的应收账单,due_date月 < 查询月,欠收金额取 submitted
|
||||
# 即:未对过账且未收款(payout_date为空)的应收账单,due_date月 < 查询月,欠收金额取 submitted
|
||||
# ============================================================
|
||||
covered_ids = list(rec_map.keys())
|
||||
|
||||
receivable_domain = [
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '<', query_month_start),
|
||||
('payout_date', '=', False),
|
||||
('is_invalid', '!=', True),
|
||||
]
|
||||
if covered_ids:
|
||||
|
||||
Reference in New Issue
Block a user