mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 20:22:15 +01:00
Prevent and remove zero values for billable rates
This commit is contained in:
committed by
Constantin Graf
parent
92dde6a701
commit
bd9cede081
@@ -107,7 +107,11 @@ abstract class DefaultImporter implements ImporterContract
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
]);
|
||||
], beforeSave: function (Project $project) {
|
||||
if ($project->billable_rate === 0) {
|
||||
$project->billable_rate = null;
|
||||
}
|
||||
});
|
||||
$this->projectMemberImportHelper = new ImportDatabaseHelper(ProjectMember::class, ['project_id', 'member_id'], true, function (Builder $builder) {
|
||||
/** @var Builder<ProjectMember> $builder */
|
||||
return $builder->whereBelongsToOrganization($this->organization);
|
||||
@@ -116,7 +120,11 @@ abstract class DefaultImporter implements ImporterContract
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
]);
|
||||
], beforeSave: function (ProjectMember $projectMember) {
|
||||
if ($projectMember->billable_rate === 0) {
|
||||
$projectMember->billable_rate = null;
|
||||
}
|
||||
});
|
||||
$this->tagImportHelper = new ImportDatabaseHelper(Tag::class, ['name', 'organization_id'], true, function (Builder $builder) {
|
||||
return $builder->where('organization_id', $this->organization->id);
|
||||
}, validate: [
|
||||
|
||||
Reference in New Issue
Block a user