Sort statements by due date ascending

This commit is contained in:
David Bomba 2022-04-19 09:56:26 +10:00
parent 79ce3407eb
commit 7d97b74f86
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ class Statement
->where('client_id', $this->client->id) ->where('client_id', $this->client->id)
->whereIn('status_id', $this->invoiceStatuses()) ->whereIn('status_id', $this->invoiceStatuses())
->whereBetween('date', [Carbon::parse($this->options['start_date']), Carbon::parse($this->options['end_date'])]) ->whereBetween('date', [Carbon::parse($this->options['start_date']), Carbon::parse($this->options['end_date'])])
->orderBy('date', 'ASC') ->orderBy('due_date', 'ASC')
->cursor(); ->cursor();
} }

View File

@ -30,7 +30,7 @@ class NinjaPdf
$response = $client->post($this->url,[ $response = $client->post($this->url,[
RequestOptions::JSON => ['html' => $html] RequestOptions::JSON => ['html' => $html]
]); ]);
return $response->getBody(); return $response->getBody();
} }