From 7d97b74f863385971c5e817bcb5cbbe524ca3275 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 19 Apr 2022 09:56:26 +1000 Subject: [PATCH] Sort statements by due date ascending --- app/Services/Client/Statement.php | 2 +- app/Utils/HostedPDF/NinjaPdf.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Client/Statement.php b/app/Services/Client/Statement.php index c93ca1264daa..c05044f52c86 100644 --- a/app/Services/Client/Statement.php +++ b/app/Services/Client/Statement.php @@ -231,7 +231,7 @@ class Statement ->where('client_id', $this->client->id) ->whereIn('status_id', $this->invoiceStatuses()) ->whereBetween('date', [Carbon::parse($this->options['start_date']), Carbon::parse($this->options['end_date'])]) - ->orderBy('date', 'ASC') + ->orderBy('due_date', 'ASC') ->cursor(); } diff --git a/app/Utils/HostedPDF/NinjaPdf.php b/app/Utils/HostedPDF/NinjaPdf.php index bab5d6739fb6..6169a3980709 100644 --- a/app/Utils/HostedPDF/NinjaPdf.php +++ b/app/Utils/HostedPDF/NinjaPdf.php @@ -30,7 +30,7 @@ class NinjaPdf $response = $client->post($this->url,[ RequestOptions::JSON => ['html' => $html] ]); - + return $response->getBody(); }