1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Add 'Sent' filter to invoice reports #1414

This commit is contained in:
Hillel Coren 2017-05-16 16:56:51 +03:00
parent a99065f70b
commit b2a2ac6630
4 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class InvoiceReport extends AbstractReport
->with(['invoices' => function ($query) use ($status) {
if ($status == 'draft') {
$query->whereIsPublic(false);
} elseif ($status == 'unpaid' || $status == 'paid') {
} elseif (in_array($status, ['paid', 'unpaid', 'sent'])) {
$query->whereIsPublic(true);
}
$query->invoices()

View File

@ -30,7 +30,7 @@ class ProductReport extends AbstractReport
->with(['invoices' => function ($query) use ($status) {
if ($status == 'draft') {
$query->whereIsPublic(false);
} elseif ($status == 'unpaid' || $status == 'paid') {
} elseif (in_array($status, ['paid', 'unpaid', 'sent'])) {
$query->whereIsPublic(true);
}
$query->invoices()

View File

@ -2248,6 +2248,8 @@ $LANG = array(
'oauth_taken' => 'The account is already registered',
'emailed_payment' => 'Successfully emailed payment',
'email_payment' => 'Email Payment',
'sent' => 'Sent',
);
return $LANG;

View File

@ -122,6 +122,7 @@
{!! Former::select('invoice_status')->label('status')
->addOption(trans('texts.all'), 'all')
->addOption(trans('texts.draft'), 'draft')
->addOption(trans('texts.sent'), 'sent')
->addOption(trans('texts.unpaid'), 'unpaid')
->addOption(trans('texts.paid'), 'paid') !!}
</div>