dstpabuaran.com/app/Enums/CashTransactionType.php

30 lines
682 B
PHP

<?php
namespace App\Enums;
use App\Enums\Concerns\HasValues;
enum CashTransactionType: string
{
use HasValues;
case DEPOSIT = 'deposit';
case EXPENSE = 'expense';
case TRANSACTION = 'transaction';
case WITHDRAWAL = 'withdrawal';
case EMPLOYEE_ADVANCE = 'employee_advance';
case SALARY = 'salary';
public function label(): string
{
return match ($this) {
self::DEPOSIT => 'Deposit',
self::EXPENSE => 'Pengeluaran',
self::TRANSACTION => 'Transaksi',
self::WITHDRAWAL => 'Withdrawal',
self::EMPLOYEE_ADVANCE => 'Kasbon',
self::SALARY => 'Gaji',
};
}
}