You come out of a battle, modules destroyed, ammo needs to be rebuild. You use a Munitions Surplus. It says everything is repaired and refilled. It isn't. All modules are still destroyed, the button for automatic repairs and ammo refills is still active and wants you to pay resources.
Once you restart the game, everything is fixed and rebuild