1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00

bug fixes

This commit is contained in:
Hillel Coren 2014-02-19 21:59:46 +02:00
parent 9886487b64
commit 848a6c7e39
7 changed files with 11 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -207,9 +207,11 @@
</div>
{{ Former::select('invoice_design_id')->label('Design')->style('display:inline;width:100px')->raw()
<div style="display:none">
{{ Former::select('invoice_design_id')->label('Design')->style('display:inline;width:120px')->raw()
->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }}
</div>
{{ Button::normal('Download PDF', array('onclick' => 'onDownloadClick()')) }}
@if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed()))

View File

@ -19,7 +19,7 @@
&nbsp;<label for="trashed" style="font-weight:normal">
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
{{ Session::get("trash_{$entityType}") ? 'checked' : ''}}/> Show archived/deleted
{{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted
</label>
<div id="top_right_buttons" class="pull-right">