@@ -410,7 +423,8 @@
ir.actions.act_window
soong.workflow.record
tree,kanban,search
- {'header_search_default_approve_state': 1, 'header_search_default_to_do':1, 'check_employee': 1}
+ {'header_search_default_approve_state': 1, 'header_search_default_to_do':1,
+ 'check_employee': 1}
[('is_to_do', '=', True)]
@@ -425,7 +439,7 @@
'check_employee': 1}
[('users_ids', 'in', uid), ('reclaim_state', '=', False), ('soong_state', 'in',
- ['done', 'active'])]
+ ['done', 'active']), ('is_company', '=', True)]
@@ -490,6 +504,14 @@
action = model.delete_record()
+
+ 一键补全办结时间
+
+
+ code
+ action = model.action_update_history_end_time()
+
+
管理员强制结束
diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
index ec8b4a413..87b2bed10 100644
--- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
@@ -638,7 +638,7 @@
vacation.over.line.overtime.tree
vacation.over.line
-
+
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 06866ba10..a88de6d09 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -360,7 +360,7 @@ class YuthonHrEmployee(models.Model):
eighty_percent_items = [
'基本工资',
'职级工资',
- '预发绩效奖金'
+ '月绩效奖金'
]
full_amount_items = [
'通讯补贴',
diff --git a/yuthon_report/models/current_receivable_rent_report.py b/yuthon_report/models/current_receivable_rent_report.py
index ded5be19b..5618afe7f 100644
--- a/yuthon_report/models/current_receivable_rent_report.py
+++ b/yuthon_report/models/current_receivable_rent_report.py
@@ -9,7 +9,7 @@ class CurrentReceivableRentReport(models.Model):
@api.model
def get_current_receivable_rent_report(self, params):
"""
- 当期应收-租金:
+ 当期应收:
- 过滤应收日期区间
- 默认管理类型包含“租”,可通过 management_type_id 精确指定
- 含税金额:original_amount
@@ -50,32 +50,39 @@ class CurrentReceivableRentReport(models.Model):
if management_type_id:
domain.append(('management_type_id', '=', management_type_id))
- else:
- rent_types = self.env['yuthon.management.type'].search([('name', 'ilike', '租')])
- if rent_types:
- domain.append(('management_type_id', 'in', rent_types.ids))
+ # 删除默认过滤,显示所有类型
- receivables = self.search(domain, limit=3000, order="due_date asc")
+ receivables = self.search(domain, order="due_date asc")
rows = []
- total_amount = 0.0
- total_amount_nt = 0.0
+ # 按管理类型分组统计
+ type_totals = {} # {'管理类型名称': {'amount': 0, 'amount_nt': 0}}
for idx, rec in enumerate(receivables, start=1):
amt = rec.original_amount or 0.0
+ discount = rec.discount_amount or 0.0
+ # 实际应收 = 原始金额 - 减免金额
+ actual_amt = amt - discount
tax_rate = rec.tax or 0.0
- amt_nt = amt / (1 + tax_rate / 100) if tax_rate else amt
- total_amount += amt
- total_amount_nt += amt_nt
+ actual_amt_nt = actual_amt / (1 + tax_rate / 100) if tax_rate else actual_amt
+
+ # 统计每个管理类型的合计
+ type_name = rec.management_type_id.name if rec.management_type_id else "未分类"
+ if type_name not in type_totals:
+ type_totals[type_name] = {'amount': 0.0, 'amount_nt': 0.0}
+ type_totals[type_name]['amount'] += actual_amt
+ type_totals[type_name]['amount_nt'] += actual_amt_nt
rows.append({
"序号": idx,
"应收开始": 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 "",
"承租方名称": rec.lessee_id.name if rec.lessee_id else "",
- "金额(含税)": round(amt, 2),
+ "原始金额": round(amt, 2),
+ "减免金额": round(discount, 2) if discount else "",
+ "实际金额(含税)": round(actual_amt, 2),
"税率": tax_rate,
- "金额(不含税)": round(amt_nt, 2),
+ "实际金额(不含税)": round(actual_amt_nt, 2),
"物业名称": rec.property_name or "",
"产权证": rec.title_deed or "",
"合同编号": rec.contract_id.contract_code if rec.contract_id else "",
@@ -83,21 +90,40 @@ class CurrentReceivableRentReport(models.Model):
"acc_type": rec.acc_type if rec.acc_type else False,
})
- # 返回字典格式,包含数据行和合计行
+ # 构造合计数据:将各分类合计作为独立的统计数据返回
+ summary_stats = []
+ total_all_amount = 0.0
+ total_all_amount_nt = 0.0
+
+ # 按管理类型名称排序
+ for type_name in sorted(type_totals.keys()):
+ totals = type_totals[type_name]
+ total_all_amount += totals['amount']
+ total_all_amount_nt += totals['amount_nt']
+ summary_stats.append({
+ 'name': type_name,
+ 'amount': round(totals['amount'], 2),
+ 'amount_nt': round(totals['amount_nt'], 2)
+ })
+
+ # 返回字典格式,包含数据行、简化的表格合计行、独立的统计卡片数据
return {
"rows": rows,
"summary": {
"序号": "",
- "应收开始": False,
- "应收结束": False,
- "承租方名称": "合计:",
- "金额(含税)": round(total_amount, 2),
+ "应收开始": "",
+ "应收结束": "",
+ "承租方名称": "总合计:",
+ "原始金额": "",
+ "减免金额": "",
+ "实际金额(含税)": round(total_all_amount, 2),
"税率": "",
- "金额(不含税)": round(total_amount_nt, 2),
- "物业名称": False,
- "产权证": False,
- "合同编号": False,
- "管理员": False,
- }
+ "实际金额(不含税)": round(total_all_amount_nt, 2),
+ "物业名称": "",
+ "产权证": "",
+ "合同编号": "",
+ "管理员": "",
+ },
+ "stats": summary_stats # 新增统计卡片数据
}
diff --git a/yuthon_report/static/src/components/yuthon_report/receivable_report.js b/yuthon_report/static/src/components/yuthon_report/receivable_report.js
index 54d4651f8..f0be211cf 100644
--- a/yuthon_report/static/src/components/yuthon_report/receivable_report.js
+++ b/yuthon_report/static/src/components/yuthon_report/receivable_report.js
@@ -37,7 +37,8 @@ class ReceivableReport extends Component {
{'name': '自有', 'value': 'self'},
{'name': '代管', 'value': 'agency'}
],
- domainUsers: []
+ domainUsers: [],
+ stats: [] // 新增统计数据
});
this.config = this.props.action.context.report_config || {};
@@ -50,6 +51,11 @@ class ReceivableReport extends Component {
theme: agGrid.themeMaterial,
columnDefs: this.config.columns || [],
rowData: [],
+ rowClassRules: {
+ 'ag-row-new-rent': function(params) {
+ return params.data && params.data.acc_type === 'new';
+ }
+ },
sideBar: {
toolPanels: [
{
@@ -224,10 +230,15 @@ class ReceivableReport extends Component {
if (result && typeof result === 'object' && result.rows && result.summary) {
// 新格式:分离数据行和合计行
this.grid.setGridOption('rowData', result.rows);
- this.grid.setGridOption('pinnedBottomRowData', [result.summary]);
+ // summary可能是单个对象或数组
+ const summaryData = Array.isArray(result.summary) ? result.summary : [result.summary];
+ this.grid.setGridOption('pinnedBottomRowData', summaryData);
+ // 更新统计卡片数据
+ this.state.stats = result.stats || [];
} else {
// 兼容旧格式:数组
this.grid.setGridOption('rowData', result);
+ this.state.stats = [];
}
}
diff --git a/yuthon_report/static/src/components/yuthon_report/receivable_report.xml b/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
index 4c8627c3d..77e9c0d0a 100644
--- a/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
+++ b/yuthon_report/static/src/components/yuthon_report/receivable_report.xml
@@ -93,6 +93,19 @@
diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
index 3847f6bd2..62c3f0931 100644
--- a/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
+++ b/yuthon_report/static/src/components/yuthon_report/yuthon_report.scss
@@ -28,4 +28,11 @@
/* 下拉框placeholder样式 */
#formview_default_conditions option[value=""] {
color: #6c757d;
+ }
+
+ /* 新租记录整行样式 */
+ .ag-row-new-rent {
+ background-color: #d4edda !important;
+ color: #155724 !important;
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/yuthon_report/views/current_receivable_rent_report.xml b/yuthon_report/views/current_receivable_rent_report.xml
index 08752eaf0..a606ac743 100644
--- a/yuthon_report/views/current_receivable_rent_report.xml
+++ b/yuthon_report/views/current_receivable_rent_report.xml
@@ -12,18 +12,19 @@
"method": "get_current_receivable_rent_report",
"columns": [
{"headerName": "序号", "field": "序号", "flex": 0.6, "valueFormatter": "params.value === false || params.value === null || params.value === undefined || params.value === 'false' ? '' : params.value"},
- {"headerName": "应收开始", "field": "应收开始", "flex": 1.2},
- {"headerName": "应收结束", "field": "应收结束", "flex": 1.2},
+ {"headerName": "应收开始", "field": "应收开始", "flex": 1},
+ {"headerName": "应收结束", "field": "应收结束", "flex": 1},
{"headerName": "承租方名称", "field": "承租方名称", "flex": 1.6},
- {"headerName": "金额(含税)", "field": "金额(含税)", "flex": 1, "type": "number"},
- {"headerName": "税率", "field": "税率", "flex": 0.8, "valueFormatter": "params.value === false || params.value === null || params.value === undefined || params.value === 'false' ? '' : params.value"},
- {"headerName": "金额(不含税)", "field": "金额(不含税)", "flex": 1, "type": "number"},
+ {"headerName": "原始金额", "field": "原始金额", "flex": 0.9, "type": "number", "valueFormatter": "params.value === '' || params.value === null || params.value === undefined ? '' : params.value"},
+ {"headerName": "减免金额", "field": "减免金额", "flex": 0.9, "type": "number", "valueFormatter": "params.value === '' || params.value === null || params.value === undefined ? '' : params.value"},
+ {"headerName": "实际金额(含税)", "field": "实际金额(含税)", "flex": 1.1, "type": "number"},
+ {"headerName": "税率", "field": "税率", "flex": 0.6, "valueFormatter": "params.value === false || params.value === null || params.value === undefined || params.value === 'false' || params.value === '' ? '' : params.value"},
+ {"headerName": "实际金额(不含税)", "field": "实际金额(不含税)", "flex": 1.1, "type": "number"},
{"headerName": "物业名称", "field": "物业名称", "flex": 2},
{"headerName": "产权证", "field": "产权证", "flex": 1.2},
{"headerName": "合同编号", "field": "合同编号", "flex": 1.2},
{"headerName": "管理员", "field": "管理员", "flex": 1}
],
- "getRowStyle": "function(params) { if (params.data.acc_type === 'new') { return { color: '#28a745' }; } return null; }"
}
}
@@ -31,7 +32,7 @@
-
+
diff --git a/yuthon_trade/views/yuthon_trade_setting_views.xml b/yuthon_trade/views/yuthon_trade_setting_views.xml
index d64b68c88..7a2eab8a0 100644
--- a/yuthon_trade/views/yuthon_trade_setting_views.xml
+++ b/yuthon_trade/views/yuthon_trade_setting_views.xml
@@ -43,10 +43,26 @@
+
+ seals.type.setting.search
+ seals.type.setting
+
+
+
+
+
+
+
+
+
+
+
用章类型
seals.type.setting
tree
+ {'group_by': 'scope_setting_id'}
+ [('start_date', '<=', context_today().strftime('%Y-%m-%d'))]
seals.scope.setting.tree