Release v4.9.32
Invoice buyer/client integrity
Fixes the statistics-vs-dashboard client mismatch (e.g. an invoice showing a different buyer in the statistics page than in the accountant dashboard).
- Statistics now shows each invoice's own buyer snapshot (
COALESCE(NULLIF(i.buyer_name,''), c.name)) instead of the shared customer record's mutable name; search also matchesbuyer_name/buyer_tax_id. Buyer snapshot (buyer_*) is now written towp_cig_invoiceson every save. sync_customer()no longer overwrites an existing customer when a later invoice reuses the same tax_id — identity keyed by ს/კ ან პ/ნ is immutable (this was corrupting shared placeholder customers like000).- Form auto-fill + lock: entering an existing ს/კ ან პ/ნ auto-fills the buyer name/phone/address and locks them until the ID is changed (new
cig_lookup_by_taxAJAX againstwp_cig_customers), with a server-side backstop on save.
Accompanying one-time data repairs (synthetic 99… IDs for no-real-ID buyers, re-homing wrongly-merged invoices) were applied to the database separately; money totals unchanged.
What's Changed
Full Changelog: v4.9.31...v4.9.32