!11975 Merge branch 'dev' of <a href="https://gitee.com/jinan-pengyusen-data/gzth">https://gitee.com/jinan-pengyusen-data/gzth</a> into dev_wang
Merge pull request !11975 from 李鹏宇/dev_wang
This commit is contained in:
@@ -15,7 +15,7 @@ class DepositTotalReport(models.Model):
|
||||
- 管理费用类型为"押金"
|
||||
- 押金状态为"已收"
|
||||
- 非作废记录
|
||||
- 支付日期(payout_date)在查询月内
|
||||
- 收款日期(payout_date)≤ 查询月末(累计逻辑,含提前预收)
|
||||
- 金额:original_amount - discount_amount
|
||||
- 排除已退款的押金(即property.bills.list中有actual_date的押金记录)
|
||||
"""
|
||||
@@ -37,7 +37,6 @@ class DepositTotalReport(models.Model):
|
||||
('management_type_id.name', '=', '押金'),
|
||||
('deposit_state', '=', 'paid'),
|
||||
('is_invalid', '!=', True),
|
||||
('payout_date', '>=', month_first),
|
||||
('payout_date', '<=', month_last),
|
||||
]
|
||||
|
||||
@@ -56,12 +55,24 @@ class DepositTotalReport(models.Model):
|
||||
condition = params.get('condition')
|
||||
partner_id = params.get('partner_id')
|
||||
company_id = params.get('company_id')
|
||||
management_type_id = params.get('management_type_id')
|
||||
property_id = params.get('property_id')
|
||||
lessee_id = params.get('lessee_id')
|
||||
contract_id = params.get('contract_id')
|
||||
if condition:
|
||||
domain.append(('tenure_type', '=', condition))
|
||||
if partner_id:
|
||||
domain.append(('precinct_id', '=', partner_id))
|
||||
if company_id:
|
||||
domain.append(('company_id', '=', company_id))
|
||||
if property_id:
|
||||
domain.append(('property_ids', 'in', [property_id]))
|
||||
if lessee_id:
|
||||
domain.append(('lessee_id', '=', lessee_id))
|
||||
if contract_id:
|
||||
domain.append(('contract_id', '=', contract_id))
|
||||
if management_type_id:
|
||||
domain.append(('management_type_id', '=', management_type_id))
|
||||
|
||||
lines = self.sudo().search(domain, order="contract_id asc")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user