93 {% for client in clients %}
TemplateSyntaxError at /reports/portfolio-details/
Invalid filter: 'sub'
Request Method: GET
Request URL: http://127.0.0.1:8000/reports/portfolio-details/
Django Version: 5.2.4
Exception Type: TemplateSyntaxError
Exception Value:
Invalid filter: 'sub'
Exception Location: C:\Users\phing\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\template\base.py, line 615, in find_filter
Raised during: reports.views.portfolio_details
Python Executable: C:\Users\phing\AppData\Local\Programs\Python\Python313\python.exe
Python Version: 3.13.5
Python Path:
['C:\\Users\\phing\\Desktop\\branch-system',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\python313.zip',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\DLLs',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages']
Server time: Tue, 30 Sep 2025 04:14:05 +0300
Error during template rendering
In template C:\Users\phing\Desktop\branch-system\templates\reports\portfolio_details.html, error at line 144
Invalid filter: 'sub'
134 |
135 KES {{ loan.principal_amount|floatformat:2|intcomma }}
136 |
137
138 KES {{ loan.total_amount|floatformat:2|intcomma }}
139 |
140
141 KES {{ loan.amount_paid|floatformat:2|intcomma }}
142 |
143
144 {% with outstanding=loan.total_amount|sub:loan.amount_paid %}
TemplateSyntaxError at /reports/portfolio-details/
Invalid filter: 'sub'
Request Method: GET
Request URL: http://127.0.0.1:8000/reports/portfolio-details/
Django Version: 5.2.4
Exception Type: TemplateSyntaxError
Exception Value:
Invalid filter: 'sub'
Exception Location: C:\Users\phing\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\template\base.py, line 615, in find_filter
Raised during: reports.views.portfolio_details
Python Executable: C:\Users\phing\AppData\Local\Programs\Python\Python313\python.exe
Python Version: 3.13.5
Python Path:
['C:\\Users\\phing\\Desktop\\branch-system',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\python313.zip',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\DLLs',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages']
Server time: Tue, 30 Sep 2025 04:14:20 +0300
Error during template rendering
In template C:\Users\phing\Desktop\branch-system\templates\reports\portfolio_details.html, error at line 144
Invalid filter: 'sub'
134 |
135 KES {{ loan.principal_amount|floatformat:2|intcomma }}
136 |
137
138 KES {{ loan.total_amount|floatformat:2|intcomma }}
139 |
140
141 KES {{ loan.amount_paid|floatformat:2|intcomma }}
142 |
143
144 {% with outstanding=loan.total_amount|sub:loan.amount_paid %}
FieldError at /clients/filtered/
Expression contains mixed types: DecimalField, IntegerField. You must set output_field.
Request Method: GET
Request URL: http://127.0.0.1:8000/clients/filtered/?status=all
Django Version: 5.2.4
Exception Type: FieldError
Exception Value:
Expression contains mixed types: DecimalField, IntegerField. You must set output_field.
Exception Location: C:\Users\phing\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\db\models\expressions.py, line 365, in _resolve_output_field
Raised during: users.views.filtered_clients
Python Executable: C:\Users\phing\AppData\Local\Programs\Python\Python313\python.exe
Python Version: 3.13.5
Python Path:
['C:\\Users\\phing\\Desktop\\branch-system',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\python313.zip',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\DLLs',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages']
Server time: Tue, 30 Sep 2025 04:14:41 +0300
Error during template rendering
In template C:\Users\phing\Desktop\branch-system\templates\users\filtered_clients.html, error at line 93
Expression contains mixed types: DecimalField, IntegerField. You must set output_field.
83
84
85
86
87
88
89
90
91 - With Active Loans
92 -
93 {% for client in clients %}
TemplateSyntaxError at /reports/
default requires 2 arguments, 1 provided
Request Method: GET
Request URL: http://127.0.0.1:8000/reports/
Django Version: 5.2.4
Exception Type: TemplateSyntaxError
Exception Value:
default requires 2 arguments, 1 provided
Exception Location: C:\Users\phing\AppData\Local\Programs\Python\Python313\Lib\site-packages\django\template\base.py, line 768, in args_check
Raised during: reports.views.unified_dashboard
Python Executable: C:\Users\phing\AppData\Local\Programs\Python\Python313\python.exe
Python Version: 3.13.5
Python Path:
['C:\\Users\\phing\\Desktop\\branch-system',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\python313.zip',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\DLLs',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313',
'C:\\Users\\phing\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages']
Server time: Tue, 30 Sep 2025 04:15:09 +0300
Error during template rendering
In template C:\Users\phing\Desktop\branch-system\templates\reports\unified_dashboard.html, error at line 575
default requires 2 arguments, 1 provided
565 });
566
567 // Loan Status Distribution Chart
568 const statusCtx = document.getElementById('loanStatusChart').getContext('2d');
569 chartInstances.loanStatusChart = new Chart(statusCtx, {
570 type: 'doughnut',
571 data: {
572 labels: ['Active', 'Due Today', 'Overdue', 'Completed'],
573 datasets: [{
574 data: [
575 {{ dashboard_data.summary_metrics.total_active_loans |default: 0 }},
|