Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop

This commit is contained in:
David Bomba 2023-04-28 06:53:55 +10:00
commit aee3b77581
8 changed files with 25 additions and 18 deletions

View File

@ -18,6 +18,7 @@ use Illuminate\Database\Eloquent\Builder;
*/ */
class ClientFilters extends QueryFilters class ClientFilters extends QueryFilters
{ {
/** /**
* Filter by name. * Filter by name.
* *

View File

@ -293,8 +293,16 @@ abstract class QueryFilters
return $this->builder; return $this->builder;
} }
public function with(string $value): Builder public function with(string $value = ''): Builder
{ {
if (strlen($value) == 0) {
return $this->builder;
}
if($this->with_property == 'id') {
$value = $this->decodePrimaryKey($value);
}
return $this->builder return $this->builder
->orWhere($this->with_property, $value) ->orWhere($this->with_property, $value)
->orderByRaw("{$this->with_property} = ? DESC", [$value]) ->orderByRaw("{$this->with_property} = ? DESC", [$value])

View File

@ -40,15 +40,15 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
// DB::listen(function($query) { \DB::listen(function($query) {
// nlog( nlog(
// $query->sql, $query->sql,
// [ [
// 'bindings' => $query->bindings, 'bindings' => $query->bindings,
// 'time' => $query->time 'time' => $query->time
// ] ]
// ); );
// }); });
// Model::preventLazyLoading( // Model::preventLazyLoading(
// !$this->app->isProduction() // !$this->app->isProduction()

View File

@ -4,8 +4,8 @@ includes:
parameters: parameters:
ignoreErrors: ignoreErrors:
- '#Call to an undefined method .*badMethod\(\)#' - '#Call to an undefined method .*badMethod\(\)#'
- 'Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude(). - '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
level: 2 level: 4
paths: paths:
- app - app
universalObjectCratesClasses: universalObjectCratesClasses:

View File

@ -9,7 +9,7 @@
* @license https://www.elastic.co/licensing/elastic-license * @license https://www.elastic.co/licensing/elastic-license
*/ */
namespace Tests\Feature; namespace Tests\Feature\EInvoice;
use App\Services\Invoice\EInvoice\FacturaEInvoice; use App\Services\Invoice\EInvoice\FacturaEInvoice;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;
@ -19,7 +19,6 @@ use Tests\TestCase;
/** /**
* @test * @test
* @covers App\Http\Controllers\ActivityController
*/ */
class FacturaeTest extends TestCase class FacturaeTest extends TestCase
{ {

View File

@ -9,7 +9,7 @@
* @license https://www.elastic.co/licensing/elastic-license * @license https://www.elastic.co/licensing/elastic-license
*/ */
namespace Tests\Feature; namespace Tests\Feature\EInvoice;
use App\Services\Invoice\EInvoice\FatturaPA; use App\Services\Invoice\EInvoice\FatturaPA;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;

View File

@ -19,7 +19,6 @@ use App\Models\Company;
use App\Models\Invoice; use App\Models\Invoice;
use App\Models\User; use App\Models\User;
use App\Services\Report\ARDetailReport; use App\Services\Report\ARDetailReport;
use App\Services\Report\UserSalesReport;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Routing\Middleware\ThrottleRequests;
use Tests\MockAccountData; use Tests\MockAccountData;
@ -28,7 +27,7 @@ use Tests\TestCase;
/** /**
* @test * @test
*/ */
class ARDetailReportTest extends TestCase class ArDetailReportTest extends TestCase
{ {
use MakesHash; use MakesHash;

View File

@ -27,7 +27,7 @@ use Tests\TestCase;
/** /**
* @test * @test
*/ */
class ARSummaryReportTest extends TestCase class ArSummaryReportTest extends TestCase
{ {
use MakesHash; use MakesHash;