Jacek Kowalski
2022-08-14 48693f7ddc7438cf59100c12184e202a053a9614
src/InvoiceSynchronizer.php
@@ -78,7 +78,8 @@
      $wFirmaContractorId = $this->getContractorId($invoiceData['clientId']);
      $payment = Invoices\Payment::create(
         Payments\PaymentMethod::transfer()
         Payments\PaymentMethod::transfer(),
         new \DateTime($invoiceData['dueDate'])
      );
      if ($wFirmaId) {
@@ -104,6 +105,12 @@
      /** @var \Webit\WFirmaSDK\Invoices\Invoice $invoice */
      $changed = FALSE;
      if ($invoice->payment()->paymentMethod() != $payment->paymentMethod()
         || $invoice->payment()->paymentDate() != $payment->paymentDate()) {
         $invoice->changePayment($payment);
         $changed = TRUE;
      }
      if ($invoice->priceType() != Invoices\PriceType::brutto()) {
         $invoice->changePriceType(Invoices\PriceType::brutto());
         $changed = TRUE;