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
{
/**
* Filter by name.
*

View File

@ -293,8 +293,16 @@ abstract class QueryFilters
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
->orWhere($this->with_property, $value)
->orderByRaw("{$this->with_property} = ? DESC", [$value])

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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