refactor(receivables): rewrite legacy-era regions of the allocation model, requests, pdf controller and routes in place

This commit is contained in:
Darko Gjorgjijoski
2026-08-21 09:38:43 +02:00
parent c4c816b0ed
commit c7130e1e17
6 changed files with 32 additions and 11 deletions
@@ -23,13 +23,19 @@ class PaymentAllocation extends Model
];
}
/**
* The receipt this slice was taken out of.
*/
public function payment(): BelongsTo
{
return $this->belongsTo(Payment::class);
return $this->belongsTo(Payment::class, 'payment_id');
}
/**
* The document this slice was booked against.
*/
public function invoice(): BelongsTo
{
return $this->belongsTo(Invoice::class);
return $this->belongsTo(Invoice::class, 'invoice_id');
}
}