before TextIO.closeIn usageFile
end handle _ => NONE
+fun costBase amt =
+ case C.oneRow (getDb ()) ($`SELECT ^(C.realToSql amt) / SUM(shares) FROM WebUserPaying`) of
+ [share] => C.realFromSql share
+ | row => Init.rowError ("Bad costBase result", row)
+
end