Jacek Kowalski
2026-02-17 148d376f573020cfc0ff52c96082136d6d65824a
public.php
@@ -2,6 +2,17 @@
require_once(__DIR__ . '/vendor/autoload.php');
try {
   if (isset($_GET['barcode'])) {
      header('Content-Type: image/svg+xml');
      echo (new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([
         'outputBase64' => false,
         'addQuietzone' => false,
         'drawLightModules' => false,
         'connectPaths' => true,
      ])))->render($_GET['barcode']);
      die();
   }
   $helper = new \SIPL\UCRM\wFirma\UcrmHelper();
   $event = $helper->getCurrentEvent();
@@ -13,6 +24,9 @@
   } elseif ($event['entity'] === 'client') {
      $synchronizer = new \SIPL\UCRM\wFirma\ContractorSynchronizer($wFirmaApi, $helper);
   } elseif ($event['entity'] === 'invoice') {
      $qrSync = new \SIPL\UCRM\wFirma\InvoiceQrCodeSynchronizer($helper);
      $qrSync->synchronize($event['entityId'], $event['extraData']['entityBeforeEdit'] ?? null);
      $synchronizer = new \SIPL\UCRM\wFirma\InvoiceSynchronizer($wFirmaApi, $helper);
   } elseif ($event['entity'] === 'payment') {
      $synchronizer = new \SIPL\UCRM\wFirma\PaymentSynchronizer($wFirmaApi, $helper);