|
@@ -172,7 +172,7 @@ class DolibarrApiServiceTest extends TestCase
|
|
|
$dolibarrApiService
|
|
$dolibarrApiService
|
|
|
->expects(self::once())
|
|
->expects(self::once())
|
|
|
->method('getJsonContent')
|
|
->method('getJsonContent')
|
|
|
- ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
|
|
|
|
|
|
|
+ ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => "(fk_soc:=:$socId) and (fk_statut:!=:0)"])
|
|
|
->willReturn([['id' => 10], ['id' => 20]]);
|
|
->willReturn([['id' => 10], ['id' => 20]]);
|
|
|
|
|
|
|
|
$this->assertEquals([['id' => 10], ['id' => 20]], $dolibarrApiService->getBills($socId));
|
|
$this->assertEquals([['id' => 10], ['id' => 20]], $dolibarrApiService->getBills($socId));
|
|
@@ -193,7 +193,7 @@ class DolibarrApiServiceTest extends TestCase
|
|
|
$dolibarrApiService
|
|
$dolibarrApiService
|
|
|
->expects(self::once())
|
|
->expects(self::once())
|
|
|
->method('getJsonContent')
|
|
->method('getJsonContent')
|
|
|
- ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
|
|
|
|
|
|
|
+ ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => "(fk_soc:=:$socId) and (fk_statut:!=:0)"])
|
|
|
->willThrowException(new HttpException(404));
|
|
->willThrowException(new HttpException(404));
|
|
|
|
|
|
|
|
$this->assertEquals([], $dolibarrApiService->getBills($socId));
|
|
$this->assertEquals([], $dolibarrApiService->getBills($socId));
|
|
@@ -214,7 +214,7 @@ class DolibarrApiServiceTest extends TestCase
|
|
|
$dolibarrApiService
|
|
$dolibarrApiService
|
|
|
->expects(self::once())
|
|
->expects(self::once())
|
|
|
->method('getJsonContent')
|
|
->method('getJsonContent')
|
|
|
- ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
|
|
|
|
|
|
|
+ ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => "(fk_soc:=:$socId) and (fk_statut:!=:0)"])
|
|
|
->willThrowException(new HttpException(500));
|
|
->willThrowException(new HttpException(500));
|
|
|
|
|
|
|
|
$this->expectException(HttpException::class);
|
|
$this->expectException(HttpException::class);
|