ameax/datev-xml

生成 DATEV xml 文件的包

资助包维护!
ameax

1.3.0 2024-06-06 05:18 UTC

This package is auto-updated.

Last update: 2024-09-08 15:59:17 UTC


README

Latest Version on Packagist Tests Total Downloads

这里应该是你的描述。尽量限制为一两段,考虑添加一个小的例子。

安装

你可以通过 composer 安装此包

composer require ameax/datev-xml

用法

    use Ameax\Datev\DataObjects\DatevAccountLedgerData;
    use Ameax\Datev\DataObjects\DatevDocumentData;
    use Ameax\Datev\DataObjects\DatevRepositoryData;
    use Ameax\Datev\Zip;
    use Carbon\Carbon;

    $datevDocumentData = new DatevDocumentData();

    $ledgerData = new DatevAccountLedgerData(
        consolidatedDate: new Carbon('2023-06-14'),
        consolidatedDeliveryDate: new Carbon('2023-06-14'),
        consolidatedInvoiceId: 'RE12345',
        customerName: 'ARANES',
        customerCity: 'Aufhausen',
        shipFromCountry: 'DE',
        accountName: 'ARANES Aufhausen',
        dueDate: new Carbon('2023-07-01'),
        bpAccountNo: '12345'
    );
    $ledgerData->addAccountsReceivableLedger(
        amount: 119.00,
        accountNo: '8400',
        information: 'Software',
        bookingText: 'Umsatz 19%'
    );
    $ledgerData->addAccountsReceivableLedger(
        amount: 214.00,
        accountNo: '8300',
        information: 'Bücher',
        bookingText: 'Umsatz 7%'
    );

    $datevDocumentData->buildAccountsReceivableLedger(
        datevAccountLedgerData: $ledgerData,
        filePaths             : ['path-to-invoice.pdf']
    );

    $datevRepositoryData = new DatevRepositoryData();

    $datevDocumentData->addSEPAFile(
        nameWithExtension  : 'sepa-2023-12345.xml',
        filePath           : 'path-to-sepafile.xml',
        date               : new Carbon('2023-05-01'),
        datevRepositoryData: $datevRepositoryData);

    $zipPath = $datevDocumentData->generateZip();

测试

composer test

变更日志

请参阅 变更日志 以获取有关最近更改的更多信息。

安全漏洞

请查阅 我们的安全策略 了解如何报告安全漏洞。

鸣谢

许可协议

MIT 许可协议(MIT)。请参阅 许可文件 以获取更多信息。