Issue #24224:normalize margin calculations

`itemnumber` (without the `_`) isn't a column in the `saleshistory` view called by the `salesHistory-detail.mql`