Permissible of reward and Sawab to earn Dunya in a valid and Halal source
In the name of Allah, the Most Beneficent and the Most Merciful
It is undoubtedly correct and permissible and a matter of reward and Sawab to earn Dunya in a valid and Halal source in order to fulfill once necessities of life and to avoid being dependent on other people. And after earning, if care is taken in executing financial rights such as Zakat etc., earning beyond necessity too is not detrimental, rather it is also undoubtedly correct and permissible. However what is preferred is that time should be divided into three sections, thus: one to earn livelihood; one to concentrate on Akhira; one to relax and take rest. As for engaging throughout the day in earning for livelihood insomuch as to forget the Akhira and to violate and transgress the rights of stakeholders and self, is indeed a detestable and disliked act which is prohibited, rather an act condemned in the Pure Shari’a.
Allah knows best