Purchace Invoice calculation report

Hello,

where can i find calculation for purchase invoice. This is something that must be generic like purchase invoice report.
Example is shown in picture

issue created #10882