total fee updates when a case fee is deleted

This commit is contained in:
2022-04-21 12:15:00 +01:00
parent 02715bdc44
commit 92bce34fb1
2 changed files with 7 additions and 1 deletions

View File

@ -227,6 +227,11 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface
$this->save();
}
public function subtractFromTotalFee(string $amountToSubtract): void {
$this->set('total_fee', $this->total_fee->value - $amountToSubtract);
$this->save();
}
/**
* {@inheritdoc}
*/