From 03a39f33b84d38a9ac5773abe7e761cd2cd3aa7c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 7 Aug 2025 19:34:23 +1000 Subject: [PATCH] Add Entity Level Validation for Verifactu --- app/DataMapper/CompanySettings.php | 2 +- app/Models/Client.php | 1 + .../Validation/EntityLevelInterface.php | 27 ++++++++++++++ .../Validation/Peppol/EntityLevel.php | 3 +- .../Validation/Verifactu/EntityLevel.php | 37 +++++++++++++++++++ .../Verifactu}/InvoiceValidator.php | 2 +- 6 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 app/Services/EDocument/Standards/Validation/EntityLevelInterface.php create mode 100644 app/Services/EDocument/Standards/Validation/Verifactu/EntityLevel.php rename app/Services/EDocument/Standards/{Verifactu/Validation => Validation/Verifactu}/InvoiceValidator.php (99%) diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 70c9558df3..a6e9cdadbe 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -477,7 +477,7 @@ class CompanySettings extends BaseSettings public $sync_invoice_quote_columns = true; - public $e_invoice_type = 'EN16931'; + public $e_invoice_type = 'EN16931'; //verifactu public $e_quote_type = 'OrderX_Comfort'; diff --git a/app/Models/Client.php b/app/Models/Client.php index 83eb98c207..d79d9dcf40 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -80,6 +80,7 @@ use Illuminate\Contracts\Translation\HasLocalePreference; * @property int|null $updated_at * @property int|null $deleted_at * @property string|null $id_number + * @property string|null $classification * @property-read mixed $hashed_id * @property-read \App\Models\User|null $assigned_user * @property-read \App\Models\User $user diff --git a/app/Services/EDocument/Standards/Validation/EntityLevelInterface.php b/app/Services/EDocument/Standards/Validation/EntityLevelInterface.php new file mode 100644 index 0000000000..8b68114e2b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/EntityLevelInterface.php @@ -0,0 +1,27 @@ +