KamoCRM

Terminal guards on cancel and revise, and stop swallowing bad input

Fixkamo-shared-library
Ya
26 Agosti 2026, 19:25 UTC
Mwandishi
Kamo
Ahadi ya
eea16de

cancel() and revise() had no isTerminal() guard, so an ACCEPTED quote could be flipped to CANCELLED or REVISED while acceptedAt and acceptedByName survived — a row whose status contradicts its own acceptance record. update() already guarded, so the omission was inconsistent, not deliberate. Three swallowing catches now throw: an unknown ?status returned every quote in the org rather than an error; an unrecognised discountType became NONE, so a promised discount silently vanished at HTTP 200; and an unparseable lead id detached the quote from its lead — on the field whose own javadoc says it is critical because JS mangles it.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei