构建一个基本的会计应用程序

发布于 2024-07-11 04:09:09 字数 1431 浏览 12 评论 0原文

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

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

发布评论

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

评论(3

安静被遗忘 2024-07-18 04:09:09

刚刚完成了一些为学校相关非营利组织定制的在线会计软件的 1.0 版,我有一些建议:)

  • 使用标准复式记账/簿记(借方和贷方)作为财务引擎的基础。 您会发现这不仅可以存储交易数据,还可以生成报告,这对您很有帮助。 资产 = 负债 + 股权是追踪谁拥有什么的行之有效的方法。
  • 使用小数类型表示货币。
  • 使用交易。
  • 保持界面简单
    可能的。
  • 你需要有一种方法
    允许用户与银行进行调节
    记录有自己的记录。
    提取银行数据会有所帮助
    流程,但您需要提供
    用户用方法来比较。
    您可以为此使用银行对账单
    过程。
  • 银行总是被认为是正确的。
    如果两者之间存在差异
    银行和用户记录...
    错误几乎总是由用户承担
    记录。
  • 确保您提供某种
    用户的备份工具
  • 保护用户数据
  • 确保您完全了解正在自动化的流程。 不要做出假设。 由专门从事个人理财的会计师来执行您的想法。 进行这种审查会有很大帮助。
  • 准备好编写大量代码。 会计软件已经存在多年,典型会计软件包的“标准功能”列表也在不断增长,并且市场上有相当多的参与者。 如果您计划销售该产品,您将需要提供这些标准功能,然后找到某种方法将其与现有的附加功能区分开来。
  • 测试测试测试再测试。 你
    正在保存人们的记录
    个人金融交易
    (他们的钱)。 错误不被采纳
    轻轻。

Having just completed version 1.0 of some custom written online accounting software for school related non-profits I have some advice :)

  • Use standard double entry accounting/bookkeeping (debits and credits) as the basis for your financial engine. You will find this will serve you well when it comes to not only storing data on transactions but also generating reports. Assets = Liabilies + Equity is a tried and true approach for tracking who owns what.
  • Use decimal types for money.
  • Use transactions.
  • Keep the interface as simple as
    possible.
  • You will need to have a method to
    allow the user to reconcile the bank
    records with their own records.
    Pulling in bank data would help this
    process but you will need to provide
    the user with a method to compare.
    You can use bank statements for this
    process.
  • The bank is always considered to be right.
    If there is a discrepancy between
    the bank and the user records... the
    fault almost always is with the user
    records.
  • Make sure you provide some sort of
    backup facility for the user
  • Secure the users data
  • Make sure you fully understand the process you are automating. Do not make assumptions. Run your ideas by an accountant who specializes in personal finance. Having this vetting will help quite a bit.
  • Be prepared to write ALOT of code. Accounting software has been around for years, the list of "standard features" for a typical accounting package has grown, and there are quite a few players in the market. If you are planning on selling this product you will need to provide those standard features and then find some way of differentiating it from what is already available with additional features.
  • TEST TEST TEST and TEST again. You
    are keeping records of peoples
    personal financial transactions
    (their money). Errors are not taken
    lightly.
滿滿的愛 2024-07-18 04:09:09

当我完成一个专注于会计的 POS 系统时,我将添加一些提示 - 这意味着购买、费用、发票、账户、信用卡、现金、车辆等都需要跟踪。 这些概念最终将应用于个人系统。

最好的建议是查看您的文书工作,并尝试围绕将物理文档翻译到计算机所需的操作来形成数据库。 将其与会计教科书的前几章结合起来,其中讨论了帐户、会计科目表和日记帐。

我用过的书:
乔治·默里 (George Murray) 的《触手可及的会计》
企业家财务与会计作者:Suzanne Caplan
安斯沃斯《会计概论》
会计、信息技术和商业解决方案作者:Hollander

将源文档输入系统后,您就可以运行查询来获得答案。 这样做消除了“总账”和“试算表”的概念,因为您只需更正或添加到源文档即可。 于是“总账”就变成了一个计算。 这让我非常困惑。 同样,所有源文档都将放入“期刊”中,它可以是您的数据库表。 我使用普通日记帐、采购日记帐、付款或现金支出日记帐、销售日记帐和现金收入日记帐。 请记住,术语“现金”是指现金、信用卡、支票、借记卡。

