Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) narrates from the Messenger of Allah (peace and blessings be upon him): "Military campaigns are of two kinds. The one who, seeking Allah's pleasure and in obedience to the commander, spends what is precious, lives in harmony with his companion and avoids corruption, there is reward in his sleeping and his waking. And whoever strives for pride, show, fame, disobedience to the imam and corruption in the land, he will not even return breaking even."
(b) Abu Bahriyyah Abdullah bin Qays (may Allah have mercy on him) narrates it, and at its end it says: "Whoever disobeyed the imam and did not spend what is precious to him will not even return breaking even."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18547