Issue #24111:fix markup pricing and margins with uom conversion

Is `_qtyinvuomratio` supposed to be in the numerator or denominator of the _margin calculation? If the denominator, please add parens to clarify. Same with line 3899 below, which also sets `_margin`.