VAT report by currency

After a lot of reading, exploring, and trial and error, and some help from @Patch, I have had moderate success in creating a report transformation. So far I’ve just done one for ZWL input claims, but I can take what I’ve learned with this and apply it fairly easily to USD input claims and the output section for both currencies. Some of it is fairly crude, and I’m hoping that I can refine it. Some improvements I’d like to make before trying to submit it for review as a localisation are:

  1. Make it pick up transaction currencies automatically so that it’s not relying on extra custom tax codes like I’ve used. This should make it easier for others to load it into their businesses when it’s ready, I hope.
  2. Make it automatically iterate through all the currencies used, so that if you don’t have any USD transactions, for example, it won’t create that section, and if you use other currencies too, like ZAR, it will automatically include those in their own sections.
  3. Make all tax calculations reference the appropriate tax code directly. I’ve calculated the tax exclusive amount and tax amount manually with hard-coded values for the tax rates, which will give incorrect results if the tax rate is changed.
  4. Improve readability, variable naming, etc.
  5. I see that numbers generated from my calculations don’t use the number format set in my preferences, so it would be nice to change that, though I’m not sure if it’s possible in the report definition.

@Stewart, does this look like it will meet your needs?:

And the definition: