diff --git a/netforce_clinic/models/report_hdcase_expense_summary.py b/netforce_clinic/models/report_hdcase_expense_summary.py index 3ca637a..270e188 100644 --- a/netforce_clinic/models/report_hdcase_expense_summary.py +++ b/netforce_clinic/models/report_hdcase_expense_summary.py @@ -333,7 +333,7 @@ class ReportHDCaseExpenseSummary(Model): 'date': date, 'date_from': date_from, 'date_to': date_to, - 'lines': sorted(slines, key=lambda a: (a.get('ptype',''), a.get('epo_name',''))), + 'lines': sorted(slines, key=lambda a: (a.get('ptype',''), a.get('epo_name',''), a.get('pname',''))), 'total_fee': total_fee and '{:,}'.format(total_fee) or "", 'total_srv': total_srv and '{:,}'.format(total_srv) or "", 'total_epo': total_epo and '{:,}'.format(total_epo) or "",