<?php

namespace App\Http\Controllers;

use App\Domain\Financial\Models\Payment;
use App\Domain\POS\Models\POSTransaction;

class ReceiptController extends Controller
{
    public function posPrint(POSTransaction $transaction)
    {
        $transaction->load(['items', 'participant.person', 'branch', 'processedBy']);

        return view('print.pos-receipt', compact('transaction'));
    }

    public function paymentPrint(Payment $payment)
    {
        $payment->load(['invoice.billable.person', 'invoice.items', 'creator']);

        return view('print.payment-receipt', compact('payment'));
    }
}
