The whole situation seems bullshit to me, but I want a second opinion because it's going too far.
A bit of context... I'm a freelancer, I write in VBA or c#. 75% of the projects are microprojects in Excel.
In the years I built my own library and a code generator. The code generator writes some semi-standard class and methods. Stuff that has a structure but often needs manual adjustment for the final version. In order to have modular code where I can manually modify some parts and still regenerate other parts without losing the changes, the generator uses tags to wrap each "part" and when I deliver the work I don't delete them.
The client was genuinely happy after I deliver the project (all the set phrases, "now we'll do this other ..." etc.). Some days later I receive an email where he asks what these
<Sometag> lines were. I replied with the truth. Tags used by a code generator to find specific parts of the code. He was interested in VBA so I thought that an insightful explanation was appreciated.
A week later I send him the invoice and the next day he replied that since I've not actually written the work the price agreed was no longer valid. Now he wants to pay less than half of the agreed price. (???)
But the worksheet still does what it's supposed to do. The code generator is mine. I wrote every line and there are hundreds of hours of work in it.
What should I do? Is it unfair to use such a tool? Does the client have any point? On this project, there are 9.5k lines of code approx. 3k from my library, approx. 4k from the generator and the remaining handwritten. I agree that this is not a very descriptive code, but it's neither so bad code IMO. In the contract, (but also via email and voice call) we never agreed or even spoken on anything about the form of code. He told me that he and his employees tried to do something like this and the result was not working.
My biggest concern in pushing back too hard is that he could write a negative review on Google MyBusiness. I've never been in a situation like this and I don't want my reputation be compromised for a relatively small project. The compensation involved isn't high enough to warrant legal action either.