Olivier Massot 4 роки тому
батько
коміт
803f1f190e

+ 16 - 0
src/ApiResources/Dolibarr/DolibarrBill.php

@@ -31,6 +31,12 @@ class DolibarrBill
     #[Groups('dolibarr_get')]
     private int $id;
 
+    /**
+     * Bill reference
+     */
+    #[Groups('dolibarr_get')]
+    private string $ref;
+
     /**
      * Id of the society
      */
@@ -71,6 +77,16 @@ class DolibarrBill
         $this->id = $id;
     }
 
+    public function getRef(): string
+    {
+        return $this->ref;
+    }
+
+    public function setRef(string $ref): void
+    {
+        $this->ref = $ref;
+    }
+
     public function getSocId(): int
     {
         return $this->socId;

+ 1 - 0
src/DataProvider/Dolibarr/DolibarrAccountDataProvider.php

@@ -79,6 +79,7 @@ final class DolibarrAccountDataProvider implements ItemDataProviderInterface, Re
         foreach ($billsData as $billData) {
             $bill = new DolibarrBill();
             $bill->setId((int)$billData['id']);
+            $bill->setRef($billData['ref']);
             $bill->setSocId($dolibarrAccount->getSocId());
             $bill->setTaxExcludedAmount((float)$billData['total_ht']);
             $bill->setTaxIncludedAmount((float)$billData['total_ttc']);

+ 2 - 0
src/Service/Dolibarr/DolibarrService.php

@@ -9,6 +9,8 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
 
 /**
  * Service d'appel à l'API dolibarr
+ *
+ * @see https://prod-erp.2iopenservice.com/api/index.php/explorer/
  */
 class DolibarrService
 {