dakataa/nra-audit
最新稳定版本:v1.0.0
Composer 安装命令:
composer require dakataa/nra-audit
包简介
Bulgarian National Revenue Agency Audit File Generator (Alternative reporting)
README 文档
README
If you have Online Store and you use alternative reporting mode, this package helps you to generate an Audit File used by Bulgarian National Revenue Agency to collect data for your monthly sales.
--
НАП (Национална агенция за приходите) Алтернативен режим за регистриране и отчитане на продажбите. Ако онлайн магазин е под алтернативен режим за регистриране и отчитане на продажбите пред НАП, то този пакет ще ви помогне да генерирате нужния аудиторски файл.
--
More info: https://nra.bg/wps/portal/nra/uslugi/podavane-na-standartiziran-oditorski-fail https://nra.bg/wps/portal/nra/fiskalni-ustroystva-supto-i-e-magazini/page.turgovia-v-internet-i-e-magazini/page.lternativen-rejim-za-registrirane-i-otchitane-na-prodajbite
To get started, install the bundle:
composer require dakataa/nra-audit
Setup
Create Order Repository
You have to implements NraOrderRepositoryInterface
Example:
<?php namespace App\Repository; use Dakataa\NraAudit\Model\NraOrder; use Dakataa\NraAudit\Model\NraOrderArticle; use Dakataa\NraAudit\Repository\NraOrderRepositoryInterface; class NraOrderRepository implements NraOrderRepositoryInterface { public function getOrderByNumber(int|string $number): ?NraOrderInterface { // ... your implementation return new NraOrder( ... ); } public function getOrdersByShop(NraShopInterface $shop, int $year = null, int $month = null): Generator { // Find orders depend on arguments // ... foreach ($orders as $order) { yield new NraOrder( number: $order->id, date: $order->payedAt, document: $order->receiptNumber, paymentMethod: PaymentMethodEnum::VPOS, amount: $order->amountWithoutVat, vatAmount: $order->amountVat, discountAmount: $order->discountAmount articles: [ new NraOrderArticle( name: 'Product 1', amount: '8.99', quantity: 1, vatRate: 20 ), new NraOrderArticle( name: 'Product 2', amount: '8.99', quantity: 1, vatRate: 20 ), ], // VPOS Terminal Number virtualPOSNumber: $order->virualPOSTerminalId, transactionNumber: $order->virualPOSTransactionNumber, // Bulstat or VAT Number processorId: $order->processorEIKorVATNumber ); } } }
Generate Audit Report
Example:
use App\Repository\NraOrderRepository; use Dakataa\NraAudit\Model\NraShop; use Dakataa\NraAudit\NraAuditGenerator; // .... $shop = new NraShop( type: ShopTypeEnum::Own, // NRA - Website registration number number: 'RF0015001', name: 'Фирма ЕООД', address: 'ул. Адрес №1', eik: '130107280', mol: 'Иван Иванов Иванов', domain: 'www.example.com', email: 'info@example.com', phone: '+359 888 8888 8888' ); $repository = new NraOrderRepository; $generator = new NraAuditGenerator($repository) $document = $generator->generate($shop, 2025, 10); $document->save('nra-audit.xml');
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-06