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(); }