Add HST/tax support and payment reporting with HST aggregation #27
Reference in New Issue
Block a user
Delete Branch "feature/hst-and-reporting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds HST/tax to the payment system and builds the monthly payments report (roadmap #8) with HST aggregation.
HST / tax
us_hst_rate,manage_billing).us_paymentsgainstax_rate+tax_amount; the rate is frozen onto the payment at booking and tax is computed against the pre-tax subtotal.Payment::total()= subtotal + tax.tax_amountviaPaymentRepository::updateTax), matching the e-transfer-email override pattern.Payment reporting (#8)
PaymentReport— pure aggregator: subtotal, HST collected, grand total, and CSV rendering.PaymentReportController— month + instructor filters; studio admins see all instructors, instructors are scoped to their own rows; CSV via a nonce-protectedadmin-post.phphandler.export_paymentsso instructors (who lackmanage_billing) can reach it.PaymentRepository::findPaidBetween— paid-in-month query with optional instructor filter.Tests & docs
PaymentReportTest; addedupdateTax/findPaidBetween, HST computation, comp-not-taxed, and HST-receipt cases.payments.md,payment-reporting.md, and the README status table.All green: 160 tests, PHPCS clean, PHPStan no errors, no debug statements.
🤖 Generated with Claude Code