例如,我有一本“普通日记”,基本上就是您所需要的。 在这本日记中,我记录了“来源收据”。 收据可能是发票,例如时代华纳有线电视,它有一个帐号。 在这种情况下,我为时代华纳创建一个“帐户”。 时代华纳的账户将链接到一个“会计科目表”,该会计科目表将费用类型指定为“互联网”。 然后输入发票上的日期、金额等。发票链接到时代华纳的帐户。 一旦发票被输入,它就未被支付。 然后您需要添加付款。 当然,您可以全额支付账单,但您可能需要分两次付款,或分期付款,或不全额付款。 这将引导您进入“付款日记帐”以及“发票到付款查找表”,该表需要有一个应用金额才能应用于发票。该应用金额很重要,因为您可能有 4 个未付的时代华纳账单,并且您只需紧急发送 200 美元以上即可恢复您的帐户,然后需要将这笔付款分摊到各个发票上,当然,如果您输入了一个帐户,则付款帐户将链接回您的帐户

。假设您在 embrasse-moi 购买了一些内衣,并支付现金,您的系统将获取供应商、embrasse-moi、日期、费用,以防万一您添加了“使用税”。通过互联网购买并且没有缴税,但您仍然欠税,金额和“科目表”(本质上是您的费用类别),所有这些都将在同一张表格上显示。我制作了一个简化的费用+准确付款表格,因为这很常见。 如果付款被分割,那么您将需要使用一张表格输入收据,然后使用其他表格创建链接到该收据的多笔付款。

