| Package Data | |
|---|---|
| Maintainer Username: | miladghorbani1999 |
| Maintainer Contact: | bavan@example.com (Bavan) |
| Package Create Date: | 2025-11-15 |
| Package Last Update: | 2025-12-15 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-12-29 15:00:04 |
| Package Statistics | |
|---|---|
| Total Downloads: | 7 |
| Monthly Downloads: | 7 |
| Daily Downloads: | 2 |
| Total Stars: | 0 |
| Total Watchers: | 0 |
| Total Forks: | 0 |
| Total Open Issues: | 2 |
✔ پشتیبانی چندشرکتی (Entity)
✔ حسابداری دفتردوبل کامل
✔ حسابهای چندارزی + تفاوت نرخ ارز
✔ محافظت در برابر تغییرات مستقیم DB
✔ VAT ورودی، خروجی، ترکیبی
✔ گزارشهای کامل IFRS شامل:
✔ زمانبندی بدهکار/بستانکار (Aging)
✔ ثبتهای نقدی و اعتباری برای فروش/خرید
✔ گزارش Account Statement و Account Schedule
composer require "bavan/eloquent-ifrs"
php artisan migrate
$app->register(IFRS\IFRSServiceProvider::class);
انتشار فایل config:
php artisan vendor:publish --provider="IFRS\IFRSServiceProvider"
این فایل ایجاد میشود:
config/ifrs.php
user_model → مدل User پروژهlocales → زبانهاforex_scale → دقت نرخ ارزsingle_currency → حسابهای محدود به یک ارزaging_schedule_brackets → بازههای زمانی بدهکار/بستانکارuse IFRS\Traits\IFRSUser;
use IFRS\Traits\Recycling;
class User extends Authenticatable
{
use IFRSUser, Recycling;
}
$entity = Entity::create(['name' => 'شرکت نمونه']);
$currency = Currency::create([
'name' => 'Euro',
'currency_code' => 'EUR'
]);
$entity->currency_id = $currency->id;
$entity->save();
$outputVat = Vat::create([
'name' => "Standard Output Vat",
'code' => "O",
'rate' => 20,
'account_id' => Account::create([
'name' => "Sales VAT Account",
'account_type' => Account::CONTROL,
])
]);
$bank = Account::create([
'name' => "Bank Account",
'account_type' => Account::BANK,
]);
$revenue = Account::create([
'name' => "Sales Revenue",
'account_type' => Account::OPERATING_REVENUE,
]);
$period = ReportingPeriod::create([
'period_count' => 1,
'calendar_year' => 2024,
]);
$cashSale = CashSale::create([
'account_id' => $bank->id,
'date' => now(),
'narration' => "Example Cash Sale",
]);
$item = LineItem::create([
'account_id' => $revenue->id,
'narration' => "Sale Item",
'quantity' => 1,
'amount' => 100,
]);
$item->addVat($outputVat);
$cashSale->addLineItem($item);
$cashSale->post(); // ثبت در دفتر کل
$clientInvoice = ClientInvoice::create([...]);
$cashPurchase = CashPurchase::create([...]);
$supplierBill = SupplierBill::create([...]);
$clientReceipt = ClientReceipt::create([...]);
Assignment::create([
'assignment_date'=> now(),
'transaction_id' => $clientReceipt->id,
'cleared_id' => $clientInvoice->id,
'cleared_type'=> $clientInvoice->clearedType,
'amount' => 50,
]);
$income = new IncomeStatement("2021-01-01","2021-12-31");
echo $income->toString();
$bs = new BalanceSheet("2021-12-31");
echo $bs->toString();
$cf = new CashFlowStatement("2021-12-31");
$statement = new AccountStatement($clientAccount)->getTransactions();
$schedule = new AccountSchedule($clientAccount, $currency)->getTransactions();
انتشار تحت مجوز MIT.
legers:
post_account = حسابی که خودش Debit یا Credit میشود.
folio_account = حساب طرف مقابل.
entry_type = نوع بدهکار یا بستانکار بودن.
line_item_id = اگر برای آیتم خاص است، اینجاست؛ بانک همیشه null.
amount = مبلغ واقعی ثبتشده.
rate = نرخ ارز.
transaction_id = به کدام ClientReceipt/Invoice/Bill تعلق دارد.
post_account = حسابی که در همان Ledger در نقش D یا C قرار دارد
در پرداخت:
Ledger بانک → post_account = bank
Ledger آیتم → post_account = service/patientShare/etc
✔ folio_account = حساب طرف مقابل در همان ثبت دوبل
در پرداخت:
Ledger بانک → folio_account = account of first LineItem
Ledger آیتم → folio_account = bank