!11361 采购订单,前期欠收报表

Merge pull request !11361 from 李鹏宇/dev_wang
This commit is contained in:
李鹏宇
2026-05-08 10:44:08 +00:00
committed by Gitee
2 changed files with 3 additions and 3 deletions
@@ -161,7 +161,7 @@
</xpath>
<xpath expr="//field[@name='date_order']" position="before">
<field name="pay_way"/>
<field name="purchase_type"/>
<field name="purchase_type" widget="radio"/>
</xpath>
<xpath expr="//div[@name='date_approve']" position="attributes">
<attribute name="invisible">1</attribute>
+2 -2
View File
@@ -12,7 +12,7 @@ class PreArrearsReport(models.Model):
前期欠收报表(数据源:receivable.modify.line):
- 查询条件的日期对应应收账单的 due_date(应收日期在查询月内)
- 收款日期(reconciliation_date)晚于应收日期(due_date)的记录就是欠收
- 金额取收款记录的 amount
- 金额取收款记录的 not_collected(未收金额/欠收金额)
- 按应收账单聚合,每张账单只出一行(汇总该账单下所有欠收收款金额)
"""
today = datetime.date.today()
@@ -82,7 +82,7 @@ class PreArrearsReport(models.Model):
rid = line.receivable_id.id
if rid not in rec_map:
rec_map[rid] = {'rec': line.receivable_id, 'amount': 0.0}
rec_map[rid]['amount'] += line.amount or 0.0
rec_map[rid]['amount'] += line.not_collected or 0.0
rows = []
total_amount = 0.0