23 · Tax, receipts & notifications
Sales tax settings (tenant), receipt templates/send channels, and email/SMS plumbing. Distinct from HR payroll tax under DocHub 21.
Sales tax (tenant commerce)
| Surface | Path / API |
|---|---|
| Admin UI | /admin/taxes · Taxes.jsx |
| API | taxSettings.routes.js — settings, rates CRUD, /calculate |
| Services | tax.service.js · taxSettings.service.js |
POS cart carries taxRateBps / taxCents into finalize → invoice. Reports include accounting/taxes.
HR tax is separate
Employer EIN, W4, payroll tax rates live under
/admin/hr/business-tax-info and
/admin/hr/tax-rates on the HR DB — see DocHub 21.
Receipts
flowchart LR
INV[Invoice / sale]
TPL[Receipt templates]
GEN[Generate / preview]
CH[Channels]
INV --> GEN
TPL --> GEN
GEN --> CH
CH --> E[Email]
CH --> S[SMS]
CH --> P[Print / Bridge]
CH --> V[View token URL]
| API area | Examples |
|---|---|
/api/receipts | view/:token, templates/current, preview, email, SMS, send |
receipt.routes (templates/generate) | CRUD templates, PDF, print, email |
| UI | /admin/receipt-templates · branding often ties logos |
Services: receiptGeneration, receiptRenderer. Bridge can carry print jobs.
Email & SMS
| Piece | Role |
|---|---|
/api/email | Settings, status, test, send templates, invoice email, logs — see DocHub 29 |
/admin/mail-settings | UI for mail config |
/admin/tools/mailer | Dev mailer tester |
/api/admin/email-templates | Template admin (tickets etc.) |
email.service.js · mailer.js | Send pipeline |
sms.js | SMS helper used by receipts/notifications |
| Ticket notifications | ticketNotification.service on ticket events |
| Password reset | Auth flows use mailer |
Ops dependency
Live email/SMS quality depends on env SMTP/provider credentials — not just code paths existing.
File anchors
| Concern | Path |
|---|---|
| Tax | taxSettings.routes.js · Taxes.jsx |
| Receipts | receipts.routes.js · receipt.routes.js · ReceiptTemplates.jsx |
email.routes.js · MailSettings · mailer services | |
| SMS | backend/services/sms.js |
| OAO | 21 tax · 22 receipts · 23 email-sms HTML |