Cocoa , coffee , and cotton generate about 40 % of export earnings with cotton being the most important cash crop .