Hoan thien core finance v2
This commit is contained in:
@@ -29,9 +29,50 @@ class PaymentsTable
|
||||
Tables\Columns\TextColumn::make('receipt_number')
|
||||
->label('Số phiếu thu')
|
||||
->searchable(),
|
||||
Tables\Columns\TextColumn::make('scheduleItem.type')
|
||||
->label('Loại đợt')
|
||||
->placeholder('Tạm ứng')
|
||||
->formatStateUsing(fn ($state) => $state?->getLabel()),
|
||||
|
||||
Tables\Columns\TextColumn::make('scheduleItem.installment_no')
|
||||
->label('Đợt TT')
|
||||
->placeholder('Tạm ứng'),
|
||||
|
||||
Tables\Columns\TextColumn::make('reconciliation_status')
|
||||
->label('Đối soát')
|
||||
->badge()
|
||||
->color(function ($record) {
|
||||
if (! $record->scheduleItem) {
|
||||
return 'gray';
|
||||
}
|
||||
$remaining = (float) $record->scheduleItem->remaining_amount;
|
||||
if ($remaining == 0) {
|
||||
return 'success';
|
||||
}
|
||||
if ($remaining > 0) {
|
||||
return 'warning';
|
||||
}
|
||||
return 'danger';
|
||||
})
|
||||
->state(function ($record) {
|
||||
if (! $record->scheduleItem) {
|
||||
return 'Tạm ứng';
|
||||
}
|
||||
$remaining = (float) $record->scheduleItem->remaining_amount;
|
||||
if ($remaining == 0) {
|
||||
return 'Đủ';
|
||||
}
|
||||
if ($remaining > 0) {
|
||||
return 'Thiếu';
|
||||
}
|
||||
return 'Thừa';
|
||||
}),
|
||||
|
||||
Tables\Columns\TextColumn::make('scheduleItem.remaining_amount')
|
||||
->label('Còn thiếu')
|
||||
->money('VND')
|
||||
->placeholder('-')
|
||||
->color('danger'),
|
||||
])
|
||||
->filters([
|
||||
Tables\Filters\SelectFilter::make('method')
|
||||
|
||||
Reference in New Issue
Block a user