Overall meaning :
No misfortune can happen on earth or in your own persons but it is recorded in the Preserved Tablet (the Book of Decrees) before We bring it into being. That is truly easy for Allah. We have informed you of this, so that you may not grieve for whatever worldly good that has escaped you, nor exult with pride over whatever worldly pleasures you have gained. Allah does not love any of those who are proud and boastful—who, being themselves stingily unwilling to give away any of what Allah has given them, urge others to be niggardly.
Those who turn away from spending in the cause of Allah will by so doing not harm Allah in the least; for Allah is the Self-Sufficient, the Praiseworthy.