I'd start with finding the place in BMU where it is output at that tooltip.
Maybe "InformationTooltip" tooltip variable is used there, so search for it.
And then search for text used at the tooltip like "Codex" or lookup here the string constant that ES uses (SI_*) for the translation of codex:
https://github.com/esoui/esoui/blob/...tedstrings.lua
-> Could be this e.g. "Codex", -- SI_ANTIQUITY_LOG_BOOK
So search in BMU code for "Codex" or SI_ANTIQUITY_LOG_BOOK then
If you find that, find the variables used to display that <done>/<total> text line.
After that either check how it was done in the BMU code and change it to not add the varibales to the output tables for the tooltip if done == total.
Or just add an if done ~= total then outout the line end
And if you know how to use merTorchbug or zgoo then move your mouse above the control where the tooltip shows from and use /tbm (or /tbug mouse) or /zgoo mouse to inspect the conrtol below the mouse cursor.
Check the name etc. and try to find that name, or parts of it (the end/suffix) as the beginning is the Parent control's name) in BMU code and XML files.
And then check if the XML provides a handler like <OnMouseEnter> where you see a function like BMU.ShowRowTooltip() etc. and then find that function.
Or the handler is in lua code -> :SetHandler("OnMouseEnter",
To your BMU code examples:
The top code seems to be like a loop above all leads and then trying to match if it is still to be digged etc. and then mathcing it to a zone where some player currently is.
It's not adding any info to tooltips etc. It just seems to detect if any player is in a zone, if you e.g. enable the "survey/leads/treasure maps" filter tab!
The bottom one looks like the summary line at the bottom of the BMU "survey/leads/treasure maps" tab UI (not that tooltip) that shows the surveys and leads found, with icons of the professions etc.