Add optional setting to auto-fill a new invoice's item column #460

This commit is contained in:
Hillel Coren 2023-05-29 22:17:42 +03:00
parent 5c471ab16d
commit b679c3623c
2 changed files with 27 additions and 0 deletions

View File

@ -86,6 +86,7 @@ abstract class CompanyEntity extends Object
invoiceTaskProject: false,
invoiceTaskHours: false,
invoiceTaskItemDescription: true,
invoiceTaskProjectHeader: true,
isLarge: false,
enableShopApi: false,
convertProductExchangeRate: false,
@ -440,6 +441,9 @@ abstract class CompanyEntity extends Object
@BuiltValueField(wireName: 'invoice_task_item_description')
bool get invoiceTaskItemDescription;
@BuiltValueField(wireName: 'invoice_task_project_header')
bool get invoiceTaskProjectHeader;
@BuiltValueField(wireName: 'auto_start_tasks')
bool get autoStartTasks;
@ -765,6 +769,7 @@ abstract class CompanyEntity extends Object
..invoiceTaskHours = false
..invoiceTaskLock = false
..invoiceTaskItemDescription = true
..invoiceTaskProjectHeader = true
..matomoUrl = ''
..matomoId = ''
..convertPaymentCurrency = false

View File

@ -359,6 +359,9 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
'invoice_task_item_description',
serializers.serialize(object.invoiceTaskItemDescription,
specifiedType: const FullType(bool)),
'invoice_task_project_header',
serializers.serialize(object.invoiceTaskProjectHeader,
specifiedType: const FullType(bool)),
'auto_start_tasks',
serializers.serialize(object.autoStartTasks,
specifiedType: const FullType(bool)),
@ -902,6 +905,10 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
result.invoiceTaskItemDescription = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
case 'invoice_task_project_header':
result.invoiceTaskProjectHeader = 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;
@ -2041,6 +2048,8 @@ class _$CompanyEntity extends CompanyEntity {
@override
final bool invoiceTaskItemDescription;
@override
final bool invoiceTaskProjectHeader;
@override
final bool autoStartTasks;
@override
final bool showTasksTable;
@ -2181,6 +2190,7 @@ class _$CompanyEntity extends CompanyEntity {
this.invoiceTaskProject,
this.invoiceTaskHours,
this.invoiceTaskItemDescription,
this.invoiceTaskProjectHeader,
this.autoStartTasks,
this.showTasksTable,
this.showTaskEndDate,
@ -2380,6 +2390,8 @@ class _$CompanyEntity extends CompanyEntity {
invoiceTaskHours, r'CompanyEntity', 'invoiceTaskHours');
BuiltValueNullFieldError.checkNotNull(invoiceTaskItemDescription,
r'CompanyEntity', 'invoiceTaskItemDescription');
BuiltValueNullFieldError.checkNotNull(
invoiceTaskProjectHeader, r'CompanyEntity', 'invoiceTaskProjectHeader');
BuiltValueNullFieldError.checkNotNull(
autoStartTasks, r'CompanyEntity', 'autoStartTasks');
BuiltValueNullFieldError.checkNotNull(
@ -2517,6 +2529,7 @@ class _$CompanyEntity extends CompanyEntity {
invoiceTaskProject == other.invoiceTaskProject &&
invoiceTaskHours == other.invoiceTaskHours &&
invoiceTaskItemDescription == other.invoiceTaskItemDescription &&
invoiceTaskProjectHeader == other.invoiceTaskProjectHeader &&
autoStartTasks == other.autoStartTasks &&
showTasksTable == other.showTasksTable &&
showTaskEndDate == other.showTaskEndDate &&
@ -2640,6 +2653,7 @@ class _$CompanyEntity extends CompanyEntity {
_$hash = $jc(_$hash, invoiceTaskProject.hashCode);
_$hash = $jc(_$hash, invoiceTaskHours.hashCode);
_$hash = $jc(_$hash, invoiceTaskItemDescription.hashCode);
_$hash = $jc(_$hash, invoiceTaskProjectHeader.hashCode);
_$hash = $jc(_$hash, autoStartTasks.hashCode);
_$hash = $jc(_$hash, showTasksTable.hashCode);
_$hash = $jc(_$hash, showTaskEndDate.hashCode);
@ -2762,6 +2776,7 @@ class _$CompanyEntity extends CompanyEntity {
..add('invoiceTaskProject', invoiceTaskProject)
..add('invoiceTaskHours', invoiceTaskHours)
..add('invoiceTaskItemDescription', invoiceTaskItemDescription)
..add('invoiceTaskProjectHeader', invoiceTaskProjectHeader)
..add('autoStartTasks', autoStartTasks)
..add('showTasksTable', showTasksTable)
..add('showTaskEndDate', showTaskEndDate)
@ -3278,6 +3293,11 @@ class CompanyEntityBuilder
set invoiceTaskItemDescription(bool invoiceTaskItemDescription) =>
_$this._invoiceTaskItemDescription = invoiceTaskItemDescription;
bool _invoiceTaskProjectHeader;
bool get invoiceTaskProjectHeader => _$this._invoiceTaskProjectHeader;
set invoiceTaskProjectHeader(bool invoiceTaskProjectHeader) =>
_$this._invoiceTaskProjectHeader = invoiceTaskProjectHeader;
bool _autoStartTasks;
bool get autoStartTasks => _$this._autoStartTasks;
set autoStartTasks(bool autoStartTasks) =>
@ -3480,6 +3500,7 @@ class CompanyEntityBuilder
_invoiceTaskProject = $v.invoiceTaskProject;
_invoiceTaskHours = $v.invoiceTaskHours;
_invoiceTaskItemDescription = $v.invoiceTaskItemDescription;
_invoiceTaskProjectHeader = $v.invoiceTaskProjectHeader;
_autoStartTasks = $v.autoStartTasks;
_showTasksTable = $v.showTasksTable;
_showTaskEndDate = $v.showTaskEndDate;
@ -3633,6 +3654,7 @@ class CompanyEntityBuilder
invoiceTaskProject: BuiltValueNullFieldError.checkNotNull(invoiceTaskProject, r'CompanyEntity', 'invoiceTaskProject'),
invoiceTaskHours: BuiltValueNullFieldError.checkNotNull(invoiceTaskHours, r'CompanyEntity', 'invoiceTaskHours'),
invoiceTaskItemDescription: BuiltValueNullFieldError.checkNotNull(invoiceTaskItemDescription, r'CompanyEntity', 'invoiceTaskItemDescription'),
invoiceTaskProjectHeader: BuiltValueNullFieldError.checkNotNull(invoiceTaskProjectHeader, r'CompanyEntity', 'invoiceTaskProjectHeader'),
autoStartTasks: BuiltValueNullFieldError.checkNotNull(autoStartTasks, r'CompanyEntity', 'autoStartTasks'),
showTasksTable: BuiltValueNullFieldError.checkNotNull(showTasksTable, r'CompanyEntity', 'showTasksTable'),
showTaskEndDate: BuiltValueNullFieldError.checkNotNull(showTaskEndDate, r'CompanyEntity', 'showTaskEndDate'),