From ee8a4b6ab6844c075f46acb5469b9f4d13c64085 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 28 Aug 2024 17:07:17 +1000 Subject: [PATCH 1/3] Fixes for tests --- .../EDocument/Gateway/Storecove/StorecoveRouter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/EDocument/Gateway/Storecove/StorecoveRouter.php b/app/Services/EDocument/Gateway/Storecove/StorecoveRouter.php index c40bbb8aca44..796afb2ddf5f 100644 --- a/app/Services/EDocument/Gateway/Storecove/StorecoveRouter.php +++ b/app/Services/EDocument/Gateway/Storecove/StorecoveRouter.php @@ -99,10 +99,10 @@ class StorecoveRouter * Return the routing code based on country and entity classification * * @param string $country - * @param string $classification + * @param ?string $classification * @return string */ - public function resolveRouting(string $country, string $classification): string + public function resolveRouting(string $country, ?string $classification = 'business'): string { $rules = $this->routing_rules[$country]; @@ -133,7 +133,7 @@ class StorecoveRouter * @param ?string $classification * @return string */ - public function resolveTaxScheme(string $country, ?string $classification): string + public function resolveTaxScheme(string $country, ?string $classification = "business"): string { $rules = isset($this->routing_rules[$country]) ? $this->routing_rules[$country] : [false, false, false, false]; From 29068cb01e44a6d3cf46af3b6e9b5dce7f3ca099 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 28 Aug 2024 17:20:41 +1000 Subject: [PATCH 2/3] Minor fixes --- tests/Feature/EInvoice/FatturaPATest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Feature/EInvoice/FatturaPATest.php b/tests/Feature/EInvoice/FatturaPATest.php index bb9b0e6c983c..b53fad3d4d28 100644 --- a/tests/Feature/EInvoice/FatturaPATest.php +++ b/tests/Feature/EInvoice/FatturaPATest.php @@ -129,6 +129,8 @@ class FatturaPATest extends TestCase $e = new EInvoice(); $errors = $e->validate($fe); + + if(count($errors) > 0) { nlog($errors); } From 6c0c895ccd1c3a03e3e7baac8acdc89b984163ea Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 28 Aug 2024 17:31:19 +1000 Subject: [PATCH 3/3] Updates for BGN --- .../migrations/2024_08_26_055523_add_qb_product_hash.php | 7 +++++++ database/seeders/CurrenciesSeeder.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/database/migrations/2024_08_26_055523_add_qb_product_hash.php b/database/migrations/2024_08_26_055523_add_qb_product_hash.php index 41de33759a8d..5bbd59e8e30c 100644 --- a/database/migrations/2024_08_26_055523_add_qb_product_hash.php +++ b/database/migrations/2024_08_26_055523_add_qb_product_hash.php @@ -18,6 +18,13 @@ return new class extends Migration Schema::table('companies', function (Blueprint $table){ $table->bigInteger('legal_entity_id')->nullable(); }); + + + if($currency = \App\Models\Currency::find(39)) + { + $currency->symbol = 'лв'; + $currency->save(); + } } /** diff --git a/database/seeders/CurrenciesSeeder.php b/database/seeders/CurrenciesSeeder.php index 2ea762c575e7..83f69318659e 100644 --- a/database/seeders/CurrenciesSeeder.php +++ b/database/seeders/CurrenciesSeeder.php @@ -61,7 +61,7 @@ class CurrenciesSeeder extends Seeder ['id' => 36, 'name' => 'Trinidad and Tobago Dollar', 'code' => 'TTD', 'symbol' => 'TT$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 37, 'name' => 'East Caribbean Dollar', 'code' => 'XCD', 'symbol' => 'EC$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 38, 'name' => 'Ghanaian Cedi', 'code' => 'GHS', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], - ['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], + ['id' => 39, 'name' => 'Bulgarian Lev', 'code' => 'BGN', 'symbol' => 'лв', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 40, 'name' => 'Aruban Florin', 'code' => 'AWG', 'symbol' => 'Afl. ', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => '.'], ['id' => 41, 'name' => 'Turkish Lira', 'code' => 'TRY', 'symbol' => 'TL ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], ['id' => 42, 'name' => 'Romanian New Leu', 'code' => 'RON', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],