mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +00:00
The earlier parity fix aggregated the non-key descriptive columns for the Item and Customer based-on paths but left Supplier grouping by all three selected columns (supplier, supplier_name, supplier_group). supplier_name is a stored per-transaction field, so historical purchase docs holding a divergent value for the same supplier would split one supplier into multiple rows — diverging from the original MariaDB output, which grouped by t1.supplier only. Aggregate supplier_name with Max() and keep only supplier + the FD master column supplier_group in GROUP BY, restoring one row per supplier on both engines. Add regression tests for the Supplier (purchase) and Customer (sales) paths that assert a single row per key even when stored descriptive fields diverge; both fail on the pre-fix multi-column GROUP BY and pass after the fix, on MariaDB and Postgres.
16 KiB
16 KiB