Fixed: Order payments in pdf by nr
This commit is contained in:
parent
3b94e12ea0
commit
2bf0292ca3
|
@ -57,7 +57,8 @@ class BillType extends Repository implements PdfRepository
|
||||||
public function getPositions(Collection $page): array
|
public function getPositions(Collection $page): array
|
||||||
{
|
{
|
||||||
$memberIds = $page->pluck('id')->toArray();
|
$memberIds = $page->pluck('id')->toArray();
|
||||||
$payments = Payment::whereIn('member_id', $memberIds)->whereNeedsBill()->get();
|
$payments = Payment::whereIn('member_id', $memberIds)
|
||||||
|
->orderByRaw('nr, member_id')->whereNeedsBill()->get();
|
||||||
|
|
||||||
return $payments->mapWithKeys(function (Payment $payment) {
|
return $payments->mapWithKeys(function (Payment $payment) {
|
||||||
$key = "Beitrag für {$payment->nr} ({$payment->subscription->name})";
|
$key = "Beitrag für {$payment->nr} ({$payment->subscription->name})";
|
||||||
|
|
Loading…
Reference in New Issue