pajkho/siephp
Composer 安装命令:
composer require pajkho/siephp
包简介
Library for export to the Swedish SIE-format. Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data).
README 文档
README
About
SIEPHP is a library that enables export of bookkeeping-data to the Swedish SIE-format. For more information about SIE see http://www.sie.se/
Currently only a subset of the specification is supported, like export to SIE4 (verification/transaction data). In the future a loader-class for SIE could be written as well, and support of more features in the SIE-standard.
It's built around simple data-classes that represents a Company / Verifications / Transactions by the model in the SIE-standard. It also comes with a dumper-class that can dump the data to SIE-format.
Installation
Install the latest version with
$ composer require pajkho/siephp
Usage
examples/ holds some examples on how to use SIE-PHP. This is examples/simple.php:
// create a company $company = (new SIE\Data\Company()) // set company name ->setCompanyName('My company') // add a verification series ->addVerificationSeries(new SIE\Data\VerificationSeries()) // add two accounts ->addAccount((new SIE\Data\Account(1511))->setName('Kundfordringar')) ->addAccount((new SIE\Data\Account(3741))->setName('Öresutjämning')) ; // add a verification with two transactions $verification = (new SIE\Data\Verification(591000490))->setDate('20150105') ->addTransaction( (new SIE\Data\Transaction()) ->setAccount($company->getAccount(1511)) ->setAmount(-0.24) ) ->addTransaction( (new SIE\Data\Transaction()) ->setAccount($company->getAccount(3741)) ->setAmount(0.24) ) ; // add the verification to the company $company->getVerificationSeriesAll()[0]->addVerification($verification); // validate data, will throw Exception if invalid data $company->validate(); $dumper = new SIE\Dumper\SIEDumper(); $output = $dumper->dump($company); echo $output;
And it will generate the following output (in PC8/CP437 encoding):
#FLAGGA 0
#FORMAT PC8
#SIETYP 4
#PROGRAM "SIE-PHP exporter"
#GEN 20150921
#FNAMN "My company"
#KONTO 1511 Kundfordringar
#KONTO 3741 Öresutjämning
#VER A 591000490 20150105
{
#TRANS 1511 {} -0.24 20150105
#TRANS 3741 {} 0.24 20150105
}
See examples/TSVtoSIE.php for a custom TSV to SIE converter, loading the same data from a TSV-file.
Author
Johan Wilfer - johan [at] jttech.se - http://jttech.se
Licence
SIE-PHP is licensed under the MIT License - see the LICENSE file for details
Thanks to
Mitronic AB (http://mitronic.se) that funded this work.
Questions?
Send an email to johan [at] jttech.se
pajkho/siephp 适用场景与选型建议
pajkho/siephp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 697 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 07 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 pajkho/siephp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pajkho/siephp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 697
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-23