dstpabuaran.com/database/factories/PayrollAdjustmentFactory.php
Yoga Pangestu 6dbe9da581 feat: add payroll management features including payroll periods, adjustments, and payment processing
- Implemented routes for managing payroll periods, including current, close, and reopen functionalities.
- Added payroll payment and cancellation routes.
- Introduced payroll adjustments with store and delete functionalities.
- Created comprehensive feature tests for payroll management, covering authentication, CRUD operations, and business logic.
- Ensured proper handling of payroll adjustments and their impact on payroll totals.
- Developed tests for generating payrolls and managing payroll periods, ensuring accurate status transitions and data integrity.
2026-07-30 17:06:52 +07:00

24 lines
624 B
PHP

<?php
namespace Database\Factories;
use App\Models\Attendance;
use App\Models\Payroll;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class PayrollAdjustmentFactory extends Factory
{
public function definition(): array
{
return [
'payroll_id' => Payroll::factory(),
'attendance_id' => Attendance::factory(),
'created_by_id' => User::factory(),
'type' => fake()->randomElement(['bonus', 'deduction']),
'amount' => fake()->numberBetween(10000, 500000),
'description' => fake()->sentence(),
];
}
}