Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

AdjustmentComputation.php 533B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Enums\Accounting;
  3. use App\Enums\Concerns\ParsesEnum;
  4. use Filament\Support\Contracts\HasLabel;
  5. enum AdjustmentComputation: string implements HasLabel
  6. {
  7. use ParsesEnum;
  8. case Percentage = 'percentage';
  9. case Fixed = 'fixed';
  10. public function getLabel(): ?string
  11. {
  12. return translate($this->name);
  13. }
  14. public function isPercentage(): bool
  15. {
  16. return $this == self::Percentage;
  17. }
  18. public function isFixed(): bool
  19. {
  20. return $this == self::Fixed;
  21. }
  22. }