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

View File

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