Is the second sentence correct?
Are we going ahead with this now? Earlier, you had told me that they had quoted a huge fee the last time we asked.
Or should it rather just be "You told me that they had quoted a huge fee..."?
Is the second sentence correct?
Are we going ahead with this now? Earlier, you had told me that they had quoted a huge fee the last time we asked.
Or should it rather just be "You told me that they had quoted a huge fee..."?
Yes, I think the first one is incorrect. 'You had told me' is the pluperfect (past perfect), and I suspect (though cannot be sure) that you do not need the pluperfect at this stage.
There are, however, circumstances in which the pluperfect could be used twice, such as if I say:
'Last Thursday, you told me John was going to Birmingham. However, he had earlier told me that he had done all the travelling he intended this month.'
There is no grammatical reason why had, or any other word, cannot occur twice in the same sentence. The past perfect construction is typically used to describe a past event that occurred before another. We might say ‘I had just arrived when it started to rain’. In that situation, my arrival precedes the rain, if only by a short time. For the two past perfect constructions to occur in your sentence, both the telling and the quoting would have to have occurred before some third event in the past. That is certainly possible, but you have to be sure that that was actually the case. If that was not in fact the sequence of events, then only one past perfect construction is necessary.
In brief, both the sentences you give are grammatical, but they refer to different timeframes.