issue #19950: Add new quote functions. Fix some problems
issue #19550: Add margin to quote orm