diff --git a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs index 1d915ee4..0359f160 100644 --- a/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-VatReportData.aspx.cs @@ -50,6 +50,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers StringBuilder response = new StringBuilder(16384); VatReportItems items = report.Items; + items.Sort(VatItemSorterByDate); List lines = new List(); string hasDoxString = @@ -117,6 +118,9 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers Response.End(); } - + static public int VatItemSorterByDate(VatReportItem a, VatReportItem b) + { + return DateTime.Compare(a.Transaction.DateTime, b.Transaction.DateTime); + } } } \ No newline at end of file