因此,最终这个简单的会计应用程序的数据库将包含以下表格:
帐户(帐户信息包括帐户类型,如抄送卡/借记卡、支票、现金、商业采购的库存帐户、公用事业等费用帐户、默认会计科目表)
会计科目表(基本上是一个列表,描述如何对将流向您的运营报表的费用和帐户进行分类,我将我的列表放在这里供您查看:
http://embrasse-moi.com/exampleData/pos_chart_of_accounts.csv
我有一张账户期初余额表,因为你必须从某个地方开始
帐户类型 - 指信用卡、借记卡等。请记住,会计等式基本上根据帐户进行切换。 支票账户借记是“坏”的,因为你把钱给了;贷记是“好”的,因为你收了钱;信用卡借记是“好”的,因为你减少了债务;贷记是“坏”的,因为你增加了债务。
账户类型图表,即“资产、负债、长期资产等”。这可以作为枚举类型包含在账户购物车中
然后是普通日记,如上所述,它包含足够的信息来描述您的文档。 是到账了吗? 日期、金额、类型(收据或发票)到期日,我保留“已付款”标志以方便查询。
然后,您可以在“普通日记帐”表和付款表之间进行查找
然后您就有了付款表

一旦你掌握了所有这些信息,你几乎永远不会使用你的银行作为来源,因为它们并不总是正确的,至少我的银行会犯错误。 因此,这种类型的结构将使您掌握信息,并且在月底该系统将生成一份与您的帐户报表看起来相同的报表。 这就是目标。

I will add a few tips as I am finishing a POS system that focuses on ACCOUNTING - meaning the purchases, expenses, invoicing, accounts, credit cards, cash, vehicles, etc all need to be tracked. The concepts will eventually be applied to a personal system.

The best advice is to look at your paperwork and try to form your database around what you need to do to translate your physical documents to the computer. Combine this with the first couple of chapters of an accounting textbook which talks about accounts, chart of accounts, and journals.

The books I used :
Accounting at your fingertips by George Murray
Finance and Accounting for Entrepenuers by Suzanne Caplan
Introduction To Accounting by Ainsworth
Accounting, Information technology, and Business Solutions By Hollander

Once you have your source documents entered into the system you can then run queries to get to your answers. Doing this eliminated the concept of the "General Ledger" and "trial balance" because you simply correct or add to your source documents. So the "General Ledger" becomes a calculation. That was super confusing to me. Again, all the source documents will be put into 'Journals', which can be your database tables. I use a general journal, a purchases journal, a payments or cash disbursements journal, a sales journal, and a cash receipts journal. Keep in mind the term "CASH" refers to cash, credit, check, debit.

For example I have a "general journal" which is basically what you need. In this journal I keep track of 'source receipts'. A receipt might be an invoice, like time warner cable, which has an account number. In that case I create an 'account' for time warner. The time warner account will link to a 'chart of accounts' which will specify the type of expense as "internet". The invoice then gets entered with the date, the amount, etc. The invoice links to the account for time warner. Once the invoice is entered it is unpaid. You then need to add payment. Of course you could pay the bill in full as you should, but you might need to do two payments, or split payments, or not pay in full. This will lead you to a 'Payments Journal" in combination with a 'invoice to payments lookup table' which will need to have an applied amount to apply to an invoice. This applied amount is important because you might have 4 unpaid time warner bills and you just send over $200 in a panic to get your account back on. This payment then needs to split across the invoices with amounts to apply to each. And of course the payment account will link back to your accounts.

For the case of entering a receipt, the account is not used. Say you pick up some lingerie at embrasse-moi, and pay cash. Your system will take the supplier, embrasse-moi, the date, the cost, I added a 'use tax' in case you purchase over the internet and did not pay tax but you still owe it, the amount, and the 'Chart of accounts' which is essentially what category is your expense. That all goes to the general journal. On the same form you will have the payment method. I made a simplified form for an expense + exact payment as that is very common. If the payment is split then you will need to enter the receipt using one form, then create multiple payments linking to that receipt with other forms.

So in the end your database for this simple accounting app will have the following tables:
Accounts (the account information including an account type like cc/debit card, checking, cash, inventory account for business purchases, expense account like utilities, the default chart of account)
Chart of accounts (basically a list describing how to classify expenses and accounts which will flow to your operating statement, i put mine here for you to check out:
http://embrasse-moi.com/exampleData/pos_chart_of_accounts.csv)
I have a table for opening balances for accounts, because you have to start somewhere
Account type - meaning credit card, debit card, etc. Keep in mind the accounting equation basicaly switches based on the account. Checking accounts debits are "bad" because you gave away your money and credits are "good" because you took in money while credit cards debits are "good" because you reduced your debt and credits are "bad" becasue you added to your debt
Chart of account types, which is an 'asset, liability, long term asset, etc. This could be included in the cart of accounts as an Enum type
Then there is the general journal, which as described contains enough information to describe your document. Is it on account? Date, amount, the type (receipt or invoice) due date, i keep a 'paid' flag to ease the querying.
Then you have a lookup between the 'general journal' table and the payment table
Then you have the payment table.

Once you have all this information in, you will almost never use your bank as sources, as they are not always correct, at least my bank makes mistakes. So this type of structure will keep you on top of your information, and at the end of the month this system will produce a statement that looks identical to your account statements. And that is the goal.

千鲤 2024-07-18 04:09:09

关于从银行获取信息的 API:如果可能的话,并不简单。 您可以想象您的银行将花费多长时间来确保一切安全。 我认为不可能自动连接。
通常,在您登录网上银行后(如果有的话),可以通过手动下载文件来下载数据。 希望它是 CSV 格式或类似的格式;-)

[编辑]

显然我错了,主要银行确实允许直接连接。 我想你必须咨询你的银行技术支持人员。

[/edit]

至于要使用的数据类型,我至少建议货币值使用小数,而不是双精度/浮点数。 请参阅这个 SO问题线程。

About APIs for getting info from your bank: not simple, if at all possible. You can imagine the lengths your bank will go through to make sure everything is secured. I don't think it'll be possible to automatically connect.
Usually there's a way to download data through manual downloading of a file, after you logged into your online banking (if you have that available). Hopefully it'll be in CSV format or something similar ;-)

[edit]

Apparently I was wrong here, major banks DO allow direct connection. I guess you'll have to consult your bank techsupport on that then.

[/edit]

As for datatypes to use, I'd at least recommend decimals for money values, instead of doubles/floats. see this SO question thread about that too.

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