mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Add 'Sent' filter to invoice reports #1414
This commit is contained in:
parent
a99065f70b
commit
b2a2ac6630
@ -30,7 +30,7 @@ class InvoiceReport extends AbstractReport
|
|||||||
->with(['invoices' => function ($query) use ($status) {
|
->with(['invoices' => function ($query) use ($status) {
|
||||||
if ($status == 'draft') {
|
if ($status == 'draft') {
|
||||||
$query->whereIsPublic(false);
|
$query->whereIsPublic(false);
|
||||||
} elseif ($status == 'unpaid' || $status == 'paid') {
|
} elseif (in_array($status, ['paid', 'unpaid', 'sent'])) {
|
||||||
$query->whereIsPublic(true);
|
$query->whereIsPublic(true);
|
||||||
}
|
}
|
||||||
$query->invoices()
|
$query->invoices()
|
||||||
|
@ -30,7 +30,7 @@ class ProductReport extends AbstractReport
|
|||||||
->with(['invoices' => function ($query) use ($status) {
|
->with(['invoices' => function ($query) use ($status) {
|
||||||
if ($status == 'draft') {
|
if ($status == 'draft') {
|
||||||
$query->whereIsPublic(false);
|
$query->whereIsPublic(false);
|
||||||
} elseif ($status == 'unpaid' || $status == 'paid') {
|
} elseif (in_array($status, ['paid', 'unpaid', 'sent'])) {
|
||||||
$query->whereIsPublic(true);
|
$query->whereIsPublic(true);
|
||||||
}
|
}
|
||||||
$query->invoices()
|
$query->invoices()
|
||||||
|
@ -2248,6 +2248,8 @@ $LANG = array(
|
|||||||
'oauth_taken' => 'The account is already registered',
|
'oauth_taken' => 'The account is already registered',
|
||||||
'emailed_payment' => 'Successfully emailed payment',
|
'emailed_payment' => 'Successfully emailed payment',
|
||||||
'email_payment' => 'Email Payment',
|
'email_payment' => 'Email Payment',
|
||||||
|
'sent' => 'Sent',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
@ -122,6 +122,7 @@
|
|||||||
{!! Former::select('invoice_status')->label('status')
|
{!! Former::select('invoice_status')->label('status')
|
||||||
->addOption(trans('texts.all'), 'all')
|
->addOption(trans('texts.all'), 'all')
|
||||||
->addOption(trans('texts.draft'), 'draft')
|
->addOption(trans('texts.draft'), 'draft')
|
||||||
|
->addOption(trans('texts.sent'), 'sent')
|
||||||
->addOption(trans('texts.unpaid'), 'unpaid')
|
->addOption(trans('texts.unpaid'), 'unpaid')
|
||||||
->addOption(trans('texts.paid'), 'paid') !!}
|
->addOption(trans('texts.paid'), 'paid') !!}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user