Features: - Implement two fee types: entrance fee and annual fee (both NT$1,000) - Add 50% discount for disability certificate holders - Add disability certificate upload in member profile - Integrate disability verification into cashier approval workflow - Add membership fee settings in system admin Document permissions: - Fix hard-coded role logic in Document model - Use permission-based authorization instead of role checks Additional features: - Add announcements, general ledger, and trial balance modules - Add income management and accounting entries - Add comprehensive test suite with factories - Update UI translations to Traditional Chinese 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
1016 B
PHP
33 lines
1016 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\BankReconciliation;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class BankReconciliationFactory extends Factory
|
|
{
|
|
protected $model = BankReconciliation::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
$bankBalance = $this->faker->numberBetween(50000, 500000);
|
|
$bookBalance = $bankBalance + $this->faker->numberBetween(-5000, 5000);
|
|
|
|
return [
|
|
'reconciliation_month' => now()->startOfMonth(),
|
|
'bank_statement_date' => now(),
|
|
'bank_statement_balance' => $bankBalance,
|
|
'system_book_balance' => $bookBalance,
|
|
'outstanding_checks' => [],
|
|
'deposits_in_transit' => [],
|
|
'bank_charges' => [],
|
|
'prepared_by_cashier_id' => User::factory(),
|
|
'prepared_at' => now(),
|
|
'reconciliation_status' => 'pending',
|
|
'discrepancy_amount' => abs($bankBalance - $bookBalance),
|
|
];
|
|
}
|
|
}
|