Help me fill my wallet!
Java 10, 385 384 382 bytes

C-&gt;{String[]R=new String[8],F={&quot;CC&quot;,&quot;DC&quot;,&quot;PC&quot;,&quot;GC&quot;,&quot;MC&quot;};int c=C.size(),i=1,s=0;c=c&gt;8?8:c;for(var q:C)if(&quot;DCC&quot;.contains(q))s++;for(;s&gt;c- --s;c=(c=C.size())&gt;8?8:c)i=C.remove(F[i])?i:0;for(c=0,i=8;i&gt;0&amp;c&lt;5;c++)for(;i&gt;0&amp;C.remove(F[c]);)R[--i]=F[c];if(C.remove(&quot;ID&quot;))R[c=0]=&quot;ID&quot;;if(C.remove(&quot;DL&quot;))R[c&lt;1?1:0]=&quot;DL&quot;;for(i=0;i&lt;8;)System.out.print((R[i]!=null?R[i]:&quot;__&quot;)+(i++%2&gt;0?&quot;\n&quot;:&quot; &quot;));}

Although it wasn't too difficult, I can see why it was unanswered. Especially that rule regarding &quot;NDC+NCC ≤ NID+NDL+NPC+NGC+NMC+1&quot; costs quite a lot of bytes at the moment..
And since it's been about 2.5 year since this challenge has been posted, OP might have got another wallet by now anyway.. ;p
-1 byte thanks to @Jakob.
Try it online.
Explanation:
C-&gt;{                       // Method with String-List parameter and String return-type
  String[]R=new String[8], //  String-array of size 8
          F={&quot;CC&quot;,&quot;DC&quot;,&quot;PC&quot;,&quot;GC&quot;,&quot;MC&quot;};
                           //  Frequency-order String-array
  int c=C.size(),          //  Size of the input-List
      i=1,                 //  Index integer, starting at 1
      s=0;                 //  Count-integer, starting at 0
  c=c&gt;8?8:c;               //  If the size is larger than 8, set it to 8
  for(var q:C)             //  Loop over the cards of the input-List
    if(&quot;DCC&quot;.contains(q))  //   If the card is a DC or CC:
      s++;                 //    Increase the counter by 1
  for(;s&gt;                  //  Loop as long as the amount of DC/CC is larger 
         c- --s;           //  than the other amount of cards + 1
      c=(c=C.size())&gt;8?8:c)//    Recalculate the size after every iteration
    i=C.remove(F[i])?i:0;  //   If the List still contains a DC, remove it
                           //   Else: remove a CC instead
  for(c=0,                 //  Reset `c` to 0
      i=8;i&gt;0              //  Loop as long as there is still room in the wallet,
      &amp;c&lt;5;                //  and we still have cards left
      c++)                 //    Go to the next card-type after every iteration
    for(;i&gt;0               //   Inner loop as long as there is still room in the wallet,
        &amp;C.remove(F[c]);)  //   and we still have a card of the current type left
      R[i--]=F[c];         //    Put a card of the current type in the wallet
  if(C.remove(&quot;ID&quot;))R[c=0]=&quot;ID&quot;;
                           //  Add the 'ID' card to the first row if present
  if(C.remove(&quot;DL&quot;))R[c&lt;1?1:0]=&quot;DL&quot;;
                           //  Add the 'DL' card to the first row if present
  for(i=0;i&lt;8;)            //  Loop over the wallet
    System.out.print(      //   Print:
      (R[i]!=null?         //    If the current slot contains a card:
        R[i]               //     Append this card
       :                   //    Else:
        &quot;__&quot;)              //     Append an empty slot (&quot;__&quot;)
      +(i++%2&gt;0?&quot;\n&quot;:&quot; &quot;));//    Append the correct delimiter (space or new-line)
  return r;}               //  And finally return the result


Java 10, 390.15 (459 bytes - 15% bonus)
C-&gt;{String r=&quot;&quot;,R[]=new String[8],F[]={&quot;CC&quot;,&quot;DC&quot;,&quot;PC&quot;,&quot;GC&quot;,&quot;MC&quot;},t=r;int c=C.size(),i=1,s=0;for(var q:C)if(&quot;DCC&quot;.contains(q))s++;for(;s&gt;(c&gt;8?8:c)- --s;c=C.size())if(C.remove(F[i]))t+=F[i]+&quot;,&quot;;else i=0;for(c=0,i=8;i&gt;0&amp;c&lt;5;c++)for(;i&gt;0&amp;&amp;C.remove(F[c]);)R[--i]=F[c];if(C.remove(&quot;ID&quot;)){t+=R[0]+&quot;,&quot;;R[c=0]=&quot;ID&quot;;};if(C.remove(&quot;DL&quot;)){t+=R[c=c&lt;1?1:0]+&quot;,&quot;;R[c]=&quot;DL&quot;;}for(i=0;i&lt;8;)r+=(R[i]!=null?R[i]:&quot;__&quot;)+(i++%2&gt;0?&quot;\n&quot;:&quot; &quot;);return r+&quot;\n&quot;+(C.size()&gt;0?t+C:&quot;It fits!&quot;);}

Try it online.