intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
241 stars 240 forks source link

QB under the hood. #482

Open octowork opened 1 year ago

octowork commented 1 year ago

Excuse the off-topic, but the Intuit forum portal gives me an error on posting question. So maybe someone can point me in the right direction / to someone who could help me out.

I'm trying to get an understanding of both bookkeeping concepts, and the underlying mechanics of bookkeeping software, specifically QuickBooks. Would really appreciate thoughts on my logic:

Take for example Accrued Revenues:

Say you've done web-dev services, you approximate that you will invoice your customer for this in the future $500. So based on GAAP+Accrual you have earned revenue, and based on the fact that you're at this point just estimating - you have accrued revenue, which would be of future economic benefit, i.e. an asset (since you haven't invoiced, or received payment for it - it's in the future) .

Double Entry 1:

Dr Accrued Revenues (Asset) $500, Cr Revenue (Revenue) $500

A month later you will be issuing an invoice. You don't have to make 'extra entries' AFTER the invoice, you can use the invoice itself, to avoid over-statements. I.e. because the value now escapes Accrued Revenue (asset), and moves into Accounts Payable (asset). This is backed up by the Invoice. The only change is the fact that you now have an Invoice to backup this ... value(?). This is the point where I'm wondering... what could be done via programming, to somehow associate the whole ... underlying value.../thing(?) with these transactions? What is this underlying thing that remains the same... the thing-of-value variable, and gets assigned different states, based on different logic. e.g. "It" can move from the classification of being accrued (i.e. not being backed up by an invoice) - into a state of being backed up by an Invoice, which triggers it's behavior of "going" into Accounts Receivable. After it gets paid off by the buyer - it gets to be backed up by the cash, and now it can no longer be backed up by the invoice - since the invoice has been voided. The invoice has been programmatically, based on some specified rules - knocked out by the reception of cash for this "underlying constant thing", from a programmatically acceptable source - a specific customer.

To paraphrase: imagine the value of the service I provided gets assigned an ID. Now this ID can have several states - it can be a state of uninvoiced, unpaid, accrued. Or it could be invoiced, and unpaid. But the presence of some states, can knock out, and invalidate the other states, based on some agreed interactivity rules of who can come in, and provide what, to knock what out. I.e./e.g. customer is allowed to come in with cash, and knock out invoice. Now based on these states - behavior gets triggered, e.g. specific double entries. Again, would appreciate comments on my logic.

devbanana commented 1 year ago

I personally think you’re overthinking it. What you’d usually do in QuickBooks is to create a reverse journal entry in the month the invoice is created. So credit Accrued Revenues and debit Revenue. Then create the invoice as you normally would putting that amount into Accounts Payable and once again crediting Revenue.