Since you still have the client with you, I would suggest the following steps to get back into action ASAP. However, I recommend evaluating the feasibility and practicality from your end before implementing any of these.
First, to Answer Your Queries:
1. Do I still need to pay salary for the time they didn't work?
If any employee is still on the company rolls, then you need to pay them the agreed-upon salary. If the employee doesn't work, it becomes a disciplinary issue. However, if there's no work for him/her, then he/she isn't to be blamed.
2. Can I remove all the people who created an issue and a few more who are not good and ask them to collect their salaries after a month?
You can remove them, but ensure that you don't use the problem any of them created as the reason for removing them. This could lead to arguments and delay what you want to do. Also, ensure that your attention is not diverted when you need to focus on the next steps. Since everyone, I guess, knows the current scenario, I suggest taking that as the reason for removing them with a 'wholehearted' sorry for this action of yours. This is 'wholehearted' because, to a large extent, you too have to take the blame for the current situation. Use the present situation to 'CLEAN-UP' the whole setup before you begin afresh. You may not get such a chance later when things begin to stabilize.
Regarding their agreeing to take their pending salaries later, it all depends on HOW MUCH THEY TRUST YOU, which depends on the quality of your relationships with them in the past few months. However, if they insist on getting PDCs, please take care and give PDCs ONLY if you are absolutely sure of the revenue inflows. If not, explain to them why you aren't confident to give PDCs now but give them a letter that their salary dues will be cleared ASAP with no timeframe. Also, clear all their paperwork, such as Exp Letters, Relieving Letters, etc. NEVER leave the paperwork pending or half-finished in such situations as it COULD boomerang later if neglected.
Regarding Your Mention of "I've Spent a Lot of Money in Training Them":
In such situations, it's wise to focus LESS on what we lost and MORE on what we can lose if the same situation is allowed to continue in whatever direction. Forget about the past and try to clear the current scenario ASAP to move forward.
Regarding Your Comments "...Not Even One Went in the Way That I Wanted To":
With respect to the progress of the projects, frankly, YOU need to take the flak for this. I am not sure of your overall background, but obviously, project management skills aren't one of your strengths. You should have insisted on the preliminary documentation (the features, the coding methodology, etc.) in place BEFORE the actual development began, with the baseline document being 'WHAT THE CLIENT WANTS.' This would have reduced guesswork, deciding-along-the-way situations, and tinkering. Better clarity and detail in such documentation would lead to fewer fiascos.
As for Retaining Your Friends in Whatever Capacity:
It's YOUR call. But I suggest keeping this as the bottom line: if your decision is to PART, let the parting be amicable (maybe taking the same reasons as with the employees). If the decision is to CONTINUE with either/both of them, get things like individual roles and responsibilities, including where the friend(s) is/are NOT to interfere, very clearly defined (if needed, in writing) to ensure there are no chances for overlap of responsibilities and consequent messing-up of the situation or creating new mess-ups.
All the Best.
Regards,
TS