mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix payments column headers
This commit is contained in:
parent
82857d642f
commit
7085c0137f
@ -20,7 +20,7 @@ class PaymentDatatable extends EntityDatatable
|
||||
{
|
||||
return [
|
||||
[
|
||||
'invoice_number',
|
||||
'invoice_name',
|
||||
function ($model) {
|
||||
if(!Auth::user()->can('viewByOwner', [ENTITY_INVOICE, $model->invoice_user_id])){
|
||||
return $model->invoice_number;
|
||||
@ -47,13 +47,13 @@ class PaymentDatatable extends EntityDatatable
|
||||
}
|
||||
],
|
||||
[
|
||||
'payment_type',
|
||||
'method',
|
||||
function ($model) {
|
||||
return ($model->payment_type && !$model->last4) ? $model->payment_type : ($model->account_gateway_id ? $model->gateway_name : '');
|
||||
}
|
||||
],
|
||||
[
|
||||
'payment_type_id',
|
||||
'source',
|
||||
function ($model) {
|
||||
$code = str_replace(' ', '', strtolower($model->payment_type));
|
||||
$card_type = trans('texts.card_' . $code);
|
||||
|
@ -39,12 +39,15 @@ class PaymentRepository extends BaseRepository
|
||||
'payments.payment_date',
|
||||
'payments.payment_status_id',
|
||||
'payments.payment_type_id',
|
||||
'payments.payment_type_id as source',
|
||||
'invoices.public_id as invoice_public_id',
|
||||
'invoices.user_id as invoice_user_id',
|
||||
'invoices.invoice_number',
|
||||
'invoices.invoice_number as invoice_name',
|
||||
'contacts.first_name',
|
||||
'contacts.last_name',
|
||||
'contacts.email',
|
||||
'payment_types.name as method',
|
||||
'payment_types.name as payment_type',
|
||||
'payments.account_gateway_id',
|
||||
'payments.deleted_at',
|
||||
|
@ -2272,6 +2272,8 @@ $LANG = array(
|
||||
'mark_paid' => 'Mark Paid',
|
||||
'marked_sent_invoice' => 'Successfully marked invoice sent',
|
||||
'marked_sent_invoices' => 'Successfully marked invoices sent',
|
||||
'invoice_name' => 'Invoice',
|
||||
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user