diff --git a/app/Ninja/Reports/InvoiceReport.php b/app/Ninja/Reports/InvoiceReport.php index b9cb66d0f5..1da6e8c5ef 100644 --- a/app/Ninja/Reports/InvoiceReport.php +++ b/app/Ninja/Reports/InvoiceReport.php @@ -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() diff --git a/app/Ninja/Reports/ProductReport.php b/app/Ninja/Reports/ProductReport.php index a0124a825b..37ad9b6cfd 100644 --- a/app/Ninja/Reports/ProductReport.php +++ b/app/Ninja/Reports/ProductReport.php @@ -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() diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 68d19a4e53..b8b0a9d74d 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -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; diff --git a/resources/views/reports/chart_builder.blade.php b/resources/views/reports/chart_builder.blade.php index a6cd6774ee..e1597623c0 100644 --- a/resources/views/reports/chart_builder.blade.php +++ b/resources/views/reports/chart_builder.blade.php @@ -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') !!}