Assigning Joint Costs And By-Product Credits