Fix payments column headers

This commit is contained in:
Hillel Coren 2016-12-15 15:20:36 +02:00
parent 82857d642f
commit 7085c0137f
3 changed files with 8 additions and 3 deletions

View File

@ -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);

View File

@ -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',

View File

@ -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;