fix: display total_cost instead of estimated_cost in request list

- Changed from estimated_cost (single field) to total_cost (calculated sum)
- Now correctly shows sum of all items in the request
This commit is contained in:
admin i 2025-12-10 17:08:09 +03:00
parent 978ed9a819
commit aeab6a1127

View File

@ -309,7 +309,7 @@
const html = requests.map(req => {
const urgIcon = urgencyIcons[req.urgency] || 'bi-dash-circle';
const date = new Date(req.created_at).toLocaleDateString('ru-RU');
const cost = req.estimated_cost ? `${parseFloat(req.estimated_cost).toLocaleString('ru-RU')} ₽` : '—';
const cost = req.total_cost ? `${parseFloat(req.total_cost).toLocaleString('ru-RU')} ₽` : '—';
const deptName = req.department_name || req.department?.name || '—';
return `