本月应收报表
This commit is contained in:
@@ -10,7 +10,8 @@ class MonthReceivableReport(models.Model):
|
||||
@api.model
|
||||
def get_month_receivable_report(self, params):
|
||||
"""本月应收(数据源:receivable.modify.line):
|
||||
- 收款日期(reconciliation_date)在查询月内
|
||||
- 应收日期(due_date)在查询月内(本月该收的账单)
|
||||
- 有收款记录(reconciliation_date != False)
|
||||
- 排除跨月预收:reconciliation_date < due_date 且不在同年同月
|
||||
- 金额取收款记录的 amount
|
||||
- 按应收账单聚合,每张账单只出一行
|
||||
@@ -22,8 +23,9 @@ class MonthReceivableReport(models.Model):
|
||||
month_last = query_date.replace(day=last_day)
|
||||
|
||||
domain = [
|
||||
('reconciliation_date', '>=', month_first),
|
||||
('reconciliation_date', '<=', month_last),
|
||||
('reconciliation_date', '!=', False),
|
||||
('receivable_id.due_date', '>=', month_first),
|
||||
('receivable_id.due_date', '<=', month_last),
|
||||
('receivable_id.is_invalid', '=', False),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user