diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 988b83db0f..93db77a269 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -60,7 +60,7 @@ class AccountController extends \BaseController { public function setTrashVisible($entityType, $visible) { - Session::put("trash_{$entityType}", $visible == 'true'); + Session::put('show_trash', $visible == 'true'); return Redirect::to("{$entityType}s"); } diff --git a/app/ninja/repositories/ClientRepository.php b/app/ninja/repositories/ClientRepository.php index 263ef151d2..6084a78475 100755 --- a/app/ninja/repositories/ClientRepository.php +++ b/app/ninja/repositories/ClientRepository.php @@ -13,7 +13,7 @@ class ClientRepository ->where('contacts.is_primary', '=', true) ->select('clients.public_id','clients.name','contacts.first_name','contacts.last_name','clients.balance','clients.last_login','clients.created_at','clients.work_phone','contacts.email','clients.currency_id'); - if (!\Session::get('trash_client')) + if (!\Session::get('show_trash')) { $query->where('clients.deleted_at', '=', null); } diff --git a/app/ninja/repositories/CreditRepository.php b/app/ninja/repositories/CreditRepository.php index e9924600a8..ca3f03ac13 100755 --- a/app/ninja/repositories/CreditRepository.php +++ b/app/ninja/repositories/CreditRepository.php @@ -22,7 +22,7 @@ class CreditRepository $query->where('clients.public_id', '=', $clientPublicId); } - if (!\Session::get('trash_credit')) + if (!\Session::get('show_trash')) { $query->where('credits.deleted_at', '=', null); } diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php index 3982cc62c8..b22b59c16d 100755 --- a/app/ninja/repositories/InvoiceRepository.php +++ b/app/ninja/repositories/InvoiceRepository.php @@ -20,7 +20,7 @@ class InvoiceRepository ->where('contacts.is_primary', '=', true) ->select('clients.public_id as client_public_id', 'invoice_number', 'clients.name as client_name', 'invoices.public_id', 'amount', 'invoices.balance', 'invoice_date', 'due_date', 'invoice_statuses.name as invoice_status_name', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email'); - if (!\Session::get('trash_invoice')) + if (!\Session::get('show_trash')) { $query->where('invoices.deleted_at', '=', null); } @@ -60,7 +60,7 @@ class InvoiceRepository $query->where('clients.public_id', '=', $clientPublicId); } - if (!\Session::get('trash_invoice')) + if (!\Session::get('show_trash')) { $query->where('invoices.deleted_at', '=', null); } diff --git a/app/ninja/repositories/PaymentRepository.php b/app/ninja/repositories/PaymentRepository.php index 44e661bba4..d9a126e2c2 100755 --- a/app/ninja/repositories/PaymentRepository.php +++ b/app/ninja/repositories/PaymentRepository.php @@ -20,7 +20,7 @@ class PaymentRepository ->where('contacts.is_primary', '=', true) ->select('payments.public_id', 'payments.transaction_reference', 'clients.name as client_name', 'clients.public_id as client_public_id', 'payments.amount', 'payments.payment_date', 'invoices.public_id as invoice_public_id', 'invoices.invoice_number', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'payment_types.name as payment_type'); - if (!\Session::get('trash_payment')) + if (!\Session::get('show_trash')) { $query->where('payments.deleted_at', '=', null); } diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index 7f2477f2e3..baee61b8e4 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -207,9 +207,11 @@ - {{ Former::select('invoice_design_id')->label('Design')->style('display:inline;width:100px')->raw() +
+ {{ Button::normal('Download PDF', array('onclick' => 'onDownloadClick()')) }} @if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed())) diff --git a/app/views/list.blade.php b/app/views/list.blade.php index 90f491cf29..deed03edbd 100755 --- a/app/views/list.blade.php +++ b/app/views/list.blade.php @@ -19,7 +19,7 @@