When having a detailed invoice with hundreds of items including tax calculations and if/then functions, doing all calculations in a single row of a data source (whether Google Sheets, Glide, Airtable, etc) can be extremely cumbersome. In this case, it would be more efficient to use Google Sheets as the template (just as Google Docs is now) to be able to import the source data per row into it, then allow Google Sheets functions to compute related columns, then finally export as PDF.