A general version of the fundamental theorem of asset pricing