New companies are not provisioned with accounting data and setup reports false success
✅ Prerequisites
- I have searched for existing issues and confirm this bug has not already been reported.
AureusERP Version(s) Affected
d7d4718 — 2026-09-17
Issue Description
The default company created during installation, MyCompany (ID 1), has the initial accounting setup.
However, a second company created from the admin interface (ID 2) is created without the required accounting data. Opening the product creation page then throws a MissingSettings error. The Setup Accounting action also displays a success notification, but the setup is still missing after refreshing the page.
This is related to, but distinct from, #1501. Issue #1501 concerns country/currency selection during initial installation; this issue concerns accounting provisioning for companies created later.
⚙️ Preconditions
- OS: Windows Server 2019 Standard
- PHP: 8.4.12
- Database: MySQL 8.4.3
- Company 1:
MyCompany, created automatically during installation - Company 2: created later from the admin interface
- Company 1 has the initial accounting setup
- Company 2 has no or incomplete accounting journals and company-specific accounting settings
Steps to Reproduce
Install and start AureusERP.
Confirm that
MyCompanyis created with ID1.Create a second company from the admin interface.
Switch to the newly created company, ID
2.Open:
/admin/inventory/products/products/createObserve the
MissingSettingserror.Open:
/admin/accounting/settings/manage-default-accountsClick
Setup Accounting.Refresh the page.
❌ Actual Behavior
- Product creation throws a 500 error because
DefaultAccountSettingsis missing. - The accounting setup action shows a success notification.
- After refreshing, the company is still not set up.
- Company 2 has no expected accounting journals or default account settings.
✅ Expected Behavior
- A newly created company should have the required accounting setup, or show a clear setup error.
- Product creation should not throw a 500 error when accounting is not configured.
- The setup action should show success only when the setup was actually completed.
Database Observation
The database comparison showed:
- Company 1 (
MyCompany) has accounting journals and settings. - Company 2 has zero or incomplete accounting journals and settings.
settings.general.default_company_idmay resolve to Company 2, the same company being configured.
Changing the setting to Company 1 and running the setup service for Company 2 allows Company 1 to be used as the template. This is only a diagnostic workaround, not a solution.
Possible Cause
AccountingSetupService::templateCompanyId() can resolve the target company as its own template. When the template ID equals the target company ID, setUp() returns false without explaining the reason, while the UI still displays a success notification.
Some pages also use the accounting setup gate, while AccountProductSchema loads DefaultAccountSettings directly and throws MissingSettings.
Relevant Code
plugins/webkul/accounts/src/Services/AccountingSetupService.phpplugins/webkul/accounting/src/Filament/Concerns/GatesAccountingSetup.phpplugins/webkul/accounts/src/Filament/Resources/ProductResource/Schemas/AccountProductSchema.php:127
Error Log
Tried loading settings 'Webkul\Account\Settings\DefaultAccountSettings', and the following properties were missing: currency_exchange_journal_id, income_currency_exchange_account_id, expense_currency_exchange_account_id, account_discount_expense_allocation_id, account_discount_income_allocation_id, account_journal_suspense_account_id, transfer_account_id, account_journal_payment_debit_account_id, account_journal_payment_credit_account_id, income_account_id, expense_account_idSource: aureuserp/aureuserp