diff --git a/lib/data/models/company_model.dart b/lib/data/models/company_model.dart index 125107aee..b24cf3260 100644 --- a/lib/data/models/company_model.dart +++ b/lib/data/models/company_model.dart @@ -71,6 +71,8 @@ abstract class CompanyEntity extends Object slackWebhookUrl: '', googleAnalyticsKey: '', clientCanRegister: true, + autoStartTasks: false, + invoiceTaskTimelog: true, isLarge: false, enableShopApi: false, convertProductExchangeRate: false, @@ -90,7 +92,6 @@ abstract class CompanyEntity extends Object taskStatusMap: BuiltMap(), companyGateways: BuiltList(), expenseCategories: BuiltList(), - expenseCategoryMap: BuiltMap(), users: BuiltList(), customFields: BuiltMap(), activities: BuiltList(), @@ -216,8 +217,6 @@ abstract class CompanyEntity extends Object @BuiltValueField(wireName: 'expense_categories') BuiltList get expenseCategories; - BuiltMap get expenseCategoryMap; - BuiltList get users; BuiltList get clients; @@ -268,10 +267,15 @@ abstract class CompanyEntity extends Object @BuiltValueField(wireName: 'mark_expenses_paid') bool get markExpensesPaid; - @nullable // TODO remove nullable @BuiltValueField(wireName: 'invoice_expense_documents') bool get invoiceExpenseDocuments; + @BuiltValueField(wireName: 'invoice_task_timelog') + bool get invoiceTaskTimelog; + + @BuiltValueField(wireName: 'auto_start_tasks') + bool get autoStartTasks; + @BuiltValueField(wireName: 'use_credits_payment') String get useCreditsPayment; diff --git a/lib/data/models/company_model.g.dart b/lib/data/models/company_model.g.dart index 789322f21..cc35273e6 100644 --- a/lib/data/models/company_model.g.dart +++ b/lib/data/models/company_model.g.dart @@ -135,12 +135,6 @@ class _$CompanyEntitySerializer implements StructuredSerializer { serializers.serialize(object.expenseCategories, specifiedType: const FullType( BuiltList, const [const FullType(ExpenseCategoryEntity)])), - 'expenseCategoryMap', - serializers.serialize(object.expenseCategoryMap, - specifiedType: const FullType(BuiltMap, const [ - const FullType(String), - const FullType(ExpenseCategoryEntity) - ])), 'users', serializers.serialize(object.users, specifiedType: @@ -221,6 +215,15 @@ class _$CompanyEntitySerializer implements StructuredSerializer { 'mark_expenses_paid', serializers.serialize(object.markExpensesPaid, specifiedType: const FullType(bool)), + 'invoice_expense_documents', + serializers.serialize(object.invoiceExpenseDocuments, + specifiedType: const FullType(bool)), + 'invoice_task_timelog', + serializers.serialize(object.invoiceTaskTimelog, + specifiedType: const FullType(bool)), + 'auto_start_tasks', + serializers.serialize(object.autoStartTasks, + specifiedType: const FullType(bool)), 'use_credits_payment', serializers.serialize(object.useCreditsPayment, specifiedType: const FullType(String)), @@ -245,12 +248,6 @@ class _$CompanyEntitySerializer implements StructuredSerializer { ..add(serializers.serialize(object.plan, specifiedType: const FullType(String))); } - if (object.invoiceExpenseDocuments != null) { - result - ..add('invoice_expense_documents') - ..add(serializers.serialize(object.invoiceExpenseDocuments, - specifiedType: const FullType(bool))); - } if (object.enabledModules != null) { result ..add('enabled_modules') @@ -445,13 +442,6 @@ class _$CompanyEntitySerializer implements StructuredSerializer { BuiltList, const [const FullType(ExpenseCategoryEntity)])) as BuiltList); break; - case 'expenseCategoryMap': - result.expenseCategoryMap.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, const [ - const FullType(String), - const FullType(ExpenseCategoryEntity) - ]))); - break; case 'users': result.users.replace(serializers.deserialize(value, specifiedType: const FullType( @@ -573,6 +563,14 @@ class _$CompanyEntitySerializer implements StructuredSerializer { result.invoiceExpenseDocuments = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; + case 'invoice_task_timelog': + result.invoiceTaskTimelog = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + break; + case 'auto_start_tasks': + result.autoStartTasks = serializers.deserialize(value, + specifiedType: const FullType(bool)) as bool; + break; case 'use_credits_payment': result.useCreditsPayment = serializers.deserialize(value, specifiedType: const FullType(String)) as String; @@ -2921,8 +2919,6 @@ class _$CompanyEntity extends CompanyEntity { @override final BuiltList expenseCategories; @override - final BuiltMap expenseCategoryMap; - @override final BuiltList users; @override final BuiltList clients; @@ -2967,6 +2963,10 @@ class _$CompanyEntity extends CompanyEntity { @override final bool invoiceExpenseDocuments; @override + final bool invoiceTaskTimelog; + @override + final bool autoStartTasks; + @override final String useCreditsPayment; @override final SettingsEntity settings; @@ -3027,7 +3027,6 @@ class _$CompanyEntity extends CompanyEntity { this.taskStatusMap, this.companyGateways, this.expenseCategories, - this.expenseCategoryMap, this.users, this.clients, this.products, @@ -3050,6 +3049,8 @@ class _$CompanyEntity extends CompanyEntity { this.markExpensesInvoiceable, this.markExpensesPaid, this.invoiceExpenseDocuments, + this.invoiceTaskTimelog, + this.autoStartTasks, this.useCreditsPayment, this.settings, this.enabledModules, @@ -3164,9 +3165,6 @@ class _$CompanyEntity extends CompanyEntity { if (expenseCategories == null) { throw new BuiltValueNullFieldError('CompanyEntity', 'expenseCategories'); } - if (expenseCategoryMap == null) { - throw new BuiltValueNullFieldError('CompanyEntity', 'expenseCategoryMap'); - } if (users == null) { throw new BuiltValueNullFieldError('CompanyEntity', 'users'); } @@ -3231,6 +3229,16 @@ class _$CompanyEntity extends CompanyEntity { if (markExpensesPaid == null) { throw new BuiltValueNullFieldError('CompanyEntity', 'markExpensesPaid'); } + if (invoiceExpenseDocuments == null) { + throw new BuiltValueNullFieldError( + 'CompanyEntity', 'invoiceExpenseDocuments'); + } + if (invoiceTaskTimelog == null) { + throw new BuiltValueNullFieldError('CompanyEntity', 'invoiceTaskTimelog'); + } + if (autoStartTasks == null) { + throw new BuiltValueNullFieldError('CompanyEntity', 'autoStartTasks'); + } if (useCreditsPayment == null) { throw new BuiltValueNullFieldError('CompanyEntity', 'useCreditsPayment'); } @@ -3294,7 +3302,6 @@ class _$CompanyEntity extends CompanyEntity { taskStatusMap == other.taskStatusMap && companyGateways == other.companyGateways && expenseCategories == other.expenseCategories && - expenseCategoryMap == other.expenseCategoryMap && users == other.users && clients == other.clients && products == other.products && @@ -3317,6 +3324,8 @@ class _$CompanyEntity extends CompanyEntity { markExpensesInvoiceable == other.markExpensesInvoiceable && markExpensesPaid == other.markExpensesPaid && invoiceExpenseDocuments == other.invoiceExpenseDocuments && + invoiceTaskTimelog == other.invoiceTaskTimelog && + autoStartTasks == other.autoStartTasks && useCreditsPayment == other.useCreditsPayment && settings == other.settings && enabledModules == other.enabledModules && @@ -3352,14 +3361,14 @@ class _$CompanyEntity extends CompanyEntity { $jc( $jc( $jc( - $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, enableCustomSurchargeTaxes1.hashCode), enableCustomSurchargeTaxes2.hashCode), enableCustomSurchargeTaxes3.hashCode), enableCustomSurchargeTaxes4.hashCode), sizeId.hashCode), industryId.hashCode), subdomain.hashCode), portalMode.hashCode), portalDomain.hashCode), updateProducts.hashCode), convertProductExchangeRate.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), enableShopApi.hashCode), plan.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), groups.hashCode), activities.hashCode), taxRates.hashCode), taskStatuses.hashCode), taskStatusMap.hashCode), companyGateways.hashCode), expenseCategories.hashCode), expenseCategoryMap.hashCode), users.hashCode), clients.hashCode), products.hashCode), invoices.hashCode), recurringInvoices.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), tokens.hashCode), webhooks.hashCode), - paymentTerms.hashCode), - customFields.hashCode), - slackWebhookUrl.hashCode), - googleAnalyticsKey.hashCode), - markExpensesInvoiceable.hashCode), - markExpensesPaid.hashCode), - invoiceExpenseDocuments.hashCode), + $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, enableCustomSurchargeTaxes1.hashCode), enableCustomSurchargeTaxes2.hashCode), enableCustomSurchargeTaxes3.hashCode), enableCustomSurchargeTaxes4.hashCode), sizeId.hashCode), industryId.hashCode), subdomain.hashCode), portalMode.hashCode), portalDomain.hashCode), updateProducts.hashCode), convertProductExchangeRate.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), enableShopApi.hashCode), plan.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), groups.hashCode), activities.hashCode), taxRates.hashCode), taskStatuses.hashCode), taskStatusMap.hashCode), companyGateways.hashCode), expenseCategories.hashCode), users.hashCode), clients.hashCode), products.hashCode), invoices.hashCode), recurringInvoices.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), tokens.hashCode), webhooks.hashCode), paymentTerms.hashCode), customFields.hashCode), + slackWebhookUrl.hashCode), + googleAnalyticsKey.hashCode), + markExpensesInvoiceable.hashCode), + markExpensesPaid.hashCode), + invoiceExpenseDocuments.hashCode), + invoiceTaskTimelog.hashCode), + autoStartTasks.hashCode), useCreditsPayment.hashCode), settings.hashCode), enabledModules.hashCode), @@ -3409,7 +3418,6 @@ class _$CompanyEntity extends CompanyEntity { ..add('taskStatusMap', taskStatusMap) ..add('companyGateways', companyGateways) ..add('expenseCategories', expenseCategories) - ..add('expenseCategoryMap', expenseCategoryMap) ..add('users', users) ..add('clients', clients) ..add('products', products) @@ -3432,6 +3440,8 @@ class _$CompanyEntity extends CompanyEntity { ..add('markExpensesInvoiceable', markExpensesInvoiceable) ..add('markExpensesPaid', markExpensesPaid) ..add('invoiceExpenseDocuments', invoiceExpenseDocuments) + ..add('invoiceTaskTimelog', invoiceTaskTimelog) + ..add('autoStartTasks', autoStartTasks) ..add('useCreditsPayment', useCreditsPayment) ..add('settings', settings) ..add('enabledModules', enabledModules) @@ -3609,14 +3619,6 @@ class CompanyEntityBuilder set expenseCategories(ListBuilder expenseCategories) => _$this._expenseCategories = expenseCategories; - MapBuilder _expenseCategoryMap; - MapBuilder get expenseCategoryMap => - _$this._expenseCategoryMap ??= - new MapBuilder(); - set expenseCategoryMap( - MapBuilder expenseCategoryMap) => - _$this._expenseCategoryMap = expenseCategoryMap; - ListBuilder _users; ListBuilder get users => _$this._users ??= new ListBuilder(); @@ -3736,6 +3738,16 @@ class CompanyEntityBuilder set invoiceExpenseDocuments(bool invoiceExpenseDocuments) => _$this._invoiceExpenseDocuments = invoiceExpenseDocuments; + bool _invoiceTaskTimelog; + bool get invoiceTaskTimelog => _$this._invoiceTaskTimelog; + set invoiceTaskTimelog(bool invoiceTaskTimelog) => + _$this._invoiceTaskTimelog = invoiceTaskTimelog; + + bool _autoStartTasks; + bool get autoStartTasks => _$this._autoStartTasks; + set autoStartTasks(bool autoStartTasks) => + _$this._autoStartTasks = autoStartTasks; + String _useCreditsPayment; String get useCreditsPayment => _$this._useCreditsPayment; set useCreditsPayment(String useCreditsPayment) => @@ -3825,7 +3837,6 @@ class CompanyEntityBuilder _taskStatusMap = _$v.taskStatusMap?.toBuilder(); _companyGateways = _$v.companyGateways?.toBuilder(); _expenseCategories = _$v.expenseCategories?.toBuilder(); - _expenseCategoryMap = _$v.expenseCategoryMap?.toBuilder(); _users = _$v.users?.toBuilder(); _clients = _$v.clients?.toBuilder(); _products = _$v.products?.toBuilder(); @@ -3848,6 +3859,8 @@ class CompanyEntityBuilder _markExpensesInvoiceable = _$v.markExpensesInvoiceable; _markExpensesPaid = _$v.markExpensesPaid; _invoiceExpenseDocuments = _$v.invoiceExpenseDocuments; + _invoiceTaskTimelog = _$v.invoiceTaskTimelog; + _autoStartTasks = _$v.autoStartTasks; _useCreditsPayment = _$v.useCreditsPayment; _settings = _$v.settings?.toBuilder(); _enabledModules = _$v.enabledModules; @@ -3916,7 +3929,6 @@ class CompanyEntityBuilder taskStatusMap: taskStatusMap.build(), companyGateways: companyGateways.build(), expenseCategories: expenseCategories.build(), - expenseCategoryMap: expenseCategoryMap.build(), users: users.build(), clients: clients.build(), products: products.build(), @@ -3939,6 +3951,8 @@ class CompanyEntityBuilder markExpensesInvoiceable: markExpensesInvoiceable, markExpensesPaid: markExpensesPaid, invoiceExpenseDocuments: invoiceExpenseDocuments, + invoiceTaskTimelog: invoiceTaskTimelog, + autoStartTasks: autoStartTasks, useCreditsPayment: useCreditsPayment, settings: settings.build(), enabledModules: enabledModules, @@ -3968,8 +3982,6 @@ class CompanyEntityBuilder companyGateways.build(); _$failedField = 'expenseCategories'; expenseCategories.build(); - _$failedField = 'expenseCategoryMap'; - expenseCategoryMap.build(); _$failedField = 'users'; users.build(); _$failedField = 'clients'; diff --git a/lib/data/models/serializers.g.dart b/lib/data/models/serializers.g.dart index 326209b5d..119abf45c 100644 --- a/lib/data/models/serializers.g.dart +++ b/lib/data/models/serializers.g.dart @@ -342,12 +342,6 @@ Serializers _$serializers = (new Serializers().toBuilder() const FullType( BuiltList, const [const FullType(ExpenseCategoryEntity)]), () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType(ExpenseCategoryEntity) - ]), - () => new MapBuilder()) ..addBuilderFactory( const FullType(BuiltList, const [const FullType(UserEntity)]), () => new ListBuilder()) @@ -394,18 +388,44 @@ Serializers _$serializers = (new Serializers().toBuilder() const FullType(BuiltList, const [const FullType(WebhookEntity)]), () => new ListBuilder()) ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(PaymentTermEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltMap, const [const FullType(String), const FullType(String)]), () => new MapBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(HistoryRecord)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(IndustryEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvoiceEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvoiceEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvoiceScheduleEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvoiceItemEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvitationEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(DocumentEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(InvoiceHistoryEntity)]), () => new ListBuilder()) - ..addBuilderFactory(const FullType(BuiltList, const [const FullType(LanguageEntity)]), () => new ListBuilder()) + const FullType(BuiltList, const [const FullType(PaymentTermEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType( + BuiltMap, const [const FullType(String), const FullType(String)]), + () => new MapBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(HistoryRecord)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(IndustryEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(InvoiceEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(InvoiceEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType( + BuiltList, const [const FullType(InvoiceScheduleEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(InvoiceItemEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(InvitationEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(DocumentEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType( + BuiltList, const [const FullType(InvoiceHistoryEntity)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(LanguageEntity)]), + () => new ListBuilder()) ..addBuilderFactory(const FullType(BuiltList, const [const FullType(PaymentEntity)]), () => new ListBuilder()) ..addBuilderFactory(const FullType(BuiltList, const [const FullType(PaymentTermEntity)]), () => new ListBuilder()) ..addBuilderFactory(const FullType(BuiltList, const [const FullType(PaymentTypeEntity)]), () => new ListBuilder()) diff --git a/lib/redux/company/company_reducer.dart b/lib/redux/company/company_reducer.dart index 155719a26..e1d4a0330 100644 --- a/lib/redux/company/company_reducer.dart +++ b/lib/redux/company/company_reducer.dart @@ -131,8 +131,7 @@ UserCompanyEntity loadCompanySuccessReducer( userCompany = userCompany.rebuild((b) => b.company ..taskStatuses.replace([]) ..taskStatusMap.replace(BuiltMap()) - ..expenseCategories.replace([]) - ..expenseCategoryMap.replace(BuiltMap())); + ..expenseCategories.replace([])); /* @@ -173,7 +172,6 @@ UserCompanyEntity saveCompanySuccessReducer( ..taskStatuses.replace(userCompany.company.taskStatuses) ..taskStatusMap.replace(userCompany.company.taskStatusMap) ..expenseCategories.replace(userCompany.company.expenseCategories) - ..expenseCategoryMap.replace(userCompany.company.expenseCategoryMap) ..users.replace(userCompany.company.users)); userCompany = userCompany.rebuild((b) => b..company.replace(company)); diff --git a/lib/redux/expense/expense_actions.dart b/lib/redux/expense/expense_actions.dart index 6500975ae..389a09421 100644 --- a/lib/redux/expense/expense_actions.dart +++ b/lib/redux/expense/expense_actions.dart @@ -278,7 +278,7 @@ void handleExpenseAction( case EntityAction.newInvoice: final item = convertExpenseToInvoiceItem( expense: expense, - categoryMap: company.expenseCategoryMap, + categoryMap: state.expenseCategoryState.map, company: company); createEntity( context: context, diff --git a/lib/ui/expense/edit/expense_edit_details.dart b/lib/ui/expense/edit/expense_edit_details.dart index 7aa586749..c7c7b1049 100644 --- a/lib/ui/expense/edit/expense_edit_details.dart +++ b/lib/ui/expense/edit/expense_edit_details.dart @@ -162,7 +162,7 @@ class ExpenseEditDetailsState extends State { labelText: localization.category, entityId: expense.categoryId, entityList: memoizedDropdownExpenseCategoriesList( - company.expenseCategoryMap, company.expenseCategories), + state.expenseCategoryState.map, company.expenseCategories), onSelected: (category) { viewModel.onChanged( expense.rebuild((b) => b..categoryId = category?.id ?? '')); diff --git a/lib/ui/expense/expense_presenter.dart b/lib/ui/expense/expense_presenter.dart index 5b85ea782..e16a08a32 100644 --- a/lib/ui/expense/expense_presenter.dart +++ b/lib/ui/expense/expense_presenter.dart @@ -89,7 +89,7 @@ class ExpensePresenter extends EntityPresenter { ''); case ExpenseFields.expenseCategory: case ExpenseFields.expenseCategoryId: - return Text(state.company.expenseCategoryMap[expense.categoryId] + return Text(state.expenseCategoryState.map[expense.categoryId] ?.listDisplayName ?? ''); case ExpenseFields.paymentDate: diff --git a/lib/ui/expense/view/expense_view_overview.dart b/lib/ui/expense/view/expense_view_overview.dart index 85a3d8bad..6be853155 100644 --- a/lib/ui/expense/view/expense_view_overview.dart +++ b/lib/ui/expense/view/expense_view_overview.dart @@ -29,7 +29,8 @@ class ExpenseOverview extends StatelessWidget { final vendor = state.vendorState.map[expense.vendorId]; final client = state.clientState.map[expense.clientId]; final invoice = state.invoiceState.map[expense.invoiceId]; - final category = company.expenseCategoryMap[expense.categoryId]; + final project = state.projectState.map[expense.projectId]; + final category = state.expenseCategoryState.map[expense.categoryId]; final user = state.userState.get(expense.assignedUserId); final fields = { @@ -123,8 +124,10 @@ class ExpenseOverview extends StatelessWidget { ListDivider(), EntityListTile(entity: vendor, isFilter: isFilter), EntityListTile(entity: client, isFilter: isFilter), - EntityListTile(entity: invoice, isFilter: isFilter), + EntityListTile(entity: project, isFilter: isFilter), + EntityListTile(entity: category, isFilter: isFilter), EntityListTile(entity: user, isFilter: isFilter), + EntityListTile(entity: invoice, isFilter: isFilter), ..._buildDetailsList(), if ((expense.publicNotes ?? '').isNotEmpty) ...[ IconMessage(expense.publicNotes), diff --git a/lib/ui/invoice/edit/invoice_item_selector.dart b/lib/ui/invoice/edit/invoice_item_selector.dart index 664660382..a85ca2083 100644 --- a/lib/ui/invoice/edit/invoice_item_selector.dart +++ b/lib/ui/invoice/edit/invoice_item_selector.dart @@ -82,7 +82,7 @@ class _InvoiceItemSelectorState extends State final expense = entity as ExpenseEntity; items.add(convertExpenseToInvoiceItem( expense: expense, - categoryMap: company.expenseCategoryMap, + categoryMap: state.expenseCategoryState.map, company: company)); } });