[FYI/solved] Print format - data source (which table do report fields get selected from)

When using standard reports, and/or jinja2 built formats, I have a mysterious result in the tax/VAT row.

At some point I must have changed something in one or other setting :grin: , but I can’t remember where :blush:.

Background is as follows:
South African VAT was 14% until 1/4/2018, when it increased to 15%.
When that was changed, I created a new rule - description I have entered is “South African VAT @15%”.

My settings for sales are like this

At the time of that change, I also edited the old one [which I originally set as “VAT @ 14.0”] to be “South African VAT @14%”. When I do a sales output report, the calculated part is correct - uses VAT/tax of 15%, BUT it still shows the “VAT @ 14.0” description.
eg. POS invoice pic below

The field in the jinja2 file is row.description - but I am apparently not grasping where this points to or comes from.

If anyone happens to know which file/table I should look in to fix/adjust this, I’d be most grateful.

FYI: Update/Additional info
In the tabSales Taxes and Charges table, I found 2 rows which seem to contain the data.

The original data rows were something like this:
(2 rows with parent = “South Africa VAT@xx%”, where both had description = “VAT @ 14.0” and ~8000 rows of parent=INVTDxxxxxx

The GUI doesn’t seem to show the link between the doctype and description field anywhere. (Maybe I set something up incorrectly at the time of altering to the new tax rate).

I manually edited the description field in the row which contained parent=“South Africa VAT@15%”, and then re-saved the Sales Invoice, and the “new” description now shows correctly on the output format.

I am not sure if something was changed in the DB schema/migrates or if that particular field was removed from the GUI at some point along the way - hopefully it’s useful to someone with a similar problem.

Though this problem is “solved”, I won’t mark it as such since I created the problem. :blush:

1 Like