36 lines
948 B
PHP
36 lines
948 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Payment;
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Santri;
|
|
use Inertia\Inertia;
|
|
use App\Services\cekDenda;
|
|
|
|
class PaymentController extends Controller
|
|
{
|
|
public function indexManualPayment()
|
|
{
|
|
$santri = Santri::with(['payments.detailPayments.paymentType'])
|
|
->withSum(['payments.detailPayments as total_penalty' => function ($query) {
|
|
$query->whereNotNull('penalty');
|
|
}], 'penalty')
|
|
->get();
|
|
|
|
return Inertia::render('list-admin/payment/ManualPayment', [
|
|
'santri' => $santri,
|
|
'fields' => [
|
|
'nis' => 'text',
|
|
'nama' => 'text',
|
|
'status_santri' => 'text',
|
|
'role_santri' => 'text',
|
|
'total_penalty' => 'text',
|
|
'amount' => 'text',
|
|
]
|
|
]);
|
|
}
|
|
|
|
public function manualPayment() {}
|
|
}
|