added conditional for amount and quantity, #312.

Signed-off-by: Zane M. Kolnik <zanematthew@gmail.com>