java Java的复式记账库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3626796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Double-entry accounting libraries for Java?
提问by Derek Mahar
What double-entry accounting libraries are available for Java?
哪些复式记账库可用于 Java?
回答by CodeSlinger
I did write a library for myself, but since it was for a really trivial application, I don't know if it would suit a general purpose accounting need.
我确实为自己写了一个库,但由于它是一个非常简单的应用程序,我不知道它是否适合通用会计需求。
It has an interface like:
它有一个界面,如:
ledger.newPosting(new Date(), "Received from Anne")
.debit("Cash:Anne", 1000)
.credit("Dues Received", 1000)
.post();
int cashBalance = ledger.getAccount("Cash").getTrialBalance();
assertEquals(-1000, cashBalance);
int anneBalance = ledger.getAccount("Cash:Anne").getTrialBalance();
assertEquals(-1000, anneBalance);
int duesBalance = ledger.getAccount("Dues Received").getTrialBalance();
assertEquals(1000, duesBalance);
Is this the kind of thing you're looking for? Anyone else actually INTERESTED in this code? I wrote it generically, but never published it because I didn't think anyone would want something this trivial.
这是您要找的东西吗?其他人实际上对此代码感兴趣吗?我写得很笼统,但从未发表过,因为我认为没有人会想要这么琐碎的东西。
回答by Fredrik Wendt
There's a Swedish project called fribok.org (free (as in GNU free) accounting). It's an application too, but might be componentized and contain what you look for (given that GPL is a viable option for you).
有一个名为 fribok.org 的瑞典项目(免费(如在 GNU free 中)会计)。它也是一个应用程序,但可能被组件化并包含您要查找的内容(假设 GPL 对您来说是一个可行的选择)。
回答by zevra0
回答by Anton K
Well, I am not aware of any such libraries. Personally me thinks that double entry accounting framework would boil down to couple of interfaces and minimal code to ensure equation invariants. Hence no libs for that: try to bite a relevant code snippet from JMoney or something like that... ;)
好吧,我不知道有任何这样的库。我个人认为复式记账框架将归结为几个接口和最少的代码,以确保方程不变。因此没有库:尝试从 JMoney 或类似的东西中咬取相关代码片段......;)
回答by Aleksander Adamowski
How about jLedger- Java Business Accounting API?
如何jLedger- Java业务会计API?
Citing the project's home page: "This is a Java Business Accounting API that consist of invoicing, general ledger, stock/inventory control and other business API that will assist java developer to build a business software with ease."
引用该项目的主页:“这是一个 Java 业务会计 API,由发票、总帐、库存/库存控制和其他业务 API 组成,将帮助 Java 开发人员轻松构建业务软件。”
Note, however, that this project releases the software under the GNU GPL v2 license, not the Apache license that's usually associated with Java-related projects.
但是请注意,该项目在 GNU GPL v2 许可下发布软件,而不是通常与 Java 相关项目相关联的 Apache 许可。
GNU GPL is a copyleft licenseand libraries licensed under it may not be appropriate for internally developed or commercial software.
GNU GPL 是一个Copyleft 许可证,根据它获得许可的库可能不适用于内部开发或商业软件。
回答by vphilipnyc
回答by Jason
The best I have seen is a jPos module called miniglwhich is part of jpos-ee., The jPOS framework is used widely in many production grade deployments. I have personally used in at scale on some high-profile projects.
我见过的最好的是一个名为minigl的 jPos 模块,它是jpos-ee 的一部分。, jPOS 框架广泛用于许多生产级部署。我个人曾在一些备受瞩目的项目中大规模使用过。
You will need to get up to speed on jpos-ee, a very solid java framework for all things payment and fintech related. It is worth the learning curve as if you are asking about ledgers you are probably going to have other needs which are likely already addressed in the jPos codebase.
您需要了解 jpos-ee,这是一个非常可靠的 Java 框架,适用于所有与支付和金融科技相关的事情。学习曲线是值得的,就好像您在询问分类帐一样,您可能会有其他需求,这些需求可能已经在 jPos 代码库中得到解决。
回答by Timothy Marcoe
I just wrote a java library for accounting. The beauty of my library is that it uses a 4GL to do the credits, debits and ledgers. You can also import other functions to handle inventory, payroll and things like that. Fetal Libraries
我刚刚写了一个用于会计的java库。我的库的美妙之处在于它使用 4GL 来处理贷方、借方和分类账。您还可以导入其他函数来处理库存、工资单和类似的事情。胎儿图书馆

