version 8.0-3.0 - update required

Added amount field to case fee, total fee to case, and code to calculate the total
This commit is contained in:
2021-11-12 09:11:00 +00:00
parent 3eba291d5a
commit 04d6525d6c
3 changed files with 68 additions and 0 deletions

View File

@ -72,3 +72,15 @@ function opencase_cases_update_8029() {
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('notes', 'oc_case', 'oc_case', $storage_definition);
}
function opencase_cases_update_8030() {
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('decimal')
->setLabel(t('Total Fee'))
->setRevisionable(TRUE)
->setSettings([
'prefix' => '£',
])
->SetDisplayConfigurable("view", true);
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('total_fee', 'oc_case', 'oc_case', $storage_definition);
}