Jacek Kowalski
2023-06-14 14d3eeddc827c7d822ecbc7b371b13cb3e9ac108
src/InvoiceSynchronizer.php
@@ -6,15 +6,7 @@
use \Webit\WFirmaSDK\Invoices as Invoices;
use \Webit\WFirmaSDK\Payments as Payments;
class InvoiceSynchronizer {
   protected $wfirma;
   protected $helper;
   function __construct(\Webit\WFirmaSDK\Entity\ModuleApiFactory $wFirmaApi, UcrmHelper $ucrmHelper) {
      $this->wfirma = $wFirmaApi;
      $this->helper = $ucrmHelper;
   }
class InvoiceSynchronizer extends Synchronizer {
   function getContractorId($clientId, $synchronize = TRUE) {
      if ($synchronize) {
         $synchronizer = new ContractorSynchronizer($this->wfirma, $this->helper);
@@ -55,7 +47,7 @@
         [$c2->name(), $c2->unit(), $c2->count(), $c2->price(), $c2->vat(), $c2->discount()];
   }
   function synchronize($ucrmInvoiceId) {
   function synchronize(int $ucrmInvoiceId) {
      $crm = $this->helper->getApi();
      $wFirmaInvoices = $this->wfirma->invoicesApi();