=== فحص قاعدة البيانات === عدد القيود المحاسبية: 3732 عدد سطور القيود: 13656 عدد الحسابات النشطة: 40 عدد الحسابات النشطة بدون أطفال: 19 === آخر 5 قيود محاسبية ===
The attribute [entry_type] either does not exist or was not retrieved for model [App\Models\Accounting\JournalEntry].
Illuminate\Database\Eloquent\Model->throwMissingAttributeExceptionIfApplicable(string)Illuminate\Database\Eloquent\Model->throwMissingAttributeExceptionIfApplicable(string)Illuminate\Database\Eloquent\Model->getAttribute(string)Illuminate\Database\Eloquent\Model->__get(string)2930// أمثلة على القيود31echo "=== آخر 5 قيود محاسبية ===\n";32$entries = JournalEntry::latest()->take(5)->get();33foreach ($entries as $entry) {34 echo "القيد رقم: {$entry->entry_number}, التاريخ: {$entry->entry_date}, النوع: {$entry->entry_type}\n";35}3637echo "\n=== فحص دالة ميزان المراجعة ===\n";38$service = new App\Services\Accounting\Reports\TrialBalanceReport();39$result = $service->generate(null, now()->format('Y-m-d'));4041echo "عدد الحسابات في التقرير: " . count($result['accounts']) . "\n";42echo "إجمالي المدين: " . $result['total_debits'] . "\n";43echo "إجمالي الدائن: " . $result['total_credits'] . "\n";44echo "الفرق: " . $result['difference'] . "\n\n";4546select `company_name`, `site_name` from `general_settings` where 1 = 0 limit 1select count(*) as aggregate from `journal_entries` where `journal_entries`.`deleted_at` is nullselect count(*) as aggregate from `journal_entry_lines`select count(*) as aggregate from `chart_of_accounts` where `is_active` = 1 and `chart_of_accounts`.`deleted_at` is nullselect count(*) as aggregate from `chart_of_accounts` where `is_active` = 1 and not exists (select * from `chart_of_accounts` as `laravel_reserved_0` where `chart_of_accounts`.`id` = `laravel_reserved_0`.`parent_id` and `laravel_reserved_0`.`deleted_at` is null) and `chart_of_accounts`.`deleted_at` is nullselect * from `journal_entries` where `journal_entries`.`deleted_at` is null order by `created_at` desc limit 5