租赁合同修改日期,报表

This commit is contained in:
李鹏宇
2026-03-02 15:10:53 +08:00
parent 347f0d5594
commit a389d76fe3
3 changed files with 9 additions and 3 deletions
@@ -1100,7 +1100,7 @@ class PropertyLeaseContract(models.Model):
def onchange_total_contract_receivables(self):
for record in self:
if record.total_contract_receivables and record.tax_rate:
record.not_tax_amount = record.total_contract_receivables/(1+float(record.tax_rate.name))
record.not_tax_amount = record.total_contract_receivables / (1 + record.tax_rate.ratio)
record.tax = record.total_contract_receivables - record.not_tax_amount
@staticmethod
+6 -1
View File
@@ -64,14 +64,19 @@ class YuthonProperty(models.Model):
"应收类型": mgmt_type,
"应收开始": rec.due_date.strftime("%Y-%m-%d") if rec.due_date else "",
"应收结束": rec.due_date_end.strftime("%Y-%m-%d") if rec.due_date_end else "",
"当期金额": round(amount, 2),
"承租方": {
'model': 'property.tenant.information',
'id': rec.lessee_id.id,
'display_name': rec.lessee_id.name,
} if rec.lessee_id else "",
"当期金额": round(amount, 2),
"物业名称": rec.property_name or "",
"产权证号": rec.title_deed or "",
"合同编号": {
'model': 'property.lease.contract',
'id': rec.contract_id.id,
'display_name': rec.contract_id.contract_code,
} if rec.contract_id else "",
"发票类型": invoice_type_map.get(rec.invoice_type, ""),
"税率": f"{rec.tax}%" if rec.tax else "0%"
})
@@ -14,10 +14,11 @@
{"headerName": "应收类型", "field": "应收类型", "flex": 1},
{"headerName": "应收开始", "field": "应收开始", "flex": 1},
{"headerName": "应收结束", "field": "应收结束", "flex": 1},
{"headerName": "承租方", "field": "承租方", "flex": 1},
{"headerName": "当期金额", "field": "当期金额", "flex": 1, "type": "number"},
{"headerName": "承租方", "field": "承租方", "flex": 1},
{"headerName": "物业名称", "field": "物业名称", "flex": 1},
{"headerName": "产权证号", "field": "产权证号", "flex": 1},
{"headerName": "合同编号", "field": "合同编号", "flex": 1},
{"headerName": "发票类型", "field": "发票类型", "flex": 1},
{"headerName": "税率", "field": "税率", "flex": 1}
]