Black flies attacking beans

Preventing or reducing the damage by pest to crops can be a very lucrative business. even a person growing a few plants in a kitchen garden as hobby will admit that a lot of damage is being caused.
For example in panaji, goa, small black flies are covering almost all the beans , killing them rapidly, not allowing the beans to grow in September 2017, in panaji, goa .
Often the squirrels and other pests are also eating up all the beans causing losses.