Merge pull request !10023 from 李鹏宇/dev
This commit is contained in:
@@ -67,8 +67,10 @@ class DepositPreReceivedReport(models.Model):
|
||||
)
|
||||
if not wizards:
|
||||
# 如果没有关联的wizard,尝试直接从line获取信息
|
||||
if line.delivered1 and line.create_date:
|
||||
if line.create_date.date() <= period_end:
|
||||
if line.delivered1 and (line.receivable_id.payout_date or line.create_date):
|
||||
# 使用payout_date作为收款日期,如果没有则使用create_date
|
||||
payment_date = line.receivable_id.payout_date or line.create_date.date()
|
||||
if payment_date <= period_end:
|
||||
amount = round(line.delivered1, 2)
|
||||
total_amount += amount
|
||||
rows.append({
|
||||
@@ -88,7 +90,7 @@ class DepositPreReceivedReport(models.Model):
|
||||
'id': rec.lessee_id.id,
|
||||
'display_name': rec.lessee_id.name,
|
||||
} if rec.lessee_id else "",
|
||||
"收款日期": line.create_date.strftime("%Y-%m-%d"),
|
||||
"收款日期": payment_date.strftime("%Y-%m-%d"),
|
||||
"金额": amount,
|
||||
"所属公司": rec.company_id.name if rec.company_id else "",
|
||||
"管理员": {
|
||||
|
||||
Reference in New Issue
Block a user