Add notify_vendor_when_paid option
This commit is contained in:
parent
e338970131
commit
b87ccffca4
|
|
@ -120,6 +120,7 @@ abstract class CompanyEntity extends Object
|
||||||
invoiceTaskLock: false,
|
invoiceTaskLock: false,
|
||||||
convertPaymentCurrency: false,
|
convertPaymentCurrency: false,
|
||||||
convertExpenseCurrency: false,
|
convertExpenseCurrency: false,
|
||||||
|
notifyVendorWhenPaid: false,
|
||||||
groups: BuiltList<GroupEntity>(),
|
groups: BuiltList<GroupEntity>(),
|
||||||
taxRates: BuiltList<TaxRateEntity>(),
|
taxRates: BuiltList<TaxRateEntity>(),
|
||||||
taskStatuses: BuiltList<TaskStatusEntity>(),
|
taskStatuses: BuiltList<TaskStatusEntity>(),
|
||||||
|
|
@ -304,6 +305,9 @@ abstract class CompanyEntity extends Object
|
||||||
@BuiltValueField(wireName: 'convert_expense_currency')
|
@BuiltValueField(wireName: 'convert_expense_currency')
|
||||||
bool get convertExpenseCurrency;
|
bool get convertExpenseCurrency;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: 'notify_vendor_when_paid')
|
||||||
|
bool get notifyVendorWhenPaid;
|
||||||
|
|
||||||
BuiltList<GroupEntity> get groups;
|
BuiltList<GroupEntity> get groups;
|
||||||
|
|
||||||
BuiltList<ActivityEntity> get activities;
|
BuiltList<ActivityEntity> get activities;
|
||||||
|
|
@ -716,6 +720,7 @@ abstract class CompanyEntity extends Object
|
||||||
..matomoId = ''
|
..matomoId = ''
|
||||||
..convertPaymentCurrency = false
|
..convertPaymentCurrency = false
|
||||||
..convertExpenseCurrency = false
|
..convertExpenseCurrency = false
|
||||||
|
..notifyVendorWhenPaid = false
|
||||||
..systemLogs.replace(BuiltList<SystemLogEntity>())
|
..systemLogs.replace(BuiltList<SystemLogEntity>())
|
||||||
..subscriptions.replace(BuiltList<SubscriptionEntity>())
|
..subscriptions.replace(BuiltList<SubscriptionEntity>())
|
||||||
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,9 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
'convert_expense_currency',
|
'convert_expense_currency',
|
||||||
serializers.serialize(object.convertExpenseCurrency,
|
serializers.serialize(object.convertExpenseCurrency,
|
||||||
specifiedType: const FullType(bool)),
|
specifiedType: const FullType(bool)),
|
||||||
|
'notify_vendor_when_paid',
|
||||||
|
serializers.serialize(object.notifyVendorWhenPaid,
|
||||||
|
specifiedType: const FullType(bool)),
|
||||||
'groups',
|
'groups',
|
||||||
serializers.serialize(object.groups,
|
serializers.serialize(object.groups,
|
||||||
specifiedType:
|
specifiedType:
|
||||||
|
|
@ -608,6 +611,10 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
result.convertExpenseCurrency = serializers.deserialize(value,
|
result.convertExpenseCurrency = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(bool)) as bool;
|
specifiedType: const FullType(bool)) as bool;
|
||||||
break;
|
break;
|
||||||
|
case 'notify_vendor_when_paid':
|
||||||
|
result.notifyVendorWhenPaid = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(bool)) as bool;
|
||||||
|
break;
|
||||||
case 'groups':
|
case 'groups':
|
||||||
result.groups.replace(serializers.deserialize(value,
|
result.groups.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(
|
specifiedType: const FullType(
|
||||||
|
|
@ -1679,6 +1686,8 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
@override
|
@override
|
||||||
final bool convertExpenseCurrency;
|
final bool convertExpenseCurrency;
|
||||||
@override
|
@override
|
||||||
|
final bool notifyVendorWhenPaid;
|
||||||
|
@override
|
||||||
final BuiltList<GroupEntity> groups;
|
final BuiltList<GroupEntity> groups;
|
||||||
@override
|
@override
|
||||||
final BuiltList<ActivityEntity> activities;
|
final BuiltList<ActivityEntity> activities;
|
||||||
|
|
@ -1849,6 +1858,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
this.invoiceTaskLock,
|
this.invoiceTaskLock,
|
||||||
this.convertPaymentCurrency,
|
this.convertPaymentCurrency,
|
||||||
this.convertExpenseCurrency,
|
this.convertExpenseCurrency,
|
||||||
|
this.notifyVendorWhenPaid,
|
||||||
this.groups,
|
this.groups,
|
||||||
this.activities,
|
this.activities,
|
||||||
this.taxRates,
|
this.taxRates,
|
||||||
|
|
@ -2000,6 +2010,8 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
convertPaymentCurrency, 'CompanyEntity', 'convertPaymentCurrency');
|
convertPaymentCurrency, 'CompanyEntity', 'convertPaymentCurrency');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
convertExpenseCurrency, 'CompanyEntity', 'convertExpenseCurrency');
|
convertExpenseCurrency, 'CompanyEntity', 'convertExpenseCurrency');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
notifyVendorWhenPaid, 'CompanyEntity', 'notifyVendorWhenPaid');
|
||||||
BuiltValueNullFieldError.checkNotNull(groups, 'CompanyEntity', 'groups');
|
BuiltValueNullFieldError.checkNotNull(groups, 'CompanyEntity', 'groups');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
activities, 'CompanyEntity', 'activities');
|
activities, 'CompanyEntity', 'activities');
|
||||||
|
|
@ -2159,6 +2171,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
invoiceTaskLock == other.invoiceTaskLock &&
|
invoiceTaskLock == other.invoiceTaskLock &&
|
||||||
convertPaymentCurrency == other.convertPaymentCurrency &&
|
convertPaymentCurrency == other.convertPaymentCurrency &&
|
||||||
convertExpenseCurrency == other.convertExpenseCurrency &&
|
convertExpenseCurrency == other.convertExpenseCurrency &&
|
||||||
|
notifyVendorWhenPaid == other.notifyVendorWhenPaid &&
|
||||||
groups == other.groups &&
|
groups == other.groups &&
|
||||||
activities == other.activities &&
|
activities == other.activities &&
|
||||||
taxRates == other.taxRates &&
|
taxRates == other.taxRates &&
|
||||||
|
|
@ -2242,7 +2255,7 @@ 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($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), convertRateToClient.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), enableProductDiscount.hashCode), defaultTaskIsDateBased.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), isDisabled.hashCode), enableShopApi.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), numberOfExpenseTaxRates.hashCode), expenseInclusiveTaxes.hashCode), sessionTimeout.hashCode), passwordTimeout.hashCode), oauthPasswordRequired.hashCode), markdownEnabled.hashCode), markdownEmailEnabled.hashCode), useCommaAsDecimalPlace.hashCode), reportIncludeDrafts.hashCode), reportIncludeDeleted.hashCode), useQuoteTermsOnConversion.hashCode), enableApplyingPayments.hashCode), trackInventory.hashCode), stockNotificationThreshold.hashCode), stockNotification.hashCode), invoiceTaskLock.hashCode), convertPaymentCurrency.hashCode), convertExpenseCurrency.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), recurringExpenses.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), purchaseOrders.hashCode), bankAccounts.hashCode), transactions.hashCode), transactionRules.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), documents.hashCode), tokens.hashCode), webhooks.hashCode), subscriptions.hashCode), paymentTerms.hashCode), systemLogs.hashCode), clientRegistrationFields.hashCode), customFields.hashCode), slackWebhookUrl.hashCode), googleAnalyticsKey.hashCode), matomoUrl.hashCode), matomoId.hashCode), markExpensesInvoiceable.hashCode), markExpensesPaid.hashCode), invoiceExpenseDocuments.hashCode), invoiceTaskDocuments.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($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), convertRateToClient.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), enableProductDiscount.hashCode), defaultTaskIsDateBased.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), isDisabled.hashCode), enableShopApi.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), numberOfExpenseTaxRates.hashCode), expenseInclusiveTaxes.hashCode), sessionTimeout.hashCode), passwordTimeout.hashCode), oauthPasswordRequired.hashCode), markdownEnabled.hashCode), markdownEmailEnabled.hashCode), useCommaAsDecimalPlace.hashCode), reportIncludeDrafts.hashCode), reportIncludeDeleted.hashCode), useQuoteTermsOnConversion.hashCode), enableApplyingPayments.hashCode), trackInventory.hashCode), stockNotificationThreshold.hashCode), stockNotification.hashCode), invoiceTaskLock.hashCode), convertPaymentCurrency.hashCode), convertExpenseCurrency.hashCode), notifyVendorWhenPaid.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), recurringExpenses.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), purchaseOrders.hashCode), bankAccounts.hashCode), transactions.hashCode), transactionRules.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), documents.hashCode), tokens.hashCode), webhooks.hashCode), subscriptions.hashCode), paymentTerms.hashCode), systemLogs.hashCode), clientRegistrationFields.hashCode), customFields.hashCode), slackWebhookUrl.hashCode), googleAnalyticsKey.hashCode), matomoUrl.hashCode), matomoId.hashCode), markExpensesInvoiceable.hashCode), markExpensesPaid.hashCode), invoiceExpenseDocuments.hashCode), invoiceTaskDocuments.hashCode),
|
||||||
invoiceTaskTimelog.hashCode),
|
invoiceTaskTimelog.hashCode),
|
||||||
invoiceTaskDatelog.hashCode),
|
invoiceTaskDatelog.hashCode),
|
||||||
invoiceTaskProject.hashCode),
|
invoiceTaskProject.hashCode),
|
||||||
|
|
@ -2313,6 +2326,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
..add('invoiceTaskLock', invoiceTaskLock)
|
..add('invoiceTaskLock', invoiceTaskLock)
|
||||||
..add('convertPaymentCurrency', convertPaymentCurrency)
|
..add('convertPaymentCurrency', convertPaymentCurrency)
|
||||||
..add('convertExpenseCurrency', convertExpenseCurrency)
|
..add('convertExpenseCurrency', convertExpenseCurrency)
|
||||||
|
..add('notifyVendorWhenPaid', notifyVendorWhenPaid)
|
||||||
..add('groups', groups)
|
..add('groups', groups)
|
||||||
..add('activities', activities)
|
..add('activities', activities)
|
||||||
..add('taxRates', taxRates)
|
..add('taxRates', taxRates)
|
||||||
|
|
@ -2602,6 +2616,11 @@ class CompanyEntityBuilder
|
||||||
set convertExpenseCurrency(bool convertExpenseCurrency) =>
|
set convertExpenseCurrency(bool convertExpenseCurrency) =>
|
||||||
_$this._convertExpenseCurrency = convertExpenseCurrency;
|
_$this._convertExpenseCurrency = convertExpenseCurrency;
|
||||||
|
|
||||||
|
bool _notifyVendorWhenPaid;
|
||||||
|
bool get notifyVendorWhenPaid => _$this._notifyVendorWhenPaid;
|
||||||
|
set notifyVendorWhenPaid(bool notifyVendorWhenPaid) =>
|
||||||
|
_$this._notifyVendorWhenPaid = notifyVendorWhenPaid;
|
||||||
|
|
||||||
ListBuilder<GroupEntity> _groups;
|
ListBuilder<GroupEntity> _groups;
|
||||||
ListBuilder<GroupEntity> get groups =>
|
ListBuilder<GroupEntity> get groups =>
|
||||||
_$this._groups ??= new ListBuilder<GroupEntity>();
|
_$this._groups ??= new ListBuilder<GroupEntity>();
|
||||||
|
|
@ -2972,6 +2991,7 @@ class CompanyEntityBuilder
|
||||||
_invoiceTaskLock = $v.invoiceTaskLock;
|
_invoiceTaskLock = $v.invoiceTaskLock;
|
||||||
_convertPaymentCurrency = $v.convertPaymentCurrency;
|
_convertPaymentCurrency = $v.convertPaymentCurrency;
|
||||||
_convertExpenseCurrency = $v.convertExpenseCurrency;
|
_convertExpenseCurrency = $v.convertExpenseCurrency;
|
||||||
|
_notifyVendorWhenPaid = $v.notifyVendorWhenPaid;
|
||||||
_groups = $v.groups.toBuilder();
|
_groups = $v.groups.toBuilder();
|
||||||
_activities = $v.activities.toBuilder();
|
_activities = $v.activities.toBuilder();
|
||||||
_taxRates = $v.taxRates.toBuilder();
|
_taxRates = $v.taxRates.toBuilder();
|
||||||
|
|
@ -3114,6 +3134,7 @@ class CompanyEntityBuilder
|
||||||
invoiceTaskLock: BuiltValueNullFieldError.checkNotNull(invoiceTaskLock, 'CompanyEntity', 'invoiceTaskLock'),
|
invoiceTaskLock: BuiltValueNullFieldError.checkNotNull(invoiceTaskLock, 'CompanyEntity', 'invoiceTaskLock'),
|
||||||
convertPaymentCurrency: BuiltValueNullFieldError.checkNotNull(convertPaymentCurrency, 'CompanyEntity', 'convertPaymentCurrency'),
|
convertPaymentCurrency: BuiltValueNullFieldError.checkNotNull(convertPaymentCurrency, 'CompanyEntity', 'convertPaymentCurrency'),
|
||||||
convertExpenseCurrency: BuiltValueNullFieldError.checkNotNull(convertExpenseCurrency, 'CompanyEntity', 'convertExpenseCurrency'),
|
convertExpenseCurrency: BuiltValueNullFieldError.checkNotNull(convertExpenseCurrency, 'CompanyEntity', 'convertExpenseCurrency'),
|
||||||
|
notifyVendorWhenPaid: BuiltValueNullFieldError.checkNotNull(notifyVendorWhenPaid, 'CompanyEntity', 'notifyVendorWhenPaid'),
|
||||||
groups: groups.build(),
|
groups: groups.build(),
|
||||||
activities: activities.build(),
|
activities: activities.build(),
|
||||||
taxRates: taxRates.build(),
|
taxRates: taxRates.build(),
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,16 @@ class _ExpenseSettingsState extends State<ExpenseSettings> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
FormCard(children: <Widget>[
|
||||||
|
SwitchListTile(
|
||||||
|
activeColor: Theme.of(context).colorScheme.secondary,
|
||||||
|
title: Text(localization.notifyVendorWhenPaid),
|
||||||
|
value: company.notifyVendorWhenPaid ?? false,
|
||||||
|
subtitle: Text(localization.notifyVendorWhenPaidHelp),
|
||||||
|
onChanged: (value) => viewModel.onCompanyChanged(
|
||||||
|
company.rebuild((b) => b..notifyVendorWhenPaid = value)),
|
||||||
|
),
|
||||||
|
]),
|
||||||
if (company.numberOfItemTaxRates > 0)
|
if (company.numberOfItemTaxRates > 0)
|
||||||
FormCard(
|
FormCard(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@ class SettingsSearch extends StatelessWidget {
|
||||||
'auto_start_tasks',
|
'auto_start_tasks',
|
||||||
'show_tasks_table',
|
'show_tasks_table',
|
||||||
'client_portal',
|
'client_portal',
|
||||||
'lock_tasks',
|
'lock_invoiced_tasks',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
kSettingsTaskStatuses: [
|
kSettingsTaskStatuses: [
|
||||||
|
|
@ -431,6 +431,8 @@ class SettingsSearch extends StatelessWidget {
|
||||||
'should_be_invoiced',
|
'should_be_invoiced',
|
||||||
'mark_paid',
|
'mark_paid',
|
||||||
'inclusive_taxes',
|
'inclusive_taxes',
|
||||||
|
'convert_currency',
|
||||||
|
'notify_vendor_when_paid',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
kSettingsExpenseCategories: [
|
kSettingsExpenseCategories: [
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
|
'notify_vendor_when_paid': 'Notify Vendor When Paid',
|
||||||
|
'notify_vendor_when_paid_help':
|
||||||
|
'Send an email to the vendor when the expense is marked as paid',
|
||||||
'update_payment': 'Update Payment',
|
'update_payment': 'Update Payment',
|
||||||
'markup': 'Markup',
|
'markup': 'Markup',
|
||||||
'purchase_order_created': 'Purchase Order Created',
|
'purchase_order_created': 'Purchase Order Created',
|
||||||
|
|
@ -92933,6 +92936,14 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues[localeCode]['update_payment'] ??
|
_localizedValues[localeCode]['update_payment'] ??
|
||||||
_localizedValues['en']['update_payment'];
|
_localizedValues['en']['update_payment'];
|
||||||
|
|
||||||
|
String get notifyVendorWhenPaid =>
|
||||||
|
_localizedValues[localeCode]['notify_vendor_when_paid'] ??
|
||||||
|
_localizedValues['en']['notify_vendor_when_paid'];
|
||||||
|
|
||||||
|
String get notifyVendorWhenPaidHelp =>
|
||||||
|
_localizedValues[localeCode]['notify_vendor_when_paid_help'] ??
|
||||||
|
_localizedValues['en']['notify_vendor_when_paid_help'];
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
|
||||||
String lookup(String key) {
|
String lookup(String key) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue