         super.init()
         
         tableView.dataSource = self
-        fetchedResultsController.delegate = self
         
-//        self.tableView.registerClass(POSReceiptTableViewCell.self, forCellReuseIdentifier: "ReceiptCellIdentifier")
+        self.tableView.registerClass(UncategorisedReceiptsTableViewCell.self, forCellReuseIdentifier: "ReceiptTableViewCellIdentifier")
     }
     
     func numberOfSectionsInTableView(tableView: UITableView) -> Int {

    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell: POSReceiptTableViewCell = POSReceiptTableViewCell.init()
        
        // dostuff
        let receipt: POSReceipt = self.receipts[indexPath.row]
        cell.amountLabel.text = receipt.amount.stringValue
        cell.storeNameLabel.text = receipt.storeName
        cell.dateLabel.text = POSDocument.stringForDocumentDate(receipt.timeOfPurchase)
        
        return cell
    }
    
    func receiptAtIndexPath(indexPath: NSIndexPath) -> POSReceipt {

    let tableView: UITableView
    var receipts: [POSReceipt] = []
    
    lazy var numberFormatter: NSNumberFormatter = {
        var numberFormatter = NSNumberFormatter()
        
        numberFormatter.currencyCode = "NOK"
        numberFormatter.alwaysShowsDecimalSeparator = false
        numberFormatter.perMillSymbol = " "
        numberFormatter.decimalSeparator = " "
        numberFormatter.groupingSize = 10
        numberFormatter.currencySymbol = "kroner"
        numberFormatter.numberStyle = NSNumberFormatterStyle.CurrencyStyle
        numberFormatter.locale = NSLocale.init(localeIdentifier: "nb_NO")
        
        return numberFormatter
    }()
    
    var numberOfReceipts: Int = 0
