From a5852f61fefd4223a13da5ede778af019dccc788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 20 Sep 2021 14:54:57 +0200 Subject: [PATCH] Order invoices & payments by number ASC --- app/Services/Client/Statement.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Services/Client/Statement.php b/app/Services/Client/Statement.php index 5d6d5a0e4376..e18f9707618a 100644 --- a/app/Services/Client/Statement.php +++ b/app/Services/Client/Statement.php @@ -221,6 +221,7 @@ class Statement ->where('client_id', $this->client->id) ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL, Invoice::STATUS_PAID]) ->whereBetween('date', [$this->options['start_date'], $this->options['end_date']]) + ->orderBy('number', 'ASC') ->get(); } @@ -235,6 +236,7 @@ class Statement ->where('client_id', $this->client->id) ->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment::STATUS_PARTIALLY_REFUNDED, Payment::STATUS_REFUNDED]) ->whereBetween('date', [$this->options['start_date'], $this->options['end_date']]) + ->orderBy('number', 'ASC') ->get(); }