mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 12:24:30 -04:00
Fixed issue when marking quote as sent
This commit is contained in:
parent
257c4342f1
commit
fac4b6a7aa
@ -104,12 +104,14 @@ class QuoteController extends \BaseController {
|
||||
public function bulk()
|
||||
{
|
||||
$action = Input::get('action');
|
||||
$statusId = Input::get('statusId');
|
||||
$ids = Input::get('id') ? Input::get('id') : Input::get('ids');
|
||||
$count = $this->invoiceRepo->bulk($ids, $action);
|
||||
$count = $this->invoiceRepo->bulk($ids, $action, $statusId);
|
||||
|
||||
if ($count > 0)
|
||||
{
|
||||
$message = Utils::pluralize("{$action}d_quote", $count);
|
||||
$key = $action == 'mark' ? "updated_quote" : "{$action}d_quote";
|
||||
$message = Utils::pluralize($key, $count);
|
||||
Session::flash('message', $message);
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ use TaxRate;
|
||||
|
||||
class InvoiceRepository
|
||||
{
|
||||
public function getInvoices($accountId, $clientPublicId = false, $filter = false)
|
||||
public function getInvoices($accountId, $clientPublicId = false, $entityType = ENTITY_INVOICE, $filter = false)
|
||||
{
|
||||
$query = \DB::table('invoices')
|
||||
->join('clients', 'clients.id', '=','invoices.client_id')
|
||||
@ -22,7 +22,7 @@ class InvoiceRepository
|
||||
->where('contacts.is_primary', '=', true)
|
||||
->select('clients.public_id as client_public_id', 'invoice_number', 'invoice_status_id', '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', 'quote_id', 'quote_invoice_id');
|
||||
|
||||
if (!\Session::get('show_trash:invoice'))
|
||||
if (!\Session::get('show_trash:' . $entityType))
|
||||
{
|
||||
$query->where('invoices.deleted_at', '=', null);
|
||||
}
|
||||
@ -85,7 +85,7 @@ class InvoiceRepository
|
||||
|
||||
public function getDatatable($accountId, $clientPublicId = null, $entityType, $search)
|
||||
{
|
||||
$query = $this->getInvoices($accountId, $clientPublicId, $search)
|
||||
$query = $this->getInvoices($accountId, $clientPublicId, $entityType, $search)
|
||||
->where('invoices.is_quote', '=', $entityType == ENTITY_QUOTE ? true : false);
|
||||
|
||||
$table = \Datatable::query($query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user