v1.0.4
2026-06-21
Latest
🛡️ Full-App Financial Integrity Audit (60 fixes)
Systematic end-to-end audit of every module that touches money: invoices, purchases, credit/debit notes, payments, stock, POS, reports, and payroll. Every journal entry, stock movement, and report query has been verified and corrected.
✨ Features
- Recurring invoice auto-generation. Templates with weekly/monthly/quarterly/yearly schedules now automatically create invoices when due. Triggered on every app start.
- Stock adjustment journal entries. Adjustments (damaged, lost, found, recount) now post proper accounting entries — Dr Stock Written Off / Cr Inventory for losses, Dr Inventory / Cr Stock Adjustment Gain for increases. Balance Sheet stays in sync with actual inventory.
- Salary disbursement journal. "Mark All Paid" on a payroll run now posts Dr Salaries Payable / Cr Bank — clearing the liability instead of leaving it open forever.
🐛 Critical Bug Fixes
- GSTR-3B runtime crash. The tax summary report referenced a non-existent column (
tr.tax_amount) — fixed tott.tax_amount. - POS Cancel button never worked. All POS bills are status "paid", but cancel rejected paid invoices. Guard removed.
- Credit Notes had zero tax reversal.
tax_group_idwasn't sent from the form, sopopulate_tax_transactions()skipped every line. GSTR-3B output tax was overstated. - Credit/Debit Notes never moved stock. Neither form passed
warehouse_id, so the backend'sif let Some(wh_id)guard silently skipped stock. Now loads default warehouse. - Credit Notes sent negative rates. Tax engine can't calculate on negative amounts; removed the hack. Backend already handles sign internally for CN type.
- Receivables aging ignored Credit Notes. Customer showed as owing more than actual. Now subtracts CN amounts with sign=-1.
- Payables aging ignored Debit Notes. Same fix for vendor outstanding.
- CSV import always failed. Missing 25th SQL parameter + naive comma-split that broke on quoted fields. Both fixed.
- Reorder report "Last Supplier" always NULL. Query filtered
type='purchase'instead of'purchase_order'. - Inventory Summary/Valuation showed wrong numbers. Was summing the running-balance column (meaningless). Now correctly reads the latest entry per product via
MAX(id). - Duplicate invoice numbers. When no number_series row existed, increment silently failed. Now auto-creates the row on first use.
- New companies had no warehouse. Stock operations failed until user manually created one.
create_companynow seeds a default warehouse.
📊 Report Accuracy
- GSTR-1 now filters to outward supplies only (was including purchases).
- GSTR-1 & GSTR-3B totals subtract credit note values (net turnover).
- Sales by Customer/Product/Period reports include credit notes with sign flip.
- Dashboard outstanding receivables/payables subtract CN/DN.
- Sales & Purchase registers exclude draft/cancelled invoices.
- POS day summary fixed (was cross-joining payments × invoices).
🔧 Other Improvements
- Credit Note form: warehouse picker, "Add back to stock" checkbox now functional.
- Debit Note form: niche-aware vendor label (Distributor for pharmacy/garment).
- Voucher Form: contra limited to bank/cash accounts; allocation amounts editable.
- POS: stock reloads on warehouse switch; edit-bill restores full UOM + batch data.
- E-Invoice:
GstRtsnaps to nearest NIC-valid slab (prevents IRP rejection). - Backup restore: proper semantic version comparison (v1.0.10 > v1.0.9).
- Opening stock deletion now reverses its journal entry.
- Refund payment type fixed: credit notes create "payment" (money out), not "receipt".