fix(exports): stabilize published types and compatibility with updated dependencies

This commit is contained in:
2026-04-16 19:41:55 +00:00
parent cb6b3db15a
commit 40ffc2b355
25 changed files with 4539 additions and 5354 deletions
+8 -3
View File
@@ -262,6 +262,9 @@ export class ChartOfAccounts {
* Search accounts
*/
public async searchAccounts(searchTerm: string): Promise<Account[]> {
if (!this.skrType) {
throw new Error('SKR type not set. Initialize SKR03 or SKR04 first.');
}
return await Account.searchAccounts(searchTerm, this.skrType);
}
@@ -287,10 +290,11 @@ export class ChartOfAccounts {
// Apply text search if provided
if (filter?.searchTerm) {
const lowerSearchTerm = filter.searchTerm.toLowerCase();
const searchTerm = filter.searchTerm;
const lowerSearchTerm = searchTerm.toLowerCase();
return accounts.filter(
(account) =>
account.accountNumber.includes(filter.searchTerm) ||
account.accountNumber.includes(searchTerm) ||
account.accountName.toLowerCase().includes(lowerSearchTerm) ||
account.description.toLowerCase().includes(lowerSearchTerm),
);
@@ -468,9 +472,10 @@ export class ChartOfAccounts {
await this.createCustomAccount(accountData);
importedCount++;
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
this.logger.log(
'warn',
`Failed to import account ${parts[0]}: ${error.message}`,
`Failed to import account ${parts[0]}: ${errorMessage}`,
);
}
}