public function getCustomerLastBilledInvoice($code = null) {
		$invoices = $this->getCustomerInvoices($code);
		foreach ($invoices as $key => $i) {
			if (
				!empty($i['billingDatetime']) // it has a billing datetime (not an "unscheduled" invoice)
				&& strtotime($i['billingDatetime']) <= time() // it's billing datetime is before this moment
			) {
				return $i;
			}
		}
		return array();
	}