Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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. }