
Amount filled automatically when selecting a resource. (JavaScript)
Also we can think about radiobuttons which makes possible to select if we want the resource to be dropped on the ground or taken to inventory.
There are many advantages:
+ cleaner code
+ more comfortable when dealing with masses of resources in the container (everything is faster)
+ less transfer used
+ less clicking when picking up something from the ground then
I don't see any disadvantages.

EDIT: New new.

I know, that part of that suggestion is already accepted, but it's unified unification of that idea and some more.