Olivier Massot 4 роки тому
батько
коміт
41c93e1d90

+ 5 - 0
.gitignore

@@ -28,3 +28,8 @@ src/.phpdoc/
 /.project
 
 symfony.lock
+
+###> phpunit/phpunit ###
+/phpunit.xml
+.phpunit.result.cache
+###< phpunit/phpunit ###

+ 1 - 1
src/Service/Dolibarr/DolibarrService.php

@@ -53,7 +53,7 @@ class DolibarrService
      */
     public function getBills(int $socId): array {
         try {
-            return $this->request("invoices?sortfield=datef&sortorder=DESC&limit=5&thirdparty_ids=" . $socId);
+            return $this->request("invoices?sortfield=datef&sortorder=DESC&limit=5&sqlfilters=fk_soc%3D" . $socId);
         } catch (NotFoundHttpException) {
             return [];
         }

+ 1 - 1
tests/Service/Dolibarr/DolibarrServiceTest.php

@@ -20,7 +20,7 @@ class DolibarrServiceTest extends TestCase
         $this->dolibarrService = new DolibarrService($this->client);
     }
 
-    private function getContentFromFixture(string $filename) {
+    private function getContentFromFixture(string $filename): string {
         $filepath = dirname(__FILE__) . '/fixtures/' . $filename;
         return file_get_contents($filepath);
     }

+ 14 - 0
tests/Service/Mobyt/fixtures/user_status.json

@@ -0,0 +1,14 @@
+{
+  "money": 33.0,
+  "sms": [
+    {
+      "type": "N",
+      "quantity": 300
+    },
+    {
+      "type": "EE",
+      "quantity": 300
+    }
+  ],
+  "email": null
+}