|
@@ -292,6 +292,20 @@ class RecordPayments extends ListRecords
|
292
|
292
|
return $activeCurrency && $activeCurrency !== $bankAccountCurrency;
|
293
|
293
|
}),
|
294
|
294
|
]),
|
|
295
|
+ Tables\Columns\IconColumn::make('applyFullAmountAction')
|
|
296
|
+ ->icon('heroicon-m-chevron-double-right')
|
|
297
|
+ ->color('primary')
|
|
298
|
+ ->label('')
|
|
299
|
+ ->default('')
|
|
300
|
+ ->alignCenter()
|
|
301
|
+ ->width('3rem')
|
|
302
|
+ ->tooltip('Apply full amount')
|
|
303
|
+ ->action(
|
|
304
|
+ Tables\Actions\Action::make('applyFullPayment')
|
|
305
|
+ ->action(function (Invoice $record) {
|
|
306
|
+ $this->paymentAmounts[$record->id] = $record->amount_due;
|
|
307
|
+ }),
|
|
308
|
+ ),
|
295
|
309
|
CustomTextInputColumn::make('payment_amount')
|
296
|
310
|
->label('Payment amount')
|
297
|
311
|
->alignEnd()
|
|
@@ -343,8 +357,8 @@ class RecordPayments extends ListRecords
|
343
|
357
|
]),
|
344
|
358
|
])
|
345
|
359
|
->bulkActions([
|
346
|
|
- Tables\Actions\BulkAction::make('setFullAmounts')
|
347
|
|
- ->label('Set full amounts')
|
|
360
|
+ Tables\Actions\BulkAction::make('applyFullAmounts')
|
|
361
|
+ ->label('Apply full amounts')
|
348
|
362
|
->icon('heroicon-o-banknotes')
|
349
|
363
|
->color('primary')
|
350
|
364
|
->deselectRecordsAfterCompletion()
|