Fix Pint formatting
This commit is contained in:
@@ -8,9 +8,7 @@ use Illuminate\Support\Facades\DB;
|
||||
|
||||
class InvoicePaymentService
|
||||
{
|
||||
public function __construct(private InvoiceConfigService $config)
|
||||
{
|
||||
}
|
||||
public function __construct(private InvoiceConfigService $config) {}
|
||||
|
||||
public function getParentInvoiceSummary(int $parentId, ?string $schoolYear): array
|
||||
{
|
||||
@@ -26,9 +24,9 @@ class InvoicePaymentService
|
||||
->all();
|
||||
|
||||
$selectedYear = $schoolYear ?: null;
|
||||
if (!$selectedYear) {
|
||||
if (! $selectedYear) {
|
||||
$hasCurrentYear = in_array($currentSchoolYear, array_column($schoolYears, 'school_year'), true);
|
||||
$selectedYear = $hasCurrentYear ? $currentSchoolYear : (!empty($schoolYears) ? $schoolYears[0]['school_year'] : null);
|
||||
$selectedYear = $hasCurrentYear ? $currentSchoolYear : (! empty($schoolYears) ? $schoolYears[0]['school_year'] : null);
|
||||
}
|
||||
|
||||
$invoices = [];
|
||||
@@ -38,7 +36,7 @@ class InvoicePaymentService
|
||||
|
||||
$invoiceIds = array_column($invoices, 'id');
|
||||
$refunds = [];
|
||||
if (!empty($invoiceIds)) {
|
||||
if (! empty($invoiceIds)) {
|
||||
$refundResults = DB::table('refunds')
|
||||
->selectRaw('invoice_id, COALESCE(SUM(refund_paid_amount),0) as refund_paid_amount')
|
||||
->whereIn('invoice_id', $invoiceIds)
|
||||
@@ -54,7 +52,7 @@ class InvoicePaymentService
|
||||
}
|
||||
|
||||
$lastPayments = [];
|
||||
if (!empty($invoiceIds)) {
|
||||
if (! empty($invoiceIds)) {
|
||||
$paymentResults = Payment::getPaymentsByInvoice($invoiceIds);
|
||||
foreach ($paymentResults as $payment) {
|
||||
$lastPayments[$payment['invoice_id']] = [
|
||||
|
||||
Reference in New Issue
Block a user