Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0da2325
feat(db): add codigo_tributacao_nacional column to nfse_company_services
vitormattos Mar 31, 2026
bd56947
feat(routes): register company services CRUD and settings federal routes
vitormattos Mar 31, 2026
7ef0607
feat(controller): add CompanyServiceController for service CRUD manag…
vitormattos Mar 31, 2026
3f0a87f
feat(i18n): add pt-BR labels for federal taxation settings fields
vitormattos Mar 31, 2026
2e8860c
feat(i18n): add en-GB labels for federal taxation settings fields
vitormattos Mar 31, 2026
c883712
feat(settings): persist federal taxation fields in updateFederal endp…
vitormattos Mar 31, 2026
1fc8bc5
feat(invoice): integrate federal taxation mode into DPS emission
vitormattos Mar 31, 2026
868e999
feat(settings-view): add federal taxation tab with mode-conditional v…
vitormattos Mar 31, 2026
497fc3c
feat(invoices-view): update pending invoices view
vitormattos Mar 31, 2026
390e182
test(settings): cover federal taxation fields persistence in updateFe…
vitormattos Mar 31, 2026
3f0e0e0
test(view): cover federal taxation tab field ids and inputs
vitormattos Mar 31, 2026
9c557f7
test(invoice): cover percentage_profile mode and indicadorTributacao …
vitormattos Mar 31, 2026
31ffb22
test(routes): cover company service CRUD route registration
vitormattos Mar 31, 2026
04e5b7b
chore(gitignore): exclude .env.e2e from version control
vitormattos Mar 31, 2026
61c942f
chore(e2e): add .env.e2e.example template for end-to-end test configu…
vitormattos Mar 31, 2026
228c49e
test(e2e): add Playwright auth helper for NFS-e E2E tests
vitormattos Mar 31, 2026
1f931f8
test(e2e): add Playwright settings spec for NFS-e federal taxation tab
vitormattos Mar 31, 2026
13db044
test(e2e): add Playwright emission spec for NFS-e invoice emission flow
vitormattos Mar 31, 2026
22a9117
test(integration): update nfse_endpoints Behat feature with federal r…
vitormattos Mar 31, 2026
7c2d8f4
fix(invoice): fallback item lista service to settings when default se…
vitormattos Mar 31, 2026
fea622e
test(invoice): align national tax code fallback expectation
vitormattos Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.e2e.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
NFSE_E2E_BASE_URL="http://localhost:8082"
NFSE_E2E_EMAIL=""
NFSE_E2E_PASSWORD=""
NFSE_E2E_REAL_EMIT_FLOW="0"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/node_modules/
/playwright-report/
/test-results/
.env.e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

// SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
// SPDX-License-Identifier: AGPL-3.0-or-later

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
public function up(): void
{
if (!Schema::hasTable('nfse_company_services')) {
return;
}

if (Schema::hasColumn('nfse_company_services', 'codigo_tributacao_nacional')) {
return;
}

Schema::table('nfse_company_services', function (Blueprint $table): void {
$table->string('codigo_tributacao_nacional', 6)
->nullable()
->after('item_lista_servico');
});
}

public function down(): void
{
if (!Schema::hasTable('nfse_company_services')) {
return;
}

if (!Schema::hasColumn('nfse_company_services', 'codigo_tributacao_nacional')) {
return;
}

Schema::table('nfse_company_services', function (Blueprint $table): void {
$table->dropColumn('codigo_tributacao_nacional');
});
}
};
17 changes: 0 additions & 17 deletions Http/Controllers/CompanyServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ public function update(Request $request, CompanyService $service): RedirectRespo

$service->update($validated);

if ($service->is_default) {
$this->syncDefaultServiceSettings($service);
}

return redirect()->route('nfse.settings.edit', ['tab' => 'services'])
->with('success', trans('nfse::general.settings.services.service_updated'));
}
Expand Down Expand Up @@ -244,18 +240,5 @@ private function setDefaultService(CompanyService $service): void
->update(['is_default' => false]);

$service->update(['is_default' => true]);

$this->syncDefaultServiceSettings($service);
}

private function syncDefaultServiceSettings(CompanyService $service): void
{
setting([
'nfse.item_lista_servico' => (string) $service->item_lista_servico,
'nfse.codigo_tributacao_nacional' => (string) $service->codigo_tributacao_nacional,
'nfse.aliquota' => number_format((float) $service->aliquota, 2, '.', ''),
]);

setting()->save();
}
}
Loading
Loading