Skyrim:Stabilized

Quick Walkthrough
# Observe the conversation between Sapphire and Shadr.
# Speak with Shadr.
# Speak with Sapphire and either pay or persuade her to clear the debt.
# Return to Shadr.

Detailed Walkthrough
Feeling Blue
Upon your initial entry to Riften, a conversation will take place between Sapphire, a member of the Thieves Guild, and Shadr. She is berating him for not paying his debt, to which he replies that he couldn't because his shipment was attacked. Sapphire alludes to the fact that she was behind it, but doesn't forgive his debt and demands that he pay it. She then walks off towards The Bee and Barb.
Shadr is usually on the bridge near north entry gate(either standing or sitting on the bench), and when you talk to him you hear a rehash of the situation along with his helplessness. You may then offer to assist him.

Dealing with Sapphire
When you speak with Sapphire you have a number of options for rectifying the situation: 
:If you are not a member of the Thieves Guild: You are presented with the options of  persuading Sapphire to clear the debt or paying it yourself. 
:If you are a member of the Thieves Guild: You will be presented with the same options for persuading, but convincing Sapphire will take a bit more skill. You can also threaten to expose her scheme to Brynjolf for a cut.
:If you are the Guildmaster: Sapphire will apologize about the scam and claim that she was going to talk with Delvin about cutting the Guild into the deal. You can either tell her to forget about the debt or split the money.
If you accept the cut-in, you still need to return to Shadr to complete the quest.

Reward
If you were successful in having Sapphire erase the debt, return to Shadr who is grateful and gives you a leveled potion of invisibility. This will also increase Shadr's disposition towards you, meaning that you may be able to take items from the Riften Stables, including borrowing a horse.
If you take Sapphire's offer, whether as a Thieves Guild member or the guildmaster, your cut will be a leveled amount of gold.
 

Bugs
 
 Simply opening up the console and using the command   followed by   re-enables the quest trigger dialogue with Shadr. Don't simply reject helping him (as it triggers the bug) and just talk to Sapphire as usual and the quest will proceed as normal. If you do want to reject helping Shadr (and forfeit the quest reward), you will need to use   to get Sapphire to leave the Bee and Barb and move to The Ragged Flagon.
 If the previous fix does not work and/or if Shadr will not talk to you, you can use the commands   and   on Sapphire, and then speak to her wearing an Amulet of Mara. If Shadr will not speak to you, type   and   into the console and you will be able to complete the quest. 
Sapphire will be 'locked' in place at the Thieves Guild during the quest The Pursuit and neither this quest nor delivery of Glover's Letter can progress. Her only response will be something to the effect of cutting off Mercer's foot. Simply walk over to Brynjolf and finish The Pursuit quest and Sapphire will move to The Bee & Barb and her related quests can be completed.
 If Sapphire is still standing on the bridge, you can kill her, fail the mission, and use the console commands   followed by  . Talk to Shadr again and accept his task, open up the console again, click on Sapphire's body, and type  . Talk to her and choose the only option about Shadr's debt and pick any choice after that. You will then be prompted to "Return to Shadr". It will not be shown on the compass, but you can likely finding him in Riften Stables. After you talk to him, you have completed the quest. 
 As a final alternative, try  .  The quest pointer should then be on Shadr; talk to him to receive your reward and clear the quest.

 

Quest Stages