A Lancashire dairy farm has been ordered to pay out over £10,000 following a prosecution brought by the Environment Agency.