working templated invoice search!