From 797f70689539add5d9a891f8234a29b29a79cf3d Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 13 Apr 2026 21:57:37 +0000
Subject: [PATCH] Synchronize client's email & phone
---
public.php | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/public.php b/public.php
index 440365a..a0e2a68 100644
--- a/public.php
+++ b/public.php
@@ -2,7 +2,16 @@
require_once(__DIR__ . '/vendor/autoload.php');
try {
- require_once(__DIR__ . '/hook_enable.php');
+ 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();
@@ -15,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);
--
Gitblit v1.10.0