# Features — quickbooks_integration

Evidence date: 2026-10-05. Revision: `master` `4ff6e81` (2020-04-30).

No feature list exists in the source repository except `README.md` (Online invoice API) and `README.txt` (Desktop Web Connector install). Status below is from PHP, QWC files, and those docs.

Planned features: **none are written down**. TODO comments and commented redirects are inactive, not a backlog.

## Current features

| Feature | Status | Where |
|---|---|---|
| Quotes enqueue Desktop invoice | Current | `handler.php` |
| Quotes qbXML InvoiceAdd from `quoteslive` lines | Current | `functions.php`, `quote.connection.php` |
| Quotes write-back invoice number and status `4. Invoiced` | Current | `_quickbooks_invoice_add_response` |
| Quotes paid flag + status `5. Paid` from InvoiceQuery | Current in code; SQL builder is defective for multiple refs | `_quickbooks_query_invoice_response`, `paid_invoices` |
| Quotes credited: delete unpaid queue row, redirect `6. Credited` | Current | `credited.php` |
| EIT month-end enqueue | Current, missing includes in `handlerEIT.php` | `handlerEIT.php`, `get_monthend_client_details` |
| EIT ad-hoc enqueue | Current | `handlerEIT.php` |
| EIT InvoiceAdd: non-SLA, SLA, transit | Current | `functionsEIT.php` |
| Timesheet enqueue from `tmpQBImport` then truncate | Current | `handlerTS.php`, `ts.connection.php` |
| Timesheet InvoiceAdd item Software; collapse queue to `s` | Current | `functionsTS.php` |
| Hourly reset queue `n` → `q` | Current | `cron.hourly.php` |
| ConsoliBYTE SOAP servers (Quotes / EIT / TS) | Current | `qbwc.php`, `qbwcEIT.php`, `qbwcTS.php` |
| QWC apps on `qb.overdrive.co.za` | Current in git | `serverconfigQuotes.qwc`, `serverconfigEIT.qwc`, `serverconfigTS.qwc` |
| Add Customer SOAP | Current | `AddClientService/qbwc.php` (+ EIT/TS copies) |
| QBO OAuth2 + session token | Current | `auth.php` |
| Persist one Online request in `quickbooks_request` | Current | `auth.php` `logRequest` |
| QBO sandbox Invoice create + redirect with `QBAPI` | Current | `invoice.php` |
| Alternate Online invoice JSON echo | Present; not the rewrite target | `index.php` |
| Demo page `/create/` | Current | `create.php`, `create.js` |
| Pretty URIs + CORS for eit.overdrive.co.za | Current | `.htaccess` |
| XML dumps of qbXML | Current | `XMLOutput/`, `xmlOuput*.txt` |
| PHP error logs committed | Present | `php-error-*.log` |
| Vendor Intuit v3 SDK 5.3.5 | Current | `composer.json` / `composer.lock` / `vendor/` |
| ConsoliBYTE examples and tests under AddClientService | Present as upstream kit, not this product's tests | `AddClientService/docs`, `AddClientService/dev` |
| Java Maven POM wrapping the PHP kit | Present | `AddClientService/pom.xml` |
| QBWC tester scripts | Present | `dev_qbwc_tester.php`, `dev_qbwc_tester-working.php` |

## Completed features

Treat "completed" as present on `master` and used by a mapped SOAP action or documented HTTP route. That is the table above. Git history on the inspected clone is a single commit, so a completion timeline is **Unknown**.

## In development

None labelled. Last commit message: "API redirects, Improved session handling for invoices" — **Inferred** as Online `invoice.php` / `.htaccess` work.

## Planned

None in repo. Comment in `AddClientService/handler.php`: check duplicate invoice for a quote number — not implemented.

## Recently changed

Relative to the only inspected commit (2020-04-30): Online auth redirect to `invoice.php`, session stream, `.htaccess` rules for `auth` / `invoice` / `create` / `handlerEIT`.

Older comments (2014–2018) describe mysqli conversion, labour SKU no longer rewritten to "Labour" (2016), Hetzner credential reset (2017). Those changes are in the tree; their git commits were not in the shallow tip.

## Deprecated / removed / inactive

| Item | Evidence |
|---|---|
| HTTPS force in `.htaccess` | Commented `RewriteRule` |
| Quotes post-enqueue redirect to `3a. To be Invoiced` | Commented in `handler.php` |
| Email on insert_invoice_number | Comment `//send email` only |
| cron.hourly email / EIT error tasks | Comments only |
| `config.php` | Gitignored; `config.php.bak` / `config.old.php` remain |
| `test.php` | Gitignored (README.txt still tells operators to use it) |
| `support.php` | Empty file; QWC AppSupport still points at it |
| `AddClientService/handler.php` invoice enqueue | Commented out |
| `index.php` as `/invoice/` | Rewrite goes to `invoice.php` |
| README sample payload `ItemName` / `Amount` | Code uses `name`, `UnitPrice`, `Description`, `Qty` |
| mysql_* APIs | Still used in `credited.php`, EIT response/error handlers |
| Local hosts `quickbooks.silicon.local`, `localhost2`, `192.168.100.11` | Backup QWC files |

## Feature vs documentation conflicts

1. `README.md` invoice payload vs `invoice.php` / `create.js` field names.
2. `README.md` says `/invoice/` returns JSON invoice number; `invoice.php` redirects.
3. `README.txt` AppSupport must 200 OK; `support.php` is empty (may still 200).
4. `README.txt` database name `quickbooks_webservices` vs live strings `quickbook_webservice`.
5. EIT `insert_invoice_number` lives in `eit.connection.php` but is not called from EIT SOAP response.
