             .replace(',', '.')
         )
         pdfurl: baseURL + billLink.attr "href"
-    
+        vendor: 'Numéricable'
+        
     bills.fetched.push bill if bill.date? and bill.amount? and bill.pdfurl?
 
     #Other bills    
-    $('#facture > div').each ->
-        billDate = $(this).find('h3')
+    $('#facture > div[id!="firstFact"]').each ->
+        billDate = $(this).find('h3').html().substr 3
         billTotal = $(this).find('p.right')
         billLink = $(this).find('a.linkBtn')
-
+        
         # Add a new bill information object.
         bill =
-            date: moment billDate.html(), 'DD/MM/YYYY'
+            date: moment billDate, 'DD/MM/YYYY'
             amount: parseFloat(billTotal
                 .html()
                 .replace(' €', '')
                 .replace(',', '.')
             )
             pdfurl: baseURL + billLink.attr 'href'
-
-        bills.fetched.push bill if bill.date? and bill.amount? and bill.pdfurl?
-
+            vendor: 'Numéricable'
+        
+        bills.fetched.push bill if bill.date? and bill.amount? and bill.pdfurl?        
+        
     log.info "#{bills.fetched.length} bills retrieved"
 
-    if !bills.fetched.length
+    if not bills.fetched.length
         next "No bills retrieved"
     else
         next() 


    log.info 'Getting appkey' 
    request appKeyOptions, (err, res, body) ->
        if err then next err

        $ = cheerio.load body
        logInOptions.form.appkey = $('#PostForm input[name="appkey"]').attr "value"

        if !logInOptions.form.appkey then next "Could not retrieve app key"

        log.info 'Logging in'
        request logInOptions, (err, res, body) ->
            if err
                log.error 'Login failed'
                log.raw err
            else 
                log.info 'Signing in'
                request signInOptions, (err, res, body) ->
                    if err
                        log.error 'Signin failed'
                        log.raw err
                    else
                        redirectURL = res.headers.location

                        if !redirectURL then next "Could not retrieve redirect URL"
                        redirectOptions.url += redirectURL

                        log.info "Fetching access token" 
                        request redirectOptions, (err, res, body) -> 
                            if err
                                log.error 'Token fetching failed'
                                log.raw err
                            else
                                $ = cheerio.load body 
                                tokenAuthOptions.qs.accessToken = $("#accessToken").attr "value"
                                if !tokenAuthOptions.qs.accessToken then next "Could not retrieve access token"

                                log.info "Authenticating by token" 
                                request tokenAuthOptions, (err, res, body) ->
                                    if err
                                        log.error 'Authentication by token failed'
                                        console.log err
                                        next err
                                    else 
                                        log.info 'Fetching bills page'
                                        request billOptions, (err, res, body) ->
                                            if err
                                                log.error 'An error occured while fetching bills page'
                                                console.log err
                                                next err
                                            else                                                
                                                data.html = body
                                                next()

# Layer to parse the fetched page to extract bill data.
parsePage = (requiredFields, bills, data, next) ->


# Models
Bill = require '../models/bill'

# Konnector
module.exports =
