Account balance overdrawn when two (e)SIMs empty before top-up

Customer had two eSIMs eligible for a 5 GB refill but their account balance had insufficient funds. They topped up their balance enough to cover one refill but not both. The system proceeded to refill both eSIMs and bring their balance into the negative. Their monthly data limit was set to 46 (their account balance is in CAD).

When more than one (e)SIM is eligible for a refill when the account balance is topped up, we need to a) respect the monthly data limit, and b) only refill as many as they have funds for.

this got fixed didnt it? @amolith ?

I don’t think a fix for this has been deployed because I remember a customer running into this within the last couple weeks. At the same time, I did feel like work had been done on this. Maybe it was partially finished but not deployed yet?

Part of overcharging should be fixed, but I found a bunch of weirdness with how the billing job considers, or doesn’t, subaccounts and we intentionally only fixed some of it instead of trying to untangle it all. I’ll check my patch to see what was/n’t included.

Oh, no, it looks like it was never merged actually.

I added this to the in review column because I think that’s where we left it.