From 76a69576274171564a7fbe04c3b4ab52d59ba83d Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sun, 3 May 2026 02:07:24 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20=D9=85=D9=8F=D8=B5=D8=A7=D8=AF?= =?UTF-8?q?=D9=8E=D9=82:=20=D8=AA=D8=AD=D8=AF=D9=8A=D8=AB=20=D8=A8=D8=B1?= =?UTF-8?q?=D9=85=D8=AC=D9=8A=20=D8=AC=D8=AF=D9=8A=D8=AF=202026-05-03=2002?= =?UTF-8?q?:07?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Modules/Companies/CompanyService.php | 4 ++++ public/shell.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Modules/Companies/CompanyService.php b/app/Modules/Companies/CompanyService.php index e5bfa14..bc69c7a 100644 --- a/app/Modules/Companies/CompanyService.php +++ b/app/Modules/Companies/CompanyService.php @@ -6,6 +6,7 @@ namespace App\Modules\Companies; use App\Services\Security\EncryptionService; use App\Modules\Companies\CompanyModel; +use Ramsey\Uuid\Uuid; final class CompanyService { @@ -16,6 +17,9 @@ final class CompanyService public function createCompany(array $data): string { + if (!isset($data['id'])) { + $data['id'] = Uuid::uuid4()->toString(); + } // Encrypt sensitive JoFotara credentials if (isset($data['jofotara_client_id'])) { $data['jofotara_client_id_encrypted'] = $this->encryption->encrypt($data['jofotara_client_id']); diff --git a/public/shell.php b/public/shell.php index 2f0b97a..653cb1e 100644 --- a/public/shell.php +++ b/public/shell.php @@ -375,7 +375,7 @@ try { const name = document.getElementById('comp-name').value; const tax = document.getElementById('comp-tax').value; - await API.post('/companies', { name, tax_number: tax }); + await API.post('/companies', { name, tax_identification_number: tax }); document.getElementById('company-modal').remove(); renderCompanies(); } catch(err) {