Wouldn't it be just easier to buy max amount? I mean I have never even thought about buying less than maximum amount of jump drive batteries or cloaking batteries, since they do not take up cargo space. Except for the transport cloak, where you want to fine tune the amount yourself anyway.
Not that I want to discourage you from improving stuff. Thanks for the effort.