... حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا جَرِيرُ بْنُ عَبْدِ الْحَمِيدِ، عَنْ عَطَاءِ بْنِ السَّائِبِ، عَنْ عَبْدِ اللَّهِ بْنِ عُبَيْدِ بْنِ عُمَيْرٍ، عَنْ أَبِيهِ، قَالَ قَالَ عَبْدُ اللَّهِ بْنُ عُمَرَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ شَرِبَ الْخَمْرَ لَمْ يَقْبَلِ اللَّهُ لَهُ صَلاَةً أَرْبَعِينَ صَبَاحًا فَإِنْ تَابَ تَابَ اللَّهُ عَلَيْهِ فَإِنْ عَادَ لَمْ يَقْبَلِ اللَّهُ لَهُ صَلاَةً أَرْبَعِينَ صَبَاحًا فَإِنْ تَابَ تَابَ اللَّهُ عَلَيْهِ فَإِنْ عَادَ لَمْ يَقْبَلِ اللَّهُ لَهُ صَلاَةً أَرْبَعِينَ صَبَاحًا فَإِنْ تَابَ تَابَ اللَّهُ عَلَيْهِ فَإِنْ عَادَ الرَّابِعَةَ لَمْ يَقْبَلِ اللَّهُ لَهُ صَلاَةً أَرْبَعِينَ صَبَاحًا فَإِنْ تَابَ لَمْ يَتُبِ اللَّهُ عَلَيْهِ وَسَقَاهُ مِنْ نَهْرِ الْخَبَالِ " . قِيلَ يَا أَبَا عَبْدِ الرَّحْمَنِ وَمَا نَهْرُ الْخَبَالِ قَالَ نَهْرٌ مِنْ صَدِيدِ أَهْلِ النَّارِ . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ وَقَدْ رُوِيَ نَحْوُ هَذَا عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو وَابْنِ عَبَّاسٍ عَنِ النَّبِيِّ صلى الله عليه وسلم . ...
Narrated 'Abdullah bin 'Umar:
That the Messenger of Allah (saws) said: "Whoever drinks Khamr, Salat is not accepted from him for forty days. If he repents, then Allah will accept his repentance. It he returns to it, then Allah will not accept his Salat for forty days. If he repents, then Allah will accept his repentance. If he returns to it, then Allah will not accepts his Salat for forty days. If he repents, then Allah will accept his repentance. If he returns to it a fourth time, Allah will not accept his Salat for forty days, and if he were to repent, Allah would not accept his repentance, and he will be given to drink from the river of Al-Khabal." They said: "O Aby 'Abdur-Rahman! What is the river of Al-Khabal?" He said: "A river of the pus from the inhabitants of the Fire."
[Abu 'Eisa said:] This Hadith is Hasan. Similar to this has been reported from 'Abdullah bin 'Amr and Ibn 'Abbas from the Prophet (saws).
[Jami' Altirmithi]
It is clearly from the Hadith above that God will not accept the prayer for 40 days if you consume alcohol. The 40 days punishment is to show how sinful is it to consume alcohol.
Regarding the acceptance of the prayers, Scholars say if you drink you still have to pray all your prayers in this 40 days period. God will not give you Hasanat for it but will surely give you sins if you don't pray.
Regarding the acceptance of the Fasting, some people think that if the prayers are not accepted, then Fasting is not accepted. This was not mentioned in the Hadith and as I said above, The acceptance here is not an order for not praying or fasting.. it is a type of punishment where no hasanat will be collected for you but you will totally sin if you do not pray or fast in that 40 days period.
Anyway, You said it yourself, Muslims should not consume alcohol anyway.