Java 的复式记账会计库?

发布于 2024-09-17 09:19:48 字数 1539 浏览 8 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

绝影如岚 2024-09-24 09:19:48

我确实为自己编写了一个库,但由于它是一个非常简单的应用程序,我不知道它是否适合通用会计需求。

它有一个类似这样的界面:

    ledger.newPosting(new Date(), "Received $10 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);

这是您正在寻找的东西吗?还有其他人真正对这段代码感兴趣吗?我写的很笼统,但从未发表过,因为我认为没有人会想要这么琐碎的东西。

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 $10 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.

み青杉依旧 2024-09-24 09:19:48

有一个瑞典项目,名为 fribok.org(免费(如 GNU 自由)会计)。它也是一个应用程序,但可能会被组件化并包含您想要的内容(假设 GPL 对您来说是一个可行的选择)。

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).

傲影 2024-09-24 09:19:48

我见过 JMoney 与自定义插件一起使用。你想做什么?

I've seen JMoney used with custom plug-ins. What are you trying to do?

神经大条 2024-09-24 09:19:48

嗯,我不知道有这样的库。我个人认为,复式记账框架可以归结为几个接口和最少的代码,以确保方程不变量。因此没有相应的库:尝试从 JMoney 或类似的东西中获取相关代码片段......
;)

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...
;)

向地狱狂奔 2024-09-24 09:19:48

jLedger - Java Business Accounting API 怎么样?

引用该项目的主页:“这是一个 Java 商业会计 API,由发票、总账、库存/库存控制和其他商业 API 组成,将帮助 Java 开发人员轻松构建商业软件。”

但请注意,该项目根据 GNU GPL v2 许可证发布软件,而不是通常与 Java 相关项目关联的 Apache 许可证。

GNU GPL 是一个 copyleft 许可证,根据其许可的库可能不适合内部开发或商业软件。

How about jLedger - Java Business Accounting 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."

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 is a copyleft license and libraries licensed under it may not be appropriate for internally developed or commercial software.

说谎友 2024-09-24 09:19:48

这个是使用 JTA 和 Spring 的最新实现。正如它所说:

使用 Spring 4 实现的复式记账概念,
嵌入模式下的Java Transaction API和H2数据库

There is this more recent implementation using JTA and Spring. As it states:

The Double-entry bookkeeping concept implemented with Spring 4, the
Java Transaction API and the H2 database in embedded mode

浅浅淡淡 2024-09-24 09:19:48

我见过的最好的是一个名为 minigl 的 jPos 模块是 jpos-ee 的一部分。,jPOS 框架广泛用于许多生产级部署。我个人曾在一些备受瞩目的项目中大规模使用过。

您需要快速了解 jpos-ee,这是一个非常可靠的 Java 框架,适用于所有与支付和金融科技相关的事情。学习曲线是值得的,就好像您在询问分类账一样,您可能会有其他需求,这些需求可能已经在 jPos 代码库中得到解决。

The best I have seen is a jPos module called minigl which 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.

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.

美人如玉 2024-09-24 09:19:48

我刚刚写了一个用于会计的java库。我的图书馆的优点在于它使用 4GL 来进行贷项、借项和分类帐。您还可以导入其他函数来处理库存、工资单等。 胎儿图书馆

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文