Clarify activity for recurring invoices/expenses
This commit is contained in:
parent
4bafdfd807
commit
84f7031652
|
|
@ -907,7 +907,8 @@ abstract class ActivityEntity
|
|||
|
||||
String getDescription(
|
||||
String activity,
|
||||
String systemString, {
|
||||
String systemString,
|
||||
String recurringString, {
|
||||
UserEntity user,
|
||||
ClientEntity client,
|
||||
InvoiceEntity invoice,
|
||||
|
|
@ -932,8 +933,18 @@ abstract class ActivityEntity
|
|||
vendorContact = vendor.getContact(vendorContactId);
|
||||
}
|
||||
|
||||
if ((recurringInvoice?.isOld ?? false) && (invoice?.isOld ?? false)) {
|
||||
activity = activity.replaceFirst(
|
||||
':user', '$recurringString ${recurringInvoice.number}');
|
||||
} else if ((recurringExpense?.isOld ?? false) &&
|
||||
(expense?.isOld ?? false)) {
|
||||
activity = activity.replaceFirst(
|
||||
':user', '$recurringString ${recurringExpense.number}');
|
||||
} else {
|
||||
activity =
|
||||
activity.replaceFirst(':user', user?.listDisplayName ?? systemString);
|
||||
}
|
||||
|
||||
activity = activity.replaceFirst(':client', client?.displayName ?? '');
|
||||
activity = activity.replaceFirst(':invoice', invoice?.number ?? '');
|
||||
activity = activity.replaceFirst(
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class ActivityListTile extends StatelessWidget {
|
|||
title = activity.getDescription(
|
||||
title,
|
||||
localization.system,
|
||||
localization.recurring,
|
||||
user: user,
|
||||
client: client,
|
||||
invoice: invoice,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _localizedValues = {
|
||||
'en': {
|
||||
// STARTER: lang key - do not remove comment
|
||||
'recurring': 'Recurring',
|
||||
'ziptax_help':
|
||||
'Note: this feature requires a Zip-Tax API key to lookup US sales tax by address',
|
||||
'cache_data': 'Cache Data',
|
||||
|
|
@ -109443,6 +109444,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
_localizedValues[localeCode]['ziptax_help'] ??
|
||||
_localizedValues['en']['ziptax_help'];
|
||||
|
||||
String get recurring =>
|
||||
_localizedValues[localeCode]['recurring'] ??
|
||||
_localizedValues['en']['recurring'];
|
||||
|
||||
// STARTER: lang field - do not remove comment
|
||||
|
||||
String lookup(String key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue