mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
commission_rate was a free-text Data field on the Sales Person master and the Sales Team child, storing percentages as strings. Convert both to Percent. A pre_model_sync patch sanitizes the existing values first (empty / NULL / non-numeric -> 0, others normalised via flt) so the Data -> Percent column change casts cleanly under strict SQL mode, where Percent is a NOT NULL decimal column. The patch is idempotent and avoids db-specific SQL so it works on both MariaDB and Postgres.