WienerNetzeSmartmeter
WienerNetzeSmartmeter copied to clipboard
Fixed having multiple contracts with multiple zps
When switching provider and contract holder a new contract number is given but the zaehlpunkt stays the same. The old one is set to inactive, but is still in the system, if the contracted is not fully deleted. This leads to a situation where the same zaehlpunkt is listed twice under different contracts, once active, once inactive. Currently the updates don't fully check for inactive zaehlpunkte, if the same zaehlpunkt is listed twice. This fix checks all contracts and if the zaehlpunkt is active before adding it, so it gets the correct customer id for retrieving all the data.
I had to revert this PR as I spotted some potential flaws afterwards. @tschoerk maybe you could look over them one more time?