Pages

Thursday, 23 June 2022

New meter

New meter

In March 2021 I was asked by EDF, my electricity supplier, to read the meter. I tried, but the display had failed. I reported this back to them, and they said I needed a new meter.

Fair enough, I thought. But the next 15 months led to no new meter. Twice I had to cancel their proposed visit because I was in hospital, once they came with the Wrong Sort of Meter (two phase instead of three) and another time, the installed just didn't turn up.

But on 21 June, a man arrived with the right sort of meter.

He said it would take an hour of no electricity. I got ready for this by poering down all my computers, because my UPSes wouldn't run that long. THen he made the changeover, and I had power back - he took less than half an hour, because there were no complications.

But I haven't had free electricity for 15 months. With the faulty meter back at base, they'll try to get a reading from it - failing that they'll "estimate" my consumption.

So then I powered the computers back on. I expected at least one failure - that's what you get when a whole bunch of computers are powered off then on. But everything worked just fine!



Wednesday, 22 June 2022

Double VAT

Double VAT

Each quarter, I need to work out how much VAT to pay. It's a very complex calculation. I need to work out how much I've received from each EU country, and apply their particular VAT rate, and when all that's worked out, I need to visit the Irish tax website to report the numbers and pay the VAT owed.

Now that we've left the EU, do I still need to pay the EU this tax? I dn't know - I don't really understand how this ought to work.

For the UK, I need to total UK sales each day, list the VAT-registered purchases, report both numbers and pay VAT at 20% on the difference.

Obviously, I've automated this as much as I can. Each day when I do the billings, I append to a file totallog.txt what the sales are. This is done by the same routine that displays the summary totals.

Yesterday, I wasn't sure if I'd done that last part, so I had a look at totallog.txt to see if it was recorded there. What I saw was scary. What I saw was that every day, since May 3rd, the totals had been recorded twice.

I checked my program. It only recorded this once. How did it appear twice? I used Google to see if there were any clues there - no luck. I added some code to alert me if the output print was called more than once - it wasn't.

Eventually, I found the problem.  I opened the totallog.txt twice, once for appending the banked amounts, once for recording the eu and non-eu numbers. But I hadn't closed the file in between doing these, so with the file twice-opened, it was being appended to twice.

This mistake would have doubled my VAT bill. I'm glad I found it before it fed into my next quarter VAT returns.