Merge branch 'feature/candidate_payments' into homo_experimental

This commit is contained in:
2026-08-27 16:52:08 -03:00
16 changed files with 824 additions and 13 deletions

View File

@@ -8,6 +8,15 @@ class PurchaseResponseLoader
{
public function load(Purchase $purchase): Purchase
{
return $purchase->load(['tenant', 'items.imageAttachment', 'stockReservation']);
$relations = ['tenant', 'items.imageAttachment', 'stockReservation'];
if (
$purchase->status === Purchase::STATUS_IN_REVIEW
&& $purchase->payment_method === 'transfer'
) {
$relations[] = 'telepagosPaymentCandidates.payment';
}
return $purchase->load($relations);
}
}