1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Fixed problem sorting data tables by client

This commit is contained in:
Hillel Coren 2016-04-27 11:49:54 +03:00
parent bc2880f05e
commit 6ba27c2475
5 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ class CreditRepository extends BaseRepository
DB::raw('COALESCE(clients.currency_id, accounts.currency_id) currency_id'),
DB::raw('COALESCE(clients.country_id, accounts.country_id) country_id'),
'credits.public_id',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'clients.public_id as client_public_id',
'clients.user_id as client_user_id',
'credits.amount',

View File

@ -96,7 +96,7 @@ class ExpenseRepository extends BaseRepository
'vendors.name as vendor_name',
'vendors.public_id as vendor_public_id',
'vendors.user_id as vendor_user_id',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'clients.public_id as client_public_id',
'clients.user_id as client_user_id',
'contacts.first_name',

View File

@ -58,7 +58,7 @@ class InvoiceRepository extends BaseRepository
'clients.user_id as client_user_id',
'invoice_number',
'invoice_status_id',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'invoices.public_id',
'invoices.amount',
'invoices.balance',
@ -115,7 +115,7 @@ class InvoiceRepository extends BaseRepository
DB::raw('COALESCE(clients.currency_id, accounts.currency_id) currency_id'),
DB::raw('COALESCE(clients.country_id, accounts.country_id) country_id'),
'clients.public_id as client_public_id',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'invoices.public_id',
'invoices.amount',
'frequencies.name as frequency',
@ -169,7 +169,7 @@ class InvoiceRepository extends BaseRepository
'invoices.balance as balance',
'invoices.due_date',
'clients.public_id as client_public_id',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'invoices.public_id',
'invoices.amount',
'invoices.start_date',

View File

@ -34,7 +34,7 @@ class PaymentRepository extends BaseRepository
DB::raw('COALESCE(clients.currency_id, accounts.currency_id) currency_id'),
DB::raw('COALESCE(clients.country_id, accounts.country_id) country_id'),
'payments.transaction_reference',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'clients.public_id as client_public_id',
'clients.user_id as client_user_id',
'payments.amount',
@ -101,7 +101,7 @@ class PaymentRepository extends BaseRepository
'invitations.invitation_key',
'payments.public_id',
'payments.transaction_reference',
'clients.name as client_name',
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'clients.public_id as client_public_id',
'payments.amount',
'payments.payment_date',

View File

@ -25,7 +25,7 @@ class TaskRepository
->where('clients.deleted_at', '=', null)
->select(
'tasks.public_id',
'clients.name as client_name',
\DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
'clients.public_id as client_public_id',
'clients.user_id as client_user_id',
'contacts.first_name',