mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on bulk lists
This commit is contained in:
parent
ae28c3c5c3
commit
e9a5d60d7f
@ -19,7 +19,6 @@ class CreditRepository extends BaseRepository
|
||||
->join('clients', 'clients.id', '=', 'credits.client_id')
|
||||
->join('contacts', 'contacts.client_id', '=', 'clients.id')
|
||||
->where('clients.account_id', '=', \Auth::user()->account_id)
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->where('contacts.deleted_at', '=', null)
|
||||
->where('contacts.is_primary', '=', true)
|
||||
->select(
|
||||
@ -43,6 +42,8 @@ class CreditRepository extends BaseRepository
|
||||
|
||||
if ($clientPublicId) {
|
||||
$query->where('clients.public_id', '=', $clientPublicId);
|
||||
} else {
|
||||
$query->whereNull('clients.deleted_at');
|
||||
}
|
||||
|
||||
$this->applyFilters($query, ENTITY_CREDIT);
|
||||
|
@ -46,7 +46,6 @@ class InvoiceRepository extends BaseRepository
|
||||
->join('invoice_statuses', 'invoice_statuses.id', '=', 'invoices.invoice_status_id')
|
||||
->join('contacts', 'contacts.client_id', '=', 'clients.id')
|
||||
->where('invoices.account_id', '=', $accountId)
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->where('contacts.deleted_at', '=', null)
|
||||
->where('invoices.is_recurring', '=', false)
|
||||
->where('contacts.is_primary', '=', true)
|
||||
@ -101,6 +100,8 @@ class InvoiceRepository extends BaseRepository
|
||||
|
||||
if ($clientPublicId) {
|
||||
$query->where('clients.public_id', '=', $clientPublicId);
|
||||
} else {
|
||||
$query->whereNull('clients.deleted_at');
|
||||
}
|
||||
|
||||
if ($filter) {
|
||||
@ -128,7 +129,6 @@ class InvoiceRepository extends BaseRepository
|
||||
->where('contacts.deleted_at', '=', null)
|
||||
->where('invoices.is_recurring', '=', true)
|
||||
->where('contacts.is_primary', '=', true)
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->select(
|
||||
DB::raw('COALESCE(clients.currency_id, accounts.currency_id) currency_id'),
|
||||
DB::raw('COALESCE(clients.country_id, accounts.country_id) country_id'),
|
||||
@ -149,6 +149,8 @@ class InvoiceRepository extends BaseRepository
|
||||
|
||||
if ($clientPublicId) {
|
||||
$query->where('clients.public_id', '=', $clientPublicId);
|
||||
} else {
|
||||
$query->whereNull('clients.deleted_at');
|
||||
}
|
||||
|
||||
$this->applyFilters($query, ENTITY_RECURRING_INVOICE, ENTITY_INVOICE);
|
||||
|
@ -25,7 +25,6 @@ class PaymentRepository extends BaseRepository
|
||||
->leftJoin('account_gateways', 'account_gateways.id', '=', 'payments.account_gateway_id')
|
||||
->leftJoin('gateways', 'gateways.id', '=', 'account_gateways.gateway_id')
|
||||
->where('payments.account_id', '=', \Auth::user()->account_id)
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->where('contacts.is_primary', '=', true)
|
||||
->where('contacts.deleted_at', '=', null)
|
||||
->where('invoices.is_deleted', '=', false)
|
||||
@ -67,6 +66,8 @@ class PaymentRepository extends BaseRepository
|
||||
|
||||
if ($clientPublicId) {
|
||||
$query->where('clients.public_id', '=', $clientPublicId);
|
||||
} else {
|
||||
$query->whereNull('clients.deleted_at');
|
||||
}
|
||||
|
||||
if ($filter) {
|
||||
|
@ -24,7 +24,6 @@ class TaskRepository extends BaseRepository
|
||||
->orWhere('contacts.is_primary', '=', null);
|
||||
})
|
||||
->where('contacts.deleted_at', '=', null)
|
||||
->where('clients.deleted_at', '=', null)
|
||||
->select(
|
||||
'tasks.public_id',
|
||||
\DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
|
||||
@ -52,6 +51,8 @@ class TaskRepository extends BaseRepository
|
||||
|
||||
if ($clientPublicId) {
|
||||
$query->where('clients.public_id', '=', $clientPublicId);
|
||||
} else {
|
||||
$query->whereNull('clients.deleted_at');
|
||||
}
|
||||
|
||||
$this->applyFilters($query, ENTITY_TASK);
|
||||
|
@ -219,8 +219,6 @@
|
||||
$('#statuses_{{ $entityType }}').select2({
|
||||
placeholder: "{{ trans('texts.status') }}",
|
||||
templateSelection: function(data, container) {
|
||||
console.log(data);
|
||||
console.log(container);
|
||||
if (data.id == 'archived') {
|
||||
$(container).css('color', '#fff');
|
||||
$(container).css('background-color', '#f0ad4e');
|
||||
|
Loading…
x
Reference in New Issue
Block